From dbe798adb5dda9e6b46464a385ca2a8a51f539a6 Mon Sep 17 00:00:00 2001 From: Allen Lyons Date: Wed, 10 Aug 2022 13:47:46 -0400 Subject: [PATCH] some tf fixes --- main.tf | 6 +++--- outputs.tf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 9328c8d..fc2f5b5 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,7 @@ resource "aws_security_group" "redis" { vpc_id = var.vpc_id - tags { + tags = { Name = var.tag_name environment = var.tag_environment team = var.tag_team @@ -14,7 +14,7 @@ resource "aws_security_group" "redis" { resource "aws_elasticache_subnet_group" "default" { name = "subnet-group-${var.tag_team}-${var.tag_application}-${var.tag_environment}" description = "Private subnets for the ElastiCache instances: ${var.tag_team} ${var.tag_application} ${var.tag_environment}" - subnet_ids = "${split(",", var.private_subnet_ids)}" + subnet_ids = split(",", var.private_subnet_ids) } resource "aws_elasticache_cluster" "redis" { @@ -29,7 +29,7 @@ resource "aws_elasticache_cluster" "redis" { subnet_group_name = aws_elasticache_subnet_group.default.name security_group_ids = [aws_security_group.redis.id] - tags { + tags = { Name = var.tag_name environment = var.tag_environment team = var.tag_team diff --git a/outputs.tf b/outputs.tf index 1ac9508..10097ab 100644 --- a/outputs.tf +++ b/outputs.tf @@ -11,5 +11,5 @@ output "port" { } output "endpoint" { - value = "${join(":", list(aws_elasticache_cluster.redis.cache_nodes.0.address, aws_elasticache_cluster.redis.cache_nodes.0.port))}" + value = "${aws_elasticache_cluster.redis.cache_nodes[0].address}:${aws_elasticache_cluster.redis.cache_nodes[0].port}" }