-
Notifications
You must be signed in to change notification settings - Fork 72
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_secretsmanager_secret: interpolated tags are not included in depedency map #103
Comments
Hi @dekimsey 👋 Thank you for reporting this and sorry you are running into trouble here. This type of error:
Indicates that the upstream resource attribute reference changed "unexpectedly" between plan and apply. Attribute values between plan and apply phases are expected to be known or otherwise marked as changed in Terraform resource code. Terraform resources have various ways to signal to Terraform (core/CLI) that their attributes might change during an update-in-place operation, however it appears the Since there's nothing that we can do in this situation within the Terraform AWS Provider, I'm going to transfer this issue over to the Terraform ACME Provider due to the above, but in the meantime you may find success in switching to an attribute that does appear to be re-computed during updates, such as |
Thanks @bflad! I wasn't sure if this was an ACME or AWS provider issue, but I figured I'd start there. |
Just pinging this issue, it is still occurring every time we rotate the ACME certificates.
|
@dekimsey indeed this is probably caused by the fact that the ID is changing on certificate update (as it's essentially getting replaced on renewal), so I will need to figure out what will be better - forcing a complete replacement of the resource on renewal (which may not be a good idea as we actually revoke the certificate when the resource is destroyed), or determining a different ID scheme, decoupling it from the actual certificate URL. In the interim, you could see about changing the field you use from the ID of the certificate to |
Thanks @vancluever, that's a good idea. I'll update our code to use that url and let you know when the next rotation happens. For background, we actually squirrel away the certificate_id on the secretsmanager entry because it offers a nice way to identify the certificate bundle without having to grant access to read it's contents. We then have a lambda that periodically checks all the certificates by simply reading their tags and alerting for any pending expiration. |
Just circling back on this, it worked great. New secretsmanager entries were made and tagged without issue in a single run by using the |
Awesome, glad that's working for you @dekimsey. Will help once I decide the route to go with how we're going to manage the ID going forward! |
This is now closed; version 2.0.0 will use a UUID for the certificate field going forward. |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
The ACME cert should have been refreshed and updated without issue.
Actual Behavior
Had to run terraform apply twice.
Steps to Reproduce
terraform apply
# errorsterraform apply
# successImportant Factoids
It looks as if the tag changes, but it's dependency upon the output of acme_certificate isn't computed as part of the plan.
References
The text was updated successfully, but these errors were encountered: