-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Create and Delete actions for output plans #27512
Conversation
The planning logic here was inspired by resources, but unlike resources a null value is valid for an output and does not necessarily indicate it is being removed. If both before and after are null, the change should be NoOp. When an output is removed from the configuration, we have a separate node to create a Delete action to remove it from the state.
Codecov Report
|
d8d982c
to
ed981c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
Rather than using a prior value of null to indicate create, which is imprecise because null is a valid output value, only plan values that didn't exist in the prior state as Create changes.
ed981c5
to
191124e
Compare
Would this fix be backported to the next Terraform 0.14 release (e.g: 0.14.6)? It is already listed as a fix on the |
Hi @alloveras, This wasn't immediately backported because it wasn't a critical issue blocking any 0.14 functionality. Thanks! |
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. |
The planning logic here was inspired by resources, but unlike resources
a null value is valid for an output and does not necessarily indicate it
is being removed. If both before and after are null, the change should
be NoOp. When an output is removed from the configuration, we have a
separate node to create a Delete action to remove it from the state.
Rather than using a prior value of null to indicate Create, which is
imprecise because null is a valid output value, only plan values that
didn't exist in the prior state as Create changes.
Fixes #27490