-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 plan shows changes even after applying #593
Comments
I believe I've found the cause of this issue. This occurs when attempting to set a parameter to the RDS system default. When the resourceAwsDbParameterGroupRead function calls the AWS API, it only queries the user-customized parameters (see here). Then when Terraform does the diff between the current state and the config, it sees that a change needs to be applied, when it does not. If I get time, I'll write up a test for this and see if I can find a good fix. My inclination would be to query for all DB parameters, and take the (fairly minor) performance hit. However, that probably involves writing some extra logic to make sure we don't show a diff of all the things. I'll take a look. |
Ah okay, @billputer do you know of any way to confirm that UTF8 is the default on RDS Postgres? Your explanation makes sense; if I can verify that it's the default I'd probably just leave it off (and that resolves my problem at least). I couldn't find any docs, wondering if you had found some. Thanks for looking into this! |
You can look up the system defaults using the AWS CLI command describe-engine-default-parameters. |
@billputer I'm running into this pretty hard in our environment. How far did you get in a fix for this, if anywhere? If you have notes or a partial implementation that you can share, I'd be glad to try and run it to completion. |
@handlerbot The easy fix is to not set the params that are system defaults. In our case, we simply removed the client_encoding parameter from our configuration. |
I've opened #3182, which should serve as a complete solution to this problem. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @joshma as hashicorp/terraform#12513. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.8.8
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
After running
terraform apply
,terraform plan
should show no changes.Actual Behavior
terraform plan
showsclient_encoding
getting updated:It could be useful to note that, inspecting
.tfstate
,parameter.1124637299
is NOT being saved.The text was updated successfully, but these errors were encountered: