-
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
resource/aws_elasticache_replication_group: computed member_clusters attribute not updated #17161
Comments
Terraform core requires that the provider resources signal when a To prevent the need for a double apply, our only option today is to use CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, meta interface{}) error {
if diff.HasChange("number_cache_clusters") {
return diff.SetNewComputed("member_clusters")
}
return nil
}, Or the CustomizeDiff: customdiff.Sequence(
customdiff.ComputedIf("member_clusters", func(ctx context.Context, diff *schema.ResourceDiff, meta interface{}) bool {
return diff.HasChange("number_cache_clusters")
}),
), |
This has been released in version 3.26.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
When updating an
aws_elasticache_replication_group
by adding or removing cache clusters usingnumber_cache_clusters
, the computed attributemember_clusters
is not updated.This is likely related to the Terraform Plugin SDK issue hashicorp/terraform-plugin-sdk#195.
Terraform CLI and Terraform AWS Provider Version
Affected Resource
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
The contents of
member_clusters
should be updated.Actual Behavior
The contents of
member_clusters
is not updated, thoughnumber_cache_clusters
(which is set to the length of the same API response that is used to setmember_clusters
) is.Calling
terraform refresh
updates state to the correct values.References
The text was updated successfully, but these errors were encountered: