|
Hello! I am looking into a simple way to do credential rotation, including the passphrase with which the OpenTofu state is client-side encrypted. Ideally I don't want to change Terraform code. What would be the way to go? I've found the fallback configuration of the state block. I thought about doing something like this: Unfortunatelly I get a Is there an "OpenTofu way" to do this or does it require loading the state file and de- and encrypt it myself, if I don't want to change the code (e.g. CI/CD pipeline)? Thanks! |
Replies: 1 comment 3 replies
|
Hi, the issue you are running into is that you are renaming key providers. Their names are stored in the encryption payload and can not be easily changed. We are working on better support for this in the upcoming release, but that will be a little while. My recommendation is to change the "old_passkey" identifier back to it's original name and add a suffix to the new "passkey", "passkey_v1" or "passkey_24.02.2025". Let us know if that works for you. I'll be checking this thread often and am also available on the community slack. |
Hi, the issue you are running into is that you are renaming key providers. Their names are stored in the encryption payload and can not be easily changed. We are working on better support for this in the upcoming release, but that will be a little while.
My recommendation is to change the "old_passkey" identifier back to it's original name and add a suffix to the new "passkey", "passkey_v1" or "passkey_24.02.2025".
Let us know if that works for you. I'll be checking this thread often and am also available on the community slack.