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 #21229

Closed
giridharmp opened this issue May 7, 2019 · 5 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"

@giridharmp
Copy link
Author

CONTINUING....

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.

@avestalea
Copy link

avestalea commented May 8, 2019

Me too - but only in ap-southeast-2 region so far (other regions us-east-1, us-west-1, etc, etc seem to maintain order). Not exhaustive - ap-southeast-2 is the only region so far I've noticed it in.

@ghost
Copy link

ghost commented May 8, 2019

This issue has been automatically migrated to hashicorp/terraform-provider-aws#8570 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#8570.

@axw-pivorra
Copy link

Same issue on us-east-1 for us!

@ghost
Copy link

ghost commented Jul 25, 2019

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants