Skip to content

Commit

Permalink
Merge pull request #1 from pgedara/PRODENG-2235
Browse files Browse the repository at this point in the history
PRODENG-2235 Tag security groups in launchpad-aws terraform module
  • Loading branch information
pgedara authored Jun 20, 2023
2 parents 481581d + 0135a99 commit 51eafb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions modules/master/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ resource "aws_security_group" "master" {
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
"kubernetes.io/cluster/${var.cluster_name}" = "owned"
}
}

locals {
Expand All @@ -34,8 +37,8 @@ resource "aws_instance" "mke_master" {
count = var.master_count

tags = tomap({
"Name" = "${var.cluster_name}-master-${count.index + 1}",
"Role" = "manager",
"Name" = "${var.cluster_name}-master-${count.index + 1}",
"Role" = "manager",
(var.kube_cluster_tag) = "shared"
})

Expand Down
7 changes: 5 additions & 2 deletions modules/worker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ resource "aws_security_group" "worker" {
name = "${var.cluster_name}-workers"
description = "mke cluster workers"
vpc_id = var.vpc_id
tags = {
"kubernetes.io/cluster/${var.cluster_name}" = "owned"
}
}

locals {
Expand All @@ -13,8 +16,8 @@ resource "aws_instance" "mke_worker" {
count = var.worker_count

tags = tomap({
"Name" = "${var.cluster_name}-worker-${count.index + 1}",
"Role" = "worker",
"Name" = "${var.cluster_name}-worker-${count.index + 1}",
"Role" = "worker",
(var.kube_cluster_tag) = "shared"
})

Expand Down

0 comments on commit 51eafb9

Please sign in to comment.