-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.tf
More file actions
45 lines (38 loc) · 1.15 KB
/
Copy pathbase.tf
File metadata and controls
45 lines (38 loc) · 1.15 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
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "5.21.0"
name = "vpc"
cidr = "10.0.0.0/16"
azs = ["eu-central-1a", "eu-central-1b"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"]
enable_nat_gateway = true
map_public_ip_on_launch = true
}
module "eks_cluster" {
source = "cloudposse/eks-cluster/aws"
version = "4.6.0"
kubernetes_version = "1.31"
oidc_provider_enabled = true
access_entry_map = {
(data.aws_iam_session_context.current.issuer_arn) = {
access_policy_associations = {
ClusterAdmin = {}
}
}
}
name = "eks"
region = data.aws_region.this.id
subnet_ids = module.vpc.public_subnets
}
module "eks_node_group" {
source = "cloudposse/eks-node-group/aws"
version = "3.3.0"
cluster_name = module.eks_cluster.eks_cluster_id
instance_types = ["t3.medium"]
subnet_ids = module.vpc.public_subnets
min_size = 1
desired_size = 1
max_size = 2
depends_on = [module.eks_cluster.kubernetes_config_map_id]
}