-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add new VPC endpoints to satisfy Security Hub.
- Loading branch information
1 parent
5c87912
commit b2b8c4b
Showing
4 changed files
with
46 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
data "aws_availability_zones" "available" { | ||
state = "available" | ||
} | ||
|
||
# VPC endpoints don't have load balancers in every availability zone, so we need | ||
# to lookup the supported availability zones and use them to filter our subnets. | ||
data "aws_vpc_endpoint_service" "services" { | ||
for_each = local.interface_endpoint_services | ||
|
||
service = each.value | ||
} | ||
|
||
data "aws_subnets" "endpoints" { | ||
for_each = data.aws_vpc_endpoint_service.services | ||
|
||
filter { | ||
name = "subnet-id" | ||
values = module.vpc.private_subnets | ||
} | ||
|
||
filter { | ||
name = "availability-zone" | ||
values = each.value.availability_zones | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters