-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tf
31 lines (25 loc) · 837 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
# to use s3 backend
# s3 bucket is configured at command line
terraform {
backend "s3" {}
}
# setup terraform aws provider to create resources in your desired aws region
provider "aws" {
region = var.region
# uncomment and substitute the arn if you are using assume role to talk to your aws account
# read the official terraform aws provider and aws documentation on how to achieve this
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration
# assume_role {
# role_arn = "<aws iam role arn>"
# }
}
# invoke cluster module which creates vpc, subnets and eks cluter
module "cluster" {
source = "./cluster"
# vpc details
vpc_name = var.vpc_name
vpc_cidr = var.vpc_cidr
# eks details
eks_cluster_name = var.cluster_name
k8s_version = var.k8s_version
}