I am attempting to change the node type of Elasticache from older generation (cache.t2.) to newer generation (cache.t3.) using Terraform.
Able to modify the node types successfully for all of Memcached instances via terraform apply
, but unfortunately when I attempt to change the node type of Redis using terraform apply
the command reaches completion in just ~30s and no change is applied.
To apply the node types change I have to login to web console and click individual Redis instance & click modify and apply the pending changes and wait for it to complete. This is manual work for me, I have to do this for 100 Redis instances.
Is it possible to force terraform to apply the pending changes for Redis on Elasticache?.
2
Answers
For me Terraform's apply immediately is not working so I am using the
aws-cli
to apply changes immediately.The below shell commands will identify the pending changes on all clusters and submit apply immediately on each cluster instance.
Did you try to argument https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster#apply_immediately ?
Maybe another solution is to run a bash script with aws-cli
--apply-immediately
option https://docs.aws.amazon.com/cli/latest/reference/elasticache/modify-cache-cluster.html