Skip to content

Commit

Permalink
Merge pull request #34 from telia-oss/add-name-tags-to-vpc-endpoints
Browse files Browse the repository at this point in the history
Added name tags to the vpc endpoints
  • Loading branch information
larstobi authored Jun 15, 2021
2 parents 11f840f + 57ad116 commit 552714d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,23 @@ resource "aws_vpc_endpoint" "s3" {
vpc_id = aws_vpc.main.id
route_table_ids = compact(concat(aws_route_table.private.*.id, aws_route_table.public.*.id))
policy = var.s3_endpoint_policy
tags = merge(
var.tags,
{
"Name" = "${var.name_prefix}-s3"
},
)
}

resource "aws_vpc_endpoint" "dynamodb" {
service_name = "com.amazonaws.${data.aws_region.current.name}.dynamodb"
vpc_id = aws_vpc.main.id
route_table_ids = compact(concat(aws_route_table.private.*.id, aws_route_table.public.*.id))
policy = var.dynamodb_endpoint_policy
}
tags = merge(
var.tags,
{
"Name" = "${var.name_prefix}-dynamodb"
},
)
}

0 comments on commit 552714d

Please sign in to comment.