-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
46 lines (38 loc) · 1.4 KB
/
main.tf
File metadata and controls
46 lines (38 loc) · 1.4 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
provider "aws" {
region = var.region
}
# Networking module
module "networking" {
source = "./modules/networking"
region = var.region
vpc_cidr = var.vpc_cidr
vpc_name = var.vpc_name
availability_zones = var.availability_zones
allowed_cidr_blocks = var.allowed_cidr_blocks
}
# EKS module
module "eks" {
source = "./modules/eks"
cluster_name = var.cluster_name
cluster_version = var.cluster_version
vpc_id = module.networking.vpc_id
security_group_id = module.networking.eks_security_group_id
# Worker nodes private subnets
subnets = module.networking.private_subnet_ids
# EKS Control plane master private subnets
master_subnets = module.networking.master_private_subnet_ids
# Spot and On-demand instances for EKS worker nodes
spot_desired_capacity = var.spot_desired_capacity
spot_max_capacity = var.spot_max_capacity
spot_min_capacity = var.spot_min_capacity
spot_instance_type = var.spot_instance_type
on_demand_desired_capacity = var.on_demand_desired_capacity
on_demand_max_capacity = var.on_demand_max_capacity
on_demand_min_capacity = var.on_demand_min_capacity
on_demand_instance_type = var.on_demand_instance_type
key_name = var.key_name
}
output "load_balancer_arn" {
description = "Load Balancer ARN"
value = module.networking.app_lb_arn
}