Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tf_mod_aws_vpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
steamhaus
tf_mod_aws_vpc
Commits
407bb010
Commit
407bb010
authored
Apr 10, 2017
by
A-Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tags to subnets for cloud-provider option in K8S
parent
b5570009
Pipeline
#1620
passed with stage
in 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
main.tf
main.tf
+10
-2
No files found.
main.tf
View file @
407bb010
...
...
@@ -31,6 +31,10 @@ variable "enable_dns_support" {
default
=
true
}
variable
"kubernetes_cluster"
{
description
=
"The name of the Kubernetes Cluster to tag the public and private subnets with, this is so that the cloud-provider function in Kubernetes can function."
}
resource
"aws_vpc"
"mod"
{
cidr_block
=
"
${
var
.
cidr
}
"
enable_dns_hostnames
=
"
${
var
.
enable_dns_hostnames
}
"
...
...
@@ -51,7 +55,9 @@ resource "aws_subnet" "public" {
map_public_ip_on_launch
=
true
tags
{
Name
=
"
${
var
.
name
}
.public.
${
element
(
var
.
availability_zones
,
count
.
index
)
}
"
Name
=
"
${
var
.
name
}
.public.
${
element
(
var
.
availability_zones
,
count
.
index
)
}
"
KubernetesCluster
=
"
${
var
.
kubernetes_cluster
}
"
"kubernetes.io/role/elb"
=
"kubernetes.io/role/elb"
}
}
...
...
@@ -64,7 +70,9 @@ resource "aws_subnet" "private" {
count
=
"
${
length
(
var
.
private_subnets
)
}
"
tags
{
Name
=
"
${
var
.
name
}
.private.
${
element
(
var
.
availability_zones
,
count
.
index
)
}
"
Name
=
"
${
var
.
name
}
.private.
${
element
(
var
.
availability_zones
,
count
.
index
)
}
"
KubernetesCluster
=
"
${
var
.
kubernetes_cluster
}
"
"kubernetes.io/role/internal-elb"
=
"kubernetes.io/role/internal-elb"
}
}
...
...
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