By DeepSource

Use of default AWS elasticache parameter group TF-L0036


You can modify parameter values in a custom parameter group, but you can't change the parameter values in a default parameter group. It is recommended to create a new parameter group, and change the parameter_group_name to that.

Bad example

resource "aws_elasticache_cluster" "redis" {
  cluster_id           = "app"
  engine               = "redis"
  engine_version       = "3.2.4"
  maintenance_window   = "sun:00:00-sun:06:00"
  node_type            = "cache.m4.large"
  num_cache_nodes      = 1
  port                 = 6379
  parameter_group_name = "default.redis3.2" // default paramete group!
  subnet_group_name    = "app-subnet-group"
  security_group_ids   = ["${aws_security_group.redis.id}"]