-
Notifications
You must be signed in to change notification settings - Fork 157
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
Upgrading to tfe
v0.45.0
wants to add value
on all sensitive tfe_variable
resources
#936
Comments
@pndurette Hello, and thanks for your patience while we investigated this issue. The upgrade should not have triggered a change or addition to value. I did find a planned modification when the variable was created without a value, but I believe this was for adding readable_value with a null value (see my repro steps below) In short, Here were my steps:
Applying it did not overwrite the value. However, in your case, I would expect the value to be overwritten because there is a value in your plan, possibly coming from some prior state? I couldn't reproduce that with terraform 1.3.9 or latest. Do you have any other ideas about where the value may have come from? |
I am also encountering the same problem. It also occurs with Terraform = v1.6.4 and tfe-provider=v0.50.0. In my case, I originally set the value with null and then put the value on the TFC UI. In this case, it worked without setting ignore_changes. However, after upgrading to v0.44, I found the following difference.
On the other hand, it may be working correctly despite the same implementation. When I checked the "state file" to investigate the cause, I found that the former (which is updated) had a value of
Can the above help to solve the problem? |
@brandonc Sorry for replying so late, haven't taken the time to come back to this (and still on
I'm curious by what you mean by "possibly coming from some prior state"? Anything I can do? All I can do is a refresh and I'm still getting those. The only difference in my code with your example is that I also have a I can't really think of anything and like you said I'm pretty sure this will wipe all those variables. Any other idea of what I can try? Bit at a loss. |
update on that— |
Hopefully this is only a question going from
tfe
v0.44.1
tov0.45.0
, as this might be expected behaviour.Terraform Cloud/Enterprise version
Terraform Cloud
Terraform version
1.3.9
(via Terraform Cloud, the version is pinned to~> 1.3.0
)Terraform Configuration Files
Debug Output
I've followed the updates to
tfe_variable
in thev0.45.0
release notes with its related issues, bug fixes and breaking changes, but I can't see why my plan acts like this.This
tfe
configuration manages a lot of workspaces, so full debug output would be very long (and would need to be scrubbed) but let me know if you need more and will happily provide!Expected Behavior
No changes when updating from
tfe
v0.44.1
tov0.45.0
Actual Behavior
The speculative plan for going from
tfe
v0.44.1
tov0.45.0
wants to add (?)value
to alltfe_variable
that havesensitive = true
(for allcategory
), e.g.:etc.
From what I suspect, this would replace all these variables with empty strings? It's hard to tell what's really going to happen, but it would be pretty harmful if it did.
I see this note was added in the
tfe_variable
docs, but I can't tell how/if this affects my case:terraform-provider-tfe/website/docs/r/variable.html.markdown
Lines 85 to 89 in aad4a6e
Additional Context
I've read the entirety of #873 and #839 and just like the latter was happening, here we:
tfe_variable
in Terraform withlifecycle { ignore_changes = [value] }
Which as been working well for us for a year
The text was updated successfully, but these errors were encountered: