Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-vpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-vpc
Commits
ef915dc8
Commit
ef915dc8
authored
Jun 13, 2019
by
Anton Babenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated VPC endpoint example (fixed #249)
parent
5b3e48d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
main.tf
examples/issue-224-vpcendpoint-apigw/main.tf
+20
-5
No files found.
examples/issue-224-vpcendpoint-apigw/main.tf
View file @
ef915dc8
...
@@ -2,24 +2,39 @@ provider "aws" {
...
@@ -2,24 +2,39 @@ provider "aws" {
region
=
"us-east-1"
region
=
"us-east-1"
}
}
data
"aws_security_group"
"default"
{
#################
name
=
"default"
# Security group
#################
module
"http_sg"
{
source
=
"terraform-aws-modules/security-group/aws//modules/http-80"
version
=
"~> 3.0"
name
=
"http-sg"
description
=
"Security group with HTTP ports open for everybody (IPv4 CIDR), egress ports are all world open"
vpc_id
=
module
.
vpc
.
vpc_id
vpc_id
=
module
.
vpc
.
vpc_id
ingress_cidr_blocks
=
[
"0.0.0.0/0"
]
}
}
######
# VPC
######
module
"vpc"
{
module
"vpc"
{
source
=
"../../"
source
=
"../../"
name
=
"
complete
-example"
name
=
"
vpcendpoint
-example"
cidr
=
"10.15.0.0/16"
cidr
=
"10.15.0.0/16"
azs
=
[
"us-east-1a"
]
azs
=
[
"us-east-1a"
]
private_subnets
=
[
"10.15.1.0/24"
]
private_subnets
=
[
"10.15.1.0/24"
]
enable_dns_hostnames
=
true
enable_dns_support
=
true
# VPC endpoint for API gateway
# VPC endpoint for API gateway
enable_apigw_endpoint
=
true
enable_apigw_endpoint
=
true
apigw_endpoint_security_group_ids
=
[
data
.
aws_security_group
.
default
.
id
]
apigw_endpoint_security_group_ids
=
[
module
.
http_sg
.
this_security_group_
id
]
apigw_endpoint_private_dns_enabled
=
true
apigw_endpoint_private_dns_enabled
=
true
tags
=
{
tags
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment