The cache_nodes value should be computed after the apply occurs so that other resources depending on it can enact on those.
Actual Behavior
The cache_nodes show no change during a TF Plan and will fail during a TF apply.
The error is produced when num_cache_nodes for aws_elasticache_cluster is changed and the cache_nodes is used elsewhere in another resource.
Relevant Error/Panic Output Snippet
{"@level":"error","@message":"Error: Provider produced inconsistent final plan","@module":"terraform.ui","@timestamp":"2024-11-22T23:47:09.372277Z","diagnostic":{"severity":"error","summary":"Provider produced inconsistent final plan","detail":"When expanding the plan for module.index-staging-mc.aws_route53_record.default to include new values learned so far during apply, provider \"registry.terraform.io/hashicorp/aws\" produced an invalid new value for .records: planned set element cty.StringVal(\"0 10 11211 index-stg-mc.xxxxxx.0003.use1.cache.amazonaws.com.\") does not correlate with any element in actual.\n\nThis is a bug in the provider, which should be reported in the provider's own issue tracker."},"type":"diagnostic"}
Operation failed: failed running terraform apply (exit 1)
Create an elasticache cluster and create another resource that depends on the value of cache_nodes. Change the number of cache nodes and the TF plan will fail to apply.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.9.5
AWS Provider Version
5.77.0
Affected Resource(s)
Expected Behavior
The
cache_nodes
value should be computed after the apply occurs so that other resources depending on it can enact on those.Actual Behavior
The
cache_nodes
show no change during a TF Plan and will fail during a TF apply.The error is produced when
num_cache_nodes
foraws_elasticache_cluster
is changed and thecache_nodes
is used elsewhere in another resource.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Create an elasticache cluster and create another resource that depends on the value of
cache_nodes
. Change the number of cache nodes and the TF plan will fail to apply.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None