-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
47 lines (39 loc) · 1.37 KB
/
main.tf
File metadata and controls
47 lines (39 loc) · 1.37 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module "cluster" {
source = "terraform-aws-modules/eks/aws"
version = "~> 20.0"
prefix_separator = ""
iam_role_name = var.name
cluster_security_group_name = var.name
cluster_security_group_description = "EKS cluster security group."
cluster_name = var.name
cluster_version = var.cluster_version
subnet_ids = var.subnet_ids
vpc_id = var.vpc_id
cluster_enabled_log_types = var.cluster_enabled_log_types
enable_irsa = true
cluster_endpoint_public_access = true
cluster_endpoint_private_access = true
cluster_encryption_config = {}
node_security_group_additional_rules = {
ingress_80 = {
description = "Allow port 80"
protocol = "tcp"
from_port = 80
to_port = 80
type = "ingress"
self = true
}
}
eks_managed_node_group_defaults = {
use_name_prefix = false
iam_role_name = var.name
iam_role_additional_policies = local.additional_iam_policies
additional_tags = {
"k8s.io/cluster-autoscaler/${var.name}" = "owned",
"k8s.io/cluster-autoscaler/enabled" = true
}
}
eks_managed_node_groups = local.node_groups
cluster_addons = var.cluster_addons
tags = local.tags
}