Subnet Group 생성

Elasticache Subnet Group생성

  • Elasticache 서비스를 위한 Subnet Group을 생성합니다.

  • VPC에서 생성했던 db private subnet 을 사용하여 DB subnet을 생성합니다.

  • VPC마다 하나씩 생성해야 합니다.

vim terraform/databases/dayone-prod/dayonep_apnortheast2/elasticache_subnet.tf
# Elasticache Subnet Group
# Subnet group will be created to DB Private subnets
resource "aws_elasticache_subnet_group" "default" {
  name = "subnets-${data.terraform_remote_state.vpc.outputs.shard_id}"
  description = "The subnets used for elasticache deployments"
  subnet_ids = data.terraform_remote_state.vpc.outputs.db_private_subnets
}

결과 확인

Last updated