-
Notifications
You must be signed in to change notification settings - Fork 4
/
sgroup-eks-cluster.tf
30 lines (26 loc) · 1.01 KB
/
sgroup-eks-cluster.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
resource "aws_security_group" "tf-eks-master" {
name = "sgr-${var.region_id}-${var.environment}-${var.cost_centre}-vpc${var.vpc_seq_id}-${var.app_service}Master-${var.seq_id}"
description = "EKS Cluster security group."
vpc_id = data.aws_vpc.vpc.id
tags = merge(
var.common_tags,
local.generic_tags,
{
Name = "sgr-${var.region_id}-${var.environment}-${var.cost_centre}-vpc${var.vpc_seq_id}-${var.app_service}Master-${var.seq_id}"
AppRole = "network"
}
)
}
resource "aws_security_group" "tf-eks-worker-node" {
name = "sgr-${var.region_id}-${var.environment}-${var.cost_centre}-vpc${var.vpc_seq_id}-${var.app_service}Wnode-${var.seq_id}"
description = "EKS worker node security group."
vpc_id = data.aws_vpc.vpc.id
tags = merge(
var.common_tags,
local.generic_tags,
{
Name = "sgr-${var.region_id}-${var.environment}-${var.cost_centre}-vpc${var.vpc_seq_id}-${var.app_service}Master-${var.seq_id}"
AppRole = "network"
}
)
}