I'm trying to create a aws_acm_certificate with multiple subject_alternative_names
resource "aws_acm_certificate" "cert" {
provider = aws.acm
domain_name = local.domain_name
validation_method = "DNS"
subject_alternative_names = [local.domain_name, "www.${local.domain_name}"]
}
Running apply for the first time works as advertised. However, when I re-run apply with exactly the same vars terraform wants to re-create the cert with the following reason:
~ subject_alternative_names = [ # forces replacement
+ "xyz.com",
"www.xyz.com",
]
It appears that [local.domain_name, "www.${local.domain_name}"] when compared with its current state comes up as different.
Any ideas on what's going on here?