diff --git a/aws-acm-cert/module_test.go b/aws-acm-cert/module_test.go index cd4c7ece..df955db0 100644 --- a/aws-acm-cert/module_test.go +++ b/aws-acm-cert/module_test.go @@ -27,8 +27,17 @@ func TestAWSACMCertInitAndApply(t *testing.T) { testutil.UniqueId(), testutil.EnvVar(testutil.EnvRoute53ZoneName)) + alternativeDomainName := fmt.Sprintf( + "%s.%s", + testutil.UniqueId(), + testutil.EnvVar(testutil.EnvRoute53ZoneName)) + route53ZoneID := testutil.EnvVar(testutil.EnvRoute53ZoneID) + alternativeNames := map[string]string{ + alternativeDomainName: route53ZoneID, + } + options := testutil.Options( testutil.DefaultRegion, map[string]interface{}{ @@ -37,9 +46,10 @@ func TestAWSACMCertInitAndApply(t *testing.T) { "service": service, "owner": owner, - "cert_domain_name": certDomainName, - "aws_route53_zone_id": route53ZoneID, - "validation_record_ttl": 5, + "cert_domain_name": certDomainName, + "aws_route53_zone_id": route53ZoneID, + "validation_record_ttl": 5, + "cert_subject_alternative_names": alternativeNames, }, ) diff --git a/aws-acm-cert/variables.tf b/aws-acm-cert/variables.tf index ee28c235..93e1ec4e 100755 --- a/aws-acm-cert/variables.tf +++ b/aws-acm-cert/variables.tf @@ -4,7 +4,7 @@ variable "cert_domain_name" { } variable "cert_subject_alternative_names" { - type = map + type = map(string) description = "A map of " default = {} } @@ -48,4 +48,4 @@ variable "subject_alternative_names_order" { type = list(string) description = "Order to list the subject alternative names in the ACM cert. Workaround for https://github.com/terraform-providers/terraform-provider-aws/issues/8531" default = null -} \ No newline at end of file +}