Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add alternative names to aws-acm-cert test #203

Merged
merged 3 commits into from
Jun 15, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions aws-acm-cert/module_test.go
Original file line number Diff line number Diff line change
@@ -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,
},
)

4 changes: 2 additions & 2 deletions aws-acm-cert/variables.tf
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ variable "cert_domain_name" {
}

variable "cert_subject_alternative_names" {
type = map
type = map(string)
description = "A map of <alternative_domain:route53_zone_id>"
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
}
}
2 changes: 1 addition & 1 deletion aws-aurora/module_test.go
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ func TestAWSAurora(t *testing.T) {
},
)

rc, e := terraform.InitAndPlanE(t, options)
rc, e := terraform.InitAndPlanWithExitCode(t, options)
a.NoError(e)
a.Equal(2, rc) // 2 means planned changes, no errors
}