aws_elasticache_replication_group: unable to import without destroying the cluster #16141
Labels
bug
Addresses a defect in current functionality.
service/elasticache
Issues and PRs that pertain to the elasticache service.
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
After applying this configuration, I tried to remove it from the state, then re-import and plan. I expected the plan to do nothing.
Actual Behavior
After
state rm
andimport
, the plan reads:On top of planning changes, the reason behind the forced replacement is not displayed. After digging a bit, we found out that the
auth_token
was set tonull
in the imported state. Manually editing theauth_token
value in the state file did the trick and made the plan clean again (i.e. planningNo changes
).Steps to Reproduce
terraform apply
terraform rm state aws_elasticache_replication_group.my_cluster
terraform import aws_elasticache_replication_group.my_cluster my-cluster
terraform plan
The text was updated successfully, but these errors were encountered: