Skip to content

ElastiCache for Redis replication groups should have automatic failover enabled

This control checks if ElastiCache for Redis replication groups have automatic failover enabled. This control fails if automatic failover isn't enabled for a Redis replication group.

How to fix

Attribute automatic_failover_enabled of aws_elasticache_replication_group must be true.

Implementation options

Choose the option that matches how you manage Terraform. All options satisfy this control.

Option 1: Open source module (terraform-aws-modules)

If you use terraform-aws-modules/elasticache/aws, configure the required module inputs to satisfy this control. You can later migrate to the compliance.tf module with minimal changes because it is compatible by design.

module "elasticache" {
  source  = "terraform-aws-modules/elasticache/aws"
  version = ">=1.0.0,<2.0.0"

  description          = "Redis cluster"
  engine               = "redis"
  engine_version       = "7.1"
  node_type            = "cache.t3.micro"
  num_cache_clusters   = 2
  replication_group_id = "abc123"
  subnet_ids           = []
  vpc_id               = ""

  automatic_failover_enabled = true
}

Option 2: Terraform AWS provider resources

If you manage resources directly, configure the relevant Terraform AWS provider resources to meet this control. See docs for the resources involved: aws_elasticache_replication_group.

resource "aws_elasticache_replication_group" "this" {
  at_rest_encryption_enabled = true
  auth_token                 = "PofixExampleAuthToken32CharsLng"
  description                = "pofix example replication group"
  replication_group_id       = "pofix-example"
  snapshot_retention_limit   = 15
  transit_encryption_enabled = true

  automatic_failover_enabled = true
}
Which option should I choose?
  • Compliance.tf module (recommended): controls enforced by default and mapped to frameworks.
  • Open source module (terraform-aws-modules): compatible by design with compliance.tf. Same variable names for an easy, low-change migration path when you are ready.
  • Terraform AWS provider resources: manage Terraform resources directly.

Tool mappings

Use these identifiers to cross-reference this control across tools, reports, and evidence.

  • Compliance.tf (CTF) Control: elasticache_replication_group_auto_failover_enabled

  • AWS Config Managed Rule: ELASTICACHE_REPL_GRP_AUTO_FAILOVER_ENABLED

  • Checkov Check: CKV2_AWS_50

  • Powerpipe Control: aws_compliance.control.elasticache_replication_group_auto_failover_enabled