-
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
aws_db_parameter_group shows diffs but doesn't apply. Ignore_changes has no effect #4045
Comments
I believe what's happening is perhaps TF is trying to set the changed parameter back to Sample Plan output below. Here I manually changed autocommit = 0.
If this analysis is correct, to fix this temporarily, I need a way to ignore_changes to parameters, which is not working or I am not setting it correctly. See my sample code above.
|
Realised I was using TF V0.6.6. Upgraded to TF V0.6.6.7 and now I can get the
The terraform.tf file is
|
@geek876 Yes, I have the save problem like yours using TF v0.6.7 . Error applying plan:
1 error(s) occurred:
* openstack_compute_instance_v2.resource.4: diffs didn't match during apply. This is a bug with Terraform and should be reported.
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure. and my resource is like this
|
Hi @geek876 I have just tested this and it's no longer an issue. We fixed a lot of the ignore_changes issues in terraform 0.7 So using your config:
I was able to plan and apply as follows:
I then modified a parameter:
A subsequent plan looks as follows now:
I then changed the config to look as follows:
a plan then does the following:
I can destroy it as follows:
and I can recreate it as follows:
Sorry this has taken so long to get back to you on - but I am happy this is no longer an issue using the Terraform 0.7.x series :) Paul |
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. |
When one or more db_parameter_group parameters are modified outside of TF, TF always shows diff during 'plan' but 'apply' doesn't seem to revert the changed parameter. Also using 'ignore_changes' seems to NOT have any affect
Step to Reproduce
-> Create an aws_db_parameter_group with some parameters set.
-> Now modify a parameter outside of TF. Example using aws cli
-> After step 2, if we look into AWS Console, the DB_PARAMETER_GROUP 'test1' will have autocommit set to 1.
-> Run terraform plan.
This will detect the change to autocommit.
-> Apply terraform apply.
This will show that it has changed 1 resource but looking at the AWS Console, the 'autocommit' value will still be '1'.
-> Doing subsequent terraform plans will always show the diffs. 'apply' will always say it has changed the resource but doesn't seem to actually change it. i.e. autocommit always stays 1 as set in step 2 above.
-> Using lifecycle seems to have no effect. Expected behaviour is that it should not show any changed parameter values (autocommit in this case) as diffs during 'plan'
The text was updated successfully, but these errors were encountered: