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

aws_acm_certificate with subject_alternative_names not maintaining order #8543

Closed
giridharmp opened this issue May 7, 2019 · 3 comments
Closed

Comments

@giridharmp
Copy link

I am creating an AWS ACM certificate with the below terraform code:

resource "aws_acm_certificate" "alb_certificate" {
domain_name = "${var.subdomain}"
validation_method = "DNS"

subject_alternative_names = ["api.example.com","kib.example.com","gra.example.com","pro.example.com","proapp.example.com","prom.example.com","promfro.example.com","dash.example.com","pgad.example.com"]
}

When we used to look into the issued certificate, in the additional names section, the above order in subject_alternative_names used to be maintained. But suddenly when we tried recently, the order is not being maintained and the names are getting used randomly. Because of this, when we refresh or want to update any other resource, a new certificate is always getting issued.

But the terraform plan is showing as below:
aws_acm_certificate.alb_certificate: Creating...
arn: "" => ""
domain_name: "" => "np"
domain_validation_options.#: "" => ""
subject_alternative_names.#: "" => "9"
subject_alternative_names.0: "" => "api.example.com"
subject_alternative_names.1: "" => "kib.example.com"
subject_alternative_names.2: "" => "gra.example.com"
subject_alternative_names.3: "" => "pro.example.com"
subject_alternative_names.4: "" => "proapp.example.com"
subject_alternative_names.5: "" => "prom.example.com"
subject_alternative_names.6: "" => "promfro.example.com"
subject_alternative_names.7: "" => "dash.example.com"
subject_alternative_names.8: "" => "pgad.example.com"
validation_emails.#: "" => ""
validation_method: "" => "DNS"

but the order in "Additional names" in the certificate is as follows:
promfro.example.com,
api.example.com,
prom.example.com,
proapp.example.com,
pro.example.com,
kib.example.com,
dash.example.com,
gra.example.com,
pgad.example.com

The order in which the subject alternative names are mentioned need to be maintained.

@tdmalone
Copy link
Contributor

tdmalone commented May 8, 2019

Duplicates #8531 & #8570

@nywilken
Copy link
Contributor

@giridharmp thanks for opening this issue, and sorry you are running into trouble here. This is a duplicate of #8531 so I am going to close this issue and ask that any new comments be tracked on the existing thread. If you haven't already done so please upvote #8531

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants