-
Notifications
You must be signed in to change notification settings - Fork 277
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
Terraform thinks there are changes due to comparing encrypted and plain environment variables for the app platform resources #869
Comments
We have the same behaviour on using Pulumi app deployments. Pulumi is using the terraform provider for doing these activities --> pulumi/pulumi-digitalocean#308. So this seems that it is the same bug. |
Yes, Are there any updates on this? @danaelhe |
+1, apps take a long time to deploy, and if you have many of them in your workspace it can add an unsustainable amount of time to every apply. |
@Tobjoern @StanScates Thank you for bubbling this back up. We've pushed up an example that offers a workaround in #1030 We are aware this workaround adds a few more manual steps, but it should mitigate the issue enough until we find a better solution. Please feel free to offer feedback in that PR. |
Thanks for publishing this workaround @danaelhe! It does appear to be working for me. A few notes on my experience for others wishing to use this workaround:
Thanks again 💯 |
@danaelhe Hi Danael, unfortunately it appears that this workaround no longer works - it seems that a change was made to the underlying REST API recently that rejects already encrypted values instead of the previous behavior - we're now receiving this error when utilizing the workaround I described above:
This puts us in a similar situation as before with no workaround:
We are still using the DO TF Provider v2.29.0 but we've also tried the latest v2.39.2 with the same results. Please let me know if I should open a new issue or if I am perhaps missing something in the documentation relevant to this workaround - Thank you for any advice you can offer us 🙏 |
Hmmm. Doesn't look like there was a change done in the API side. Could you create a new issue so we can keep better track of it? We'll investigate on our end. Thanks in advance. |
Interesting, just tried the workaround it still works for me. Just to be sure....are you still following these instructions noted here:
|
Can we keep the issue open? While there is a work-around, it still requires treating |
newest report of this issue: #1075 |
Bug Report
Describe the bug
The environment variable is a secret and will be encrypted, once applied the value the encrypted value will always be different to the encrypted value. Which will cause changes to occur with
terraform plan
.I'm just curious has anyone got a suggest for this? (Avoid unchanged encrypted values to not cause changes, due to comparison to provided value and applied value from digitalocean as they encrypt it for you)
Affected Resource(s)
Expected Behavior
No changes to environment vars, expect no changes to
terraform plan
Actual Behavior
Digitalocean can encrypt the value which causes value to be different to the unencrypted value provided. This results in
terraform plan
always thinks there are changes to the environment variables (ones i'm attaching to the service within digitalocean app)Steps to Reproduce
digitalocean_app
with secret environment variablesterraform plan
&terraform apply
terraform plan
again (it will think you have changes)Terraform Configuration Files
Terraform version
Debug Output
Panic Output
Additional context
Important Factoids
References
The text was updated successfully, but these errors were encountered: