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

Update normalize function to put in state file full certificate data instead of hash #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rdublenych
Copy link
Collaborator

@rdublenych rdublenych commented Nov 12, 2019

The current behaviour of the resource is to put a hash of certificate data (private key, certificate body, chain code) in the state file.
It causes an error because the provider sends these hashes of unmodified fields instead of source data on resource update.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes hashicorp#10847.
Also, may fix hashicorp#9809.

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
go test ./... -timeout=30s -parallel=4
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
ok      github.com/terraform-providers/terraform-provider-aws/aws       18.835s
ok      github.com/terraform-providers/terraform-provider-aws/aws/internal/flatmap      (cached)
ok      github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags (cached)
...

Test cases:

Update imported certificate

  1. import new certificate by using acm_certificate resource
  2. update certificate_body field
  3. update imported certificate

current version

Error: Error updating certificate: ValidationException: com.amazonaws.pki.acm.exceptions.external.ValidationException: Could not validate the certificate with the certificate chain.

result: imported certificate was not updated.

fixed version (pr)

Apply complete
result: imported certificate was updated successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant