hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

Cannot create Elasticache Redis 6.x on r6gd instance class #21991

Closed rajmaniar closed 2 years ago

rajmaniar commented 2 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.11
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.63.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/mongodb/mongodbatlas v1.0.1

Affected Resource(s)

Expected Behavior

Create redis 6.2.5 resource on cache.r6gd.xlarge

Actual Behavior

Terraform will perform the following actions:

  # module.redis_data_tier_cluster.aws_elasticache_replication_group.elasticache_replication_group will be created
  + resource "aws_elasticache_replication_group" "elasticache_replication_group" {
      + apply_immediately              = true
      + arn                            = (known after apply)
      + at_rest_encryption_enabled     = (known after apply)
      + auto_minor_version_upgrade     = true
      + automatic_failover_enabled     = true
      + cluster_enabled                = (known after apply)
      + configuration_endpoint_address = (known after apply)
      + engine                         = "redis"
      + engine_version                 = "6.2.5"
      + engine_version_actual          = (known after apply)
      + global_replication_group_id    = (known after apply)
      + id                             = (known after apply)
      + maintenance_window             = "sun:11:30-sun:13:30"
      + member_clusters                = (known after apply)
      + multi_az_enabled               = false
      + node_type                      = "cache.r6gd.xlarge"
      + notification_topic_arn         = "<ID>"
      + number_cache_clusters          = (known after apply)
      + parameter_group_name           = "default.redis6.x.cluster.on"
      + port                           = 6379
      + primary_endpoint_address       = (known after apply)
      + reader_endpoint_address        = (known after apply)
      + replication_group_description  = "Redis cluster to test data tiering"
      + replication_group_id           = "redis-data-tier-stage"
      + security_group_ids             = [
          + "sg-<ID>",
          + "sg-<ID>",
        ]
      + security_group_names           = (known after apply)
      + snapshot_retention_limit       = 5
      + snapshot_window                = "09:00-11:00"
      + subnet_group_name              = "redis-data-tier-stage-cache-subnet-group"
      + tags                           = {
          + "Env" = "stage"
        }
      + tags_all                       = {
          + "Env" = "stage"
        }
      + transit_encryption_enabled     = (known after apply)

      + cluster_mode {
          + num_node_groups         = 1
          + replicas_per_node_group = 1
        }
    }

module.redis_data_tier_cluster.aws_elasticache_replication_group.elasticache_replication_group: Creating...
â•·
│ Error: error creating ElastiCache Replication Group (redis-data-tier-stage): InvalidParameterCombination: When using the cache.r6gd.xlarge node type, you must enable data tiering.
│   status code: 400, request id....
│ 

Steps to Reproduce

  1. Create new elasticache cluster:
    1. engine = "redis"
    2. engine_version = "6.2.5
      1. node_type = "cache.r6gd.xlarge"
  2. terraform apply

Important Factoids

References

siavashs commented 2 years ago

I'm looking into this.

siavashs commented 2 years ago

I opened a PR which simply adds the parameter. Alternatively we could check the provided node_type and automatically set the data_tiering_enabled to true but I avoided adding extra logic.

github-actions[bot] commented 2 years ago

This functionality has been released in v3.69.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. Thank you!

github-actions[bot] commented 2 years ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.