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