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
33e8809f
Commit
33e8809f
authored
Feb 12, 2019
by
Michiel Dhadamus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to create ECR api and dkr endpoints
parent
8e2f50e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
main.tf
main.tf
+38
-0
variables.tf
variables.tf
+30
-0
No files found.
main.tf
View file @
33e8809f
...
...
@@ -367,6 +367,44 @@ resource "aws_vpc_endpoint_route_table_association" "public_s3" {
route_table_id
=
"
${
aws_route_table
.
public
.
id
}
"
}
##########################
# VPC Endpoint for ECR API
##########################
data
"aws_vpc_endpoint_service"
"ecr_api"
{
count
=
"
${
var
.
create_vpc
&&
var
.
enable_ecr_api_endpoint
?
1
:
0
}
"
service
=
"ecr.api"
}
resource
"aws_vpc_endpoint"
"ecr_api"
{
count
=
"
${
var
.
create_vpc
&&
var
.
enable_ecr_api_endpoint
?
1
:
0
}
"
vpc_endpoint_type
=
"Interface"
vpc_id
=
"
${
local
.
vpc_id
}
"
security_group_ids
=
[
"
${
var
.
ecr_api_endpoint_security_group_ids
}
"
]
service_name
=
"
${data
.
aws_vpc_endpoint_service
.
ecr_api
.
service_name
}
"
private_dns_enabled
=
"
${
var
.
ecr_api_endpoint_private_dns_enabled
}
"
}
##########################
# VPC Endpoint for ECR DKR
##########################
data
"aws_vpc_endpoint_service"
"ecr_dkr"
{
count
=
"
${
var
.
create_vpc
&&
var
.
enable_ecr_dkr_endpoint
?
1
:
0
}
"
service
=
"ecr.dkr"
}
resource
"aws_vpc_endpoint"
"ecr_dkr"
{
count
=
"
${
var
.
create_vpc
&&
var
.
enable_ecr_dkr_endpoint
?
1
:
0
}
"
vpc_endpoint_type
=
"Interface"
vpc_id
=
"
${
local
.
vpc_id
}
"
security_group_ids
=
[
"
${
var
.
ecr_dkr_endpoint_security_group_ids
}
"
]
service_name
=
"
${data
.
aws_vpc_endpoint_service
.
ecr_dkr
.
service_name
}
"
private_dns_enabled
=
"
${
var
.
ecr_dkr_endpoint_private_dns_enabled
}
"
}
############################
# VPC Endpoint for DynamoDB
############################
...
...
variables.tf
View file @
33e8809f
...
...
@@ -178,6 +178,36 @@ variable "enable_s3_endpoint" {
default
=
false
}
variable
"enable_ecr_api_endpoint"
{
description
=
"Should be true if you want to provision an ecr api endpoint to the VPC"
default
=
false
}
variable
"ecr_api_endpoint_private_dns_enabled"
{
description
=
"Whether or not to associate a private hosted zone with the specified VPC for ECR API endpoint"
default
=
false
}
variable
"ecr_api_endpoint_security_group_ids"
{
description
=
"The ID of one or more security groups to associate with the network interface for ECR API endpoint"
default
=
[]
}
variable
"enable_ecr_dkr_endpoint"
{
description
=
"Should be true if you want to provision an ecr dkr endpoint to the VPC"
default
=
false
}
variable
"ecr_dkr_endpoint_private_dns_enabled"
{
description
=
"Whether or not to associate a private hosted zone with the specified VPC for ECR DKR endpoint"
default
=
false
}
variable
"ecr_dkr_endpoint_security_group_ids"
{
description
=
"The ID of one or more security groups to associate with the network interface for ECR DKR endpoint"
default
=
[]
}
variable
"enable_ssm_endpoint"
{
description
=
"Should be true if you want to provision an SSM endpoint to the VPC"
default
=
false
...
...
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