Skip to content

Commit

Permalink
Merge pull request #5 from turnerlabs/tf-fixes
Browse files Browse the repository at this point in the history
some tf fixes
  • Loading branch information
awlawl committed Aug 10, 2022
2 parents 91fade2 + dbe798a commit 2b08337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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" {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

0 comments on commit 2b08337

Please sign in to comment.