You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My aws_acm_certificate resource specifies a one-element list for subject_alternative_names that contains a trailing dot since it's sourced from the name attribute coming out of an aws_route53_zone data source.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Portions of the domain names have been changed. It wasn't really necessary but they're irrelevant anyway.
Expected Behavior
The provider's aws_acm_certificate resource should be able to accept the name attribute from an aws_route53_zone resource or data source.
Actual Behavior
Portion of terraform plan output:
Terraform will perform the following actions:
+ module.bq-jenkins.aws_acm_certificate.cert
id: <computed>
arn: <computed>
domain_name: "jenkins.partially.redacted.net."
domain_validation_options.#: <computed>
subject_alternative_names.#: "1"
subject_alternative_names.0: "jenkins.also.redacted.com."
validation_emails.#: <computed>
validation_method: "DNS"
Terraform apply
23:50 $ terraform apply "plan.out"
module.bq-jenkins.aws_acm_certificate.cert: Creating...
arn: "" => "<computed>"
domain_name: "" => "jenkins.partially.redacted.net."
domain_validation_options.#: "" => "<computed>"
subject_alternative_names.#: "" => "1"
subject_alternative_names.0: "" => "jenkins.also.redacted.com."
validation_emails.#: "" => "<computed>"
validation_method: "" => "DNS"
Error: Error applying plan:
1 error(s) occurred:
* module.bq-jenkins.aws_acm_certificate.cert: 1 error(s) occurred:
* aws_acm_certificate.cert: Error requesting certificate: ValidationException: 2 validation errors detected: Value '[jenkins.west.us.preprod.bq-s.com.]' at 'subjectAlternativeNames' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 253, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: ^(\*\.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$]; Value 'jenkins.preprod.buyerquest.net.' at 'domainName' failed to satisfy constraint: Member must satisfy regular expression pattern: ^(\*\.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$
status code: 400, request id: 9c2c602b-54ce-11e8-a5f9-adc5947a1e01
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Steps to Reproduce
Create an aws_acm_certificate resource where the subject_alternative_names list contains at least one entry that is the name attribute from an aws_route53_zone data source.
This is very similar to #3836
Description
My
aws_acm_certificate
resource specifies a one-element list forsubject_alternative_names
that contains a trailing dot since it's sourced from thename
attribute coming out of anaws_route53_zone
data source.Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Portions of the domain names have been changed. It wasn't really necessary but they're irrelevant anyway.
Expected Behavior
The provider's
aws_acm_certificate
resource should be able to accept thename
attribute from anaws_route53_zone
resource or data source.Actual Behavior
Portion of
terraform plan
output:Terraform apply
Steps to Reproduce
aws_acm_certificate
resource where thesubject_alternative_names
list contains at least one entry that is thename
attribute from anaws_route53_zone
data source.terraform apply
References
The text was updated successfully, but these errors were encountered: