You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resource should be imported without create/destroy.
Actual Behavior
Terraform wants to destroy and re-create this resource, which will issue a new key.
Steps to Reproduce
Running terraform plan with the above configuration should exhibit the behavior.
Additional Context
I do think this is intended behavior, but destroying an access key is a pretty severe operation in AWS as, if the key is propagated elsewhere, destroying it will require re-propagating it. Usually these sorts of things are done with adding a new key before destroying the old key to ensure the new key is installed everywhere before deleting the old key.
References
No response
The text was updated successfully, but these errors were encountered:
Yes, the resource plan is created by the provider, so the decision to replace the instance is outside of Terraform's control. My guess is that the provider can't actually return the original pgp_key so the configuration appears as a change to the resource since the original config is lost.
However it might be useful for us to understand why the provider is forcing replacement here. There are still some improvements we want to make to the import process, and perhaps there is something core can do to assist the provider in this case. Can you show the output of the plan that indicates replacement?
Terraform Version
Debug Output
I did scan through the trace logs and there isn't really anything relevant... I'm guessing this is deliberate because the provider source code has
Expected Behavior
Resource should be imported without create/destroy.
Actual Behavior
Terraform wants to destroy and re-create this resource, which will issue a new key.
Steps to Reproduce
Running
terraform plan
with the above configuration should exhibit the behavior.Additional Context
I do think this is intended behavior, but destroying an access key is a pretty severe operation in AWS as, if the key is propagated elsewhere, destroying it will require re-propagating it. Usually these sorts of things are done with adding a new key before destroying the old key to ensure the new key is installed everywhere before deleting the old key.
References
No response
The text was updated successfully, but these errors were encountered: