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

Improve idempotency of aws_iam_server_certificate provisioning #2411

Merged
merged 2 commits into from
Jun 22, 2015

Conversation

Jberlinsky
Copy link
Contributor

This pull request addresses issue #2409. A brief recap follows:

When Terraform pulls down state data about AWS IAM certificates in its purview, it normalizes the certificate body by trimming whitespace from it and taking a SHA1 hash of the resulting string. This works well for dealing with newline characters at the end of a certificate, however, this logic does not apply to the certificate chain. A change to the certificate chain is enough for Terraform to rebuild the resource. The combination of these two circumstances means that, if one has an IAM certificate with a chain in their Terraform configuration, terraform plan will always require some action, even if everything appears to be in sync.

This pull request normalizes the certificate chain in the same way as the certificate body. While the major gains are in the use of strings.TrimSpace, the SHA hashing is nice to have, as well. In passing, the integration test for this resource has been updated to include a self-signed certificate bearing a CA chain.

@dbolding
Copy link

These changes would be very helpful. Thanks!

@phinze
Copy link
Contributor

phinze commented Jun 22, 2015

Thanks for the PR and the great description. This looks solid!

phinze added a commit that referenced this pull request Jun 22, 2015
Improve idempotency of aws_iam_server_certificate provisioning
@phinze phinze merged commit cde6472 into hashicorp:master Jun 22, 2015
@marpada
Copy link

marpada commented Jun 25, 2015

kudos @Jberlinsky , the bug was causing some serious havoc on our ELBs!

@ghost
Copy link

ghost commented May 2, 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 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 May 2, 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

Successfully merging this pull request may close these issues.

4 participants