-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 breaks when values removed from config for at least Set and Bool (but not String) #952
Comments
Closed
This was referenced Feb 17, 2015
Fixed by above two PRs, will close once merged. |
This was referenced Feb 17, 2015
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
ghost
locked and limited conversation to collaborators
May 4, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
May be related to #950 .
Given the following provider configuration:
I can apply the configuration and get an expected result:
So far so good, but here's where things go south. If I remove several values from configuration:
Upon the first apply, I see what is expected:
But if I immediately do a
terraform apply
again, I see:Uh oh. This happens every time I apply. Let's look at the tfstate file:
Note that
dns.#
does still show 2, and both entries are there. The removal is being noticed every time I hit apply, and Terraform is performing a change, but it's not actually recording that change.publish_all_ports
may in fact be a different bug; note that it's being stored as a string in the tfstate file, and the output during running suggests that it's taking a representation of the bool as an integer value stored in a string ("0") and moving it to the empty string...IOW, the default value for a string type.It is also worth noting that the string value I commented out does not experience this problem; only the set and bool types. I haven't tried a map or integer but I wouldn't be surprised if they have similar problems as I think the issues are stemming from all values being converted to strings in the tfstate file.
Of course, there is an argument that those values should be removed entirely from the tfstate file as a fix to #950 .
This is based off of current master (05078bc).
The text was updated successfully, but these errors were encountered: