-
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
lifecycle / ignore_changes blocking upgrade from 0.11 to 0.12 #21433
Comments
According to the docs, the value of
to:
but this seems to have no effect. |
I'm also having this issue:
edit: |
FWIW, this is also an issue for us with managing K8S resources where the cluster is also being managed by Rancher2. For 0.11 we had the following which worked well...
Now, I'm unable to determine the equivalent for 0.12. If run unaltered, the error is:
On removing the '.0' part, it then becomes...
After some RTFMing, it seems I need to use attribute names instead of strings, so I tried this...
Which results in the following error:
As a workaround, I even tried just ignoring all the annotations.
It doesn't give me an error, but it doesn't work as expected either. It just offers to clobber the attributes it's supposed to be ignoring when run. Can anyone tell me if I'm doing something wrong, or whether this is now just plain broke in 0.12?!? |
This is blocking me from upgrading to 0.12 as well, it will clobber tons of resources from the change in ignore_changes params from .0. to [0] when referencing attributes |
This was milestoned for 0.12.1, but 0.12.1 has been released and did not address this issue. Could we get an update on the timeline for addressing this issue? |
@apparentlymart - My use case is still not working with 0.12.3 Copying code from further up in this thread-- these attributes are still triggering an update...
This seems similar to the pattern described in the initial issue. |
@apparentlymart I confirm what @jyoungs is saying and
|
@apparentlymart I can also confirm it does not work with the kubernetes provider. For instance the following worked for deployments/statefulsets in 0.11 lifecycle { but lifecycle { does not work in 0.12.3 (or any other 0.12 version) |
Also seeing this issue on 0.12.3. Here is an example from
This previously used to work in 0.11.x to ignore the rdb_storage_connection_string, but it no longer ignores the value in 0.12.3. The only thing that appears to work is if i specify the top level redis_configuration. I guess this might be related to issue: #21421 |
@apparentlymart would you please consider reopening this issue ? |
Followed
|
Same issue here with :
When I run the plan :
|
@wgebis - try dropping the quotes
|
Thanks @rossigee. That was the issue. Now it works. 👌 |
@rossigee one more thing: after upgrade to 0.12.4, both options work, with and without quotes. |
I'm still seeing issues even after upgrade to 0.12.4 where ignore_changes is still not working as expected like it previously did in 0.11.x. Here's an example from
And then during planning it's trying to modify the ignored item to null:
Anyone else still seeing issues here? |
If you are still seeing unexpected behavior with |
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. |
Terraform Version
Terraform Configuration Files
This configuration is savd as oops.tf and used below.
Expected Behavior
The code, first applied with terraform 0.11.14 should be applied without any change with terraform 0.12.0.
Actual Behavior
When applying with terraform 0.12.0, a replacement of the instance is planned if it has previously been replaced by GCE.
Steps to Reproduce
Following this step, version name will not be "default" as created, but will have a new generated name, based on time. As per writing this issue, I obtained a version called "0/2019-05-24 15:00:03.158055+00:00". This is exactly why we first used lifecycle / ignore_changes. It prevents instances recreation while not needed. Following step presents the expected behaviour with 0.11.14.
Produced output is:
validate output warns us about the wrong presentation of ignore_changes:
We then replace version.0.name with version[0].name and obtain a successful return from validate:
But then, lifecycle/ignore_changes is no more enforced when using
t12/terraform apply
Additional Context
As said above this is happening during the upgrade process from 0.11.14 to 0.12.0
The text was updated successfully, but these errors were encountered: