After importing an existing AWS ElastiCache for Redis, terraform wants to recreate it. This is caused by the "security_group_names" parameter. The other options in my template match the existing resource.
-/+ resource "aws_elasticache_replication_group" "default" {
~ arn = "arn:aws:elasticache:us-east-1:276741630740:replicationgroup:redis" -> (known after apply)
~ cluster_enabled = false -> (known after apply)
+ configuration_endpoint_address = (known after apply)
~ engine_version_actual = "6.2.6" -> (known after apply)
+ global_replication_group_id = (known after apply)
~ id = "redis" -> (known after apply)
~ member_clusters = [
- "redis-001",
] -> (known after apply)
~ num_node_groups = 1 -> (known after apply)
~ primary_endpoint_address = "redis.6jpnqy.ng.0001.use1.cache.amazonaws.com" -> (known after apply)
~ reader_endpoint_address = "redis-ro.6jpnqy.ng.0001.use1.cache.amazonaws.com" -> (known after apply)
~ replicas_per_node_group = 0 -> (known after apply)
+ security_group_names = (known after apply) # forces replacement
tags = {
"Name" = "redis"
}
- user_group_ids = [] -> null
# (21 unchanged attributes hidden)
}
By adding to the resource 'resource "aws_elasticache_replication_group" "default"' in the module
Describe the Bug
After importing an existing AWS ElastiCache for Redis, terraform wants to recreate it. This is caused by the "security_group_names" parameter. The other options in my template match the existing resource.
By adding to the resource 'resource "aws_elasticache_replication_group" "default"' in the module
it works great and Terraform doesn't find any changes.
The module does not support the "security_group_names" parameter
Expected Behavior
No changes. Your infrastructure matches the configuration.
Steps to Reproduce
terraform import 'module.redis-cluster["elasticache-redis"].aws_elasticache_replication_group.default[0]' elasticache-redis
Screenshots
No response
Environment
Module version = "0.53.0" Terraform version = "1.5.0" Provider version = "5.21.0"
Additional Context
No response