File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
examples/issue-224-vpcendpoint-apigw Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,39 @@ provider "aws" {
22 region = " us-east-1"
33}
44
5- data "aws_security_group" "default" {
6- name = " default"
7- vpc_id = module. vpc . vpc_id
5+ # ################
6+ # Security group
7+ # ################
8+ module "http_sg" {
9+ source = " terraform-aws-modules/security-group/aws//modules/http-80"
10+ version = " ~> 3.0"
11+
12+ name = " http-sg"
13+ description = " Security group with HTTP ports open for everybody (IPv4 CIDR), egress ports are all world open"
14+ vpc_id = module. vpc . vpc_id
15+
16+ ingress_cidr_blocks = [" 0.0.0.0/0" ]
817}
918
19+ # #####
20+ # VPC
21+ # #####
1022module "vpc" {
1123 source = " ../../"
1224
13- name = " complete -example"
25+ name = " vpcendpoint -example"
1426
1527 cidr = " 10.15.0.0/16"
1628
1729 azs = [" us-east-1a" ]
1830 private_subnets = [" 10.15.1.0/24" ]
1931
32+ enable_dns_hostnames = true
33+ enable_dns_support = true
34+
2035 # VPC endpoint for API gateway
2136 enable_apigw_endpoint = true
22- apigw_endpoint_security_group_ids = [data . aws_security_group . default . id ]
37+ apigw_endpoint_security_group_ids = [module . http_sg . this_security_group_id ]
2338 apigw_endpoint_private_dns_enabled = true
2439
2540 tags = {
You can’t perform that action at this time.
0 commit comments