Skip to content

Commit

Permalink
:fix elasticcache.tf with one node
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwupark committed Feb 16, 2024
1 parent 0046cd2 commit 46328e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions elasticcache.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@ resource "aws_elasticache_subnet_group" "example" {

resource "aws_elasticache_replication_group" "elasticache_cluster" {
replication_group_id = "tf-redis-cluster"
description = "example description"
description = "MeMe-ElastiCache"
node_type = "cache.t2.micro"
port = 6379
parameter_group_name = "default.redis7.cluster.on"
automatic_failover_enabled = true
parameter_group_name = "default.redis7"
engine_version = "7.1"
subnet_group_name = aws_elasticache_subnet_group.example.name
security_group_ids = [aws_security_group.elasticache_security.id]
num_node_groups = 2
replicas_per_node_group = 1
num_cache_clusters = 1
}


output "elasticcache_endpoint" { # cache cluster의 writer 인스턴스 endpoint 추출 (mysql 설정 및 Three-tier 연동파일에 정보 입력 필요해서 추출)
output "elasticache_endpoint" { # cache cluster의 writer 인스턴스 endpoint 추출 (mysql 설정 및 Three-tier 연동파일에 정보 입력 필요해서 추출)
value = aws_elasticache_replication_group.elasticache_cluster.configuration_endpoint_address # 해당 추출값은 terraform apply 완료 시 또는 terraform output rds_writer_endpoint로 확인 가능
}

0 comments on commit 46328e8

Please sign in to comment.