1resource "tls_private_key" "root" { 2 algorithm = "RSA" 3 rsa_bits = "2048" 4} 5 6resource "tls_self_signed_cert" "root" { 7 private_key_pem = tls_private_key.root.private_key_pem 8 9 validity_period_hours = 87600 10 early_renewal_hours = 8760 11 12 is_ca_certificate = true 13 14 allowed_uses = ["cert_signing"] 15 16 subject { 17 common_name = "Tonic Testing CA" 18 organization = "Tokio" 19 organizational_unit = "Testing" 20 } 21} 22 23resource "local_file" "ca_cert" { 24 filename = "../ca.pem" 25 content = tls_self_signed_cert.root.cert_pem 26} 27