-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
49 lines (38 loc) · 999 Bytes
/
main.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module "vpc" {
source = "./modules/vpc"
vpc_cidr = var.vpc_cidr
env = var.env
az = var.az
public_subnets = var.public_subnets
private_subnets = var.private_subnets
eks_name = var.eks_name
eks_version = var.eks_version
}
module "eks" {
source = "./modules/eks"
eks_name = var.eks_name
eks_version = var.eks_version
env = var.env
subnet_id = {
value = module.vpc.private_subnet_ids # Accessing the output from the VPC module
}
vpcID = module.vpc.vpcID
}
module "iam" {
source = "./modules/iam"
eks_cluster_name = module.eks.cluster_name
env = var.env
}
module "cloudwatch" {
source = "./modules/cloudwatch"
eks_cluster_name = module.eks.cluster_name
}
terraform {
backend "s3" {
bucket = "cloud-design"
key = "workspace/terraform.tfstate"
region = "eu-north-1"
dynamodb_table = "terraform-state-lock"
encrypt = true
}
}