-
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
Roll up issue for known ignore_changes problems #5627
Comments
Thanks for checking, @spiffxp - I believe that it falls under the |
Actually... scratch that, it works in terraform 0.6.12, sorry for the confusion. Turns out I was in fact using terraform 0.6.11. |
@spiffxp Oh cool! Thanks for following up 😀 |
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. This should fix `ignore_changes` problems with Required attributes. Here we also introduce a `test` provider meant as an aid to exposing via automated tests issues involving interactions between `helper/schema` and Terraform core. This has been helpful so far in diagnosing `ignore_changes` problems, and I imagine it will be helpful in other contexts as well. We'll have to be careful to prevent the `test` provider from becoming a dumping ground for poorly specified tests that have a clear home elsewhere. But for bug exposure I think it's useful to have. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. This should fix `ignore_changes` problems with Required attributes. Here we also introduce a `test` provider meant as an aid to exposing via automated tests issues involving interactions between `helper/schema` and Terraform core. This has been helpful so far in diagnosing `ignore_changes` problems, and I imagine it will be helpful in other contexts as well. We'll have to be careful to prevent the `test` provider from becoming a dumping ground for poorly specified tests that have a clear home elsewhere. But for bug exposure I think it's useful to have. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. This should fix `ignore_changes` problems with Required attributes. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. This should fix `ignore_changes` problems with Required attributes. Refs #5627
Thanks @phinze, looking forward to this. What are your thoughts wrt whether this may make it into the next release or not? |
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. In addition, any changes that required a replacement of the resource were causing problems with `ignore_chages`, which didn't properly filter out the replacement when the triggering attributes were filtered out. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. In addition, any changes that required a replacement of the resource were causing problems with `ignore_chages`, which didn't properly filter out the replacement when the triggering attributes were filtered out. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. In addition, any changes that required a replacement of the resource were causing problems with `ignore_chages`, which didn't properly filter out the replacement when the triggering attributes were filtered out. Refs #5627
The ignore_changes diff filter was stripping out attributes on Create but the diff was still making it down to the provider, so Create would end up missing attributes, causing a full failure if any required attributes were being ignored. In addition, any changes that required a replacement of the resource were causing problems with `ignore_chages`, which didn't properly filter out the replacement when the triggering attributes were filtered out. Refs #5627
Okay, v0.6.14 contains several improvements to the |
ya! I'll upgrade today! :) |
Thanks @phinze I did test with 0.6.14 (using the same setup as described in my original issue #5294) and unfortunately it still does not work for me :( Infact it actually breaks slightly worse now .... Having done a successful Doing a
Not sure exactly what it would do here, I did a This resulted in quite a few errors, all of the same variety as noted below
|
For me adding the ignore of
|
@phinze Still having trouble with
|
Another issue is that, after I apply ignore_changes to resources, I see no +, -, or ~ in the plan anymore but still see changes reflected to the counter: |
Too be more clear... the counter is wrongly aggregated when there is other change in the plan. The following shows only one ~ change but the counters are wrong. ... ~ module.data_nodes.postgresql.aws_instance.postgresql Plan: 20 to add, 3 to change, 20 to destroy. |
Also -> #5956 |
Also #6296 |
@phinze its great that we got the first half of these fixes out with 0.6.14 - thanks! I see that 0.6.15 is out now as well however looks like these last set of ignore issues are still there, which is still causing me great grief unfortunately and thus I can't use the feature as a result. Are these last scenarios more complicated to resolve, i.e. my real question here is: are the fixes for these likely to make it into a next minor release or do they need more fundamental attention, and thus may still be some way off? |
Looks like #6446 is an ignore_changes issue. |
Yup, #6446 is definitely ignored_changes and I've made a pretty minimal reproduction of how using ignore_changes with aws_autoscaling_group desired_capacity breaks you. |
For a more abstract (1) After creating, fully ignore this field's configuration and always preserve what exists in the resource's actual state. (2) Do a three-way diff between the previous value in the tfstate A, the value in the config file B, and the value in the actual resource C. If A=B, preserve the state as C, otherwise set to B. It would be great if the answer was (2), but I can't tell from the docs or the source if that's the intention. Our specific goal is for |
Here is another one, not listed there: #6746 |
I've been keeping an eye on #5911, and I was hopeful today, but nope. Not sure if I should create a separate issue with this, but I caught another one against tip of master today.
Worked fine on creation and subsequent plans showed nothing to do. However, if I changed the resource like so:
I get an error thrown:
|
Hi all! Thanks for the great discussion here, and sorry for leaving this unattended for so long. Given the rather open-ended nature of this issue, and that there have been some significant changes to Terraform's core since this issue was opened, I'm going to close this issue for now. If anyone is still seeing issues that they suspect come until the former scope of this ticket I suggest to open them as new top-level issues and we can triage each one independently. Thanks again for all the help here in gathering theses issues! |
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. |
I'm currently diving into the active
ignore_changes
issues and I'm opening this to consolidate the open issues that will be handled for this effort.Current known issues I'm working on:
ForceNew
attributes (resource still gets replaced w/ attr filtered out of the diff)Required
attributes (attr filtered out and not present on creation, causing failure)diffs didn't match
error if upstream attribute changes and a state refresh catches it (ignore_changes used w/ aws_ecs_service causes "diffs didn't match" #4953, Ignore Changes to ASG desired/min/max size #4696)diffs didn't match
error on Opsworks changes following the repro steps in provider/aws: Opsworks custom cookbooks revision field causes diff mismatch #4790The text was updated successfully, but these errors were encountered: