Skip to content

Commit

Permalink
Fix subnets assigned to interface VPC endpoints (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <[email protected]>
  • Loading branch information
jimright authored Aug 29, 2023
1 parent e83dddb commit 0eb5f7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/terraform-cdp-aws-pre-reqs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ resource "aws_vpc_endpoint" "interface_endpoints" {
vpc_endpoint_type = "Interface"
private_dns_enabled = true

subnet_ids = concat(local.public_subnet_ids, local.private_subnet_ids)
subnet_ids = var.deployment_template == "public" ? local.public_subnet_ids : local.private_subnet_ids
security_group_ids = [aws_security_group.cdp_endpoint_sg[0].id]

tags = merge(local.env_tags, { Name = "${var.env_prefix}-${each.key}-interface-endpoint" })
Expand All @@ -215,7 +215,7 @@ resource "aws_vpc_endpoint" "s3_global_interface_endpoint" {
vpc_endpoint_type = "Interface"
private_dns_enabled = true

subnet_ids = concat(local.public_subnet_ids, local.private_subnet_ids)
subnet_ids = var.deployment_template == "public" ? local.public_subnet_ids : local.private_subnet_ids
security_group_ids = [aws_security_group.cdp_endpoint_sg[0].id]

tags = merge(local.env_tags, { Name = "${var.env_prefix}-s3-global-interface-endpoint" })
Expand Down

0 comments on commit 0eb5f7f

Please sign in to comment.