Commit 407bb010 authored by A-Gordon's avatar A-Gordon

Added tags to subnets for cloud-provider option in K8S

parent b5570009
Pipeline #1620 passed with stage
in 16 seconds
......@@ -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}"
......@@ -52,6 +56,8 @@ resource "aws_subnet" "public" {
tags {
Name = "${var.name}.public.${element(var.availability_zones, count.index)}"
KubernetesCluster = "${var.kubernetes_cluster}"
"kubernetes.io/role/elb" = "kubernetes.io/role/elb"
}
}
......@@ -65,6 +71,8 @@ resource "aws_subnet" "private" {
tags {
Name = "${var.name}.private.${element(var.availability_zones, count.index)}"
KubernetesCluster = "${var.kubernetes_cluster}"
"kubernetes.io/role/internal-elb" = "kubernetes.io/role/internal-elb"
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment