-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_rds_cluster_parameter_group plan shows changes after applying #5410
Comments
It seems this is still an issue on
... anyone following up on this? |
We've encountered an issue like this when removing a parameter from our configuration that we'd previously set. For example, we used to set
If we then remove it from the config, though,
and a list of all the parameters.
Applying that plan says
but a subsequent This is with these:
|
Hm, some more data: I tried removing and importing the parameter group, and it had no effect; but I did this:
And then my |
Thanks for a workaround, @jbscare! In my case it was a single RDS instance, so I used:
|
Looks like it, yeah. The fix for that was in #3182 but was only applied to the non-cluster parameter group resource. As a workaround I used the dynamic "parameter" {
# Allow read_only to be `null`, so this param is removed and so defaults to {TrueIfReplica}
#
# Works around https://github.com/terraform-providers/terraform-provider-aws/issues/5410
# where setting a parameter to a default value will continuously try to set it as it isn't
# recognised as set by the user
for_each = var.read_only != null ? [true] : []
content {
name = "read_only"
value = var.read_only
}
} If the var is null/default then the dynamic block means the parameter's not set. The provider then seems to correctly remove the parameter if it had been set and is now null. |
sadly this did not work for me - at least with parameter-name Edit: comparing the cluster-param-group and param-group source files, yes it really does look like the code changes from 3182 can be easily copied/referenced directly into updating cluster-param-group. only external call new that would need updating via copy-paste is |
Community Note
Terraform Version
Terraform v0.11.7
Affected Resource(s)
aws_rds_cluster_parameter_group
Terraform Configuration Files
Expected Behavior
Once applying the cluster parameters, subsequent plan and apply should not make changes to the db cluster parameter group.
Actual Behavior
On each plan or apply, cluster parameter group is attempting to modify the resource and does not make and changes.
Steps to Reproduce
terraform apply
-> yesterraform apply
-> see changesImportant Factoids
In this example, commenting out the parameter below resolves the unintended behavior.
parameter {
name = "default_password_lifetime"
value = "0"
}
References
Believe this may be similar to #593 that occurs when attempting to set a parameter to the default value, except on the cluster parameter group resource.
The text was updated successfully, but these errors were encountered: