forked from jnibrahim/tf-eks-fargate-tmpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
39 lines (35 loc) · 947 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
terraform {
required_version = "~>0.12.0"
}
provider "aws" {
version = "~> 2.44"
region = var.region
}
module "vpc" {
source = "./vpc"
name = var.name
environment = var.environment
cidr = var.cidr
private_subnets = var.private_subnets
public_subnets = var.public_subnets
availability_zones = var.availability_zones
}
module "eks" {
source = "./eks"
name = var.name
environment = var.environment
region = var.region
k8s_version = var.k8s_version
vpc_id = module.vpc.id
private_subnets = module.vpc.private_subnets
public_subnets = module.vpc.public_subnets
kubeconfig_path = var.kubeconfig_path
}
module "ingress" {
source = "./ingress"
name = var.name
environment = var.environment
region = var.region
vpc_id = module.vpc.id
cluster_id = module.eks.cluster_id
}