-
Notifications
You must be signed in to change notification settings - Fork 29
/
main.tf
47 lines (38 loc) · 1.4 KB
/
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
provider "aws" {
region = var.aws_region
}
provider "kubernetes" {
host = module.eks_blueprints.eks_cluster_endpoint
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}
provider "helm" {
kubernetes {
host = module.eks_blueprints.eks_cluster_endpoint
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}
}
data "aws_eks_cluster_auth" "this" {
name = module.eks_blueprints.eks_cluster_id
}
# Update for remote backend S3 bucket, region, and key
terraform {
backend "s3" {}
}
################################################################################
# Common Locals
################################################################################
locals {
name = var.environment.inputs.cluster_name
tags = {
Name = var.environment.inputs.cluster_name
GithubRepo = "github.com/aws-samples/eks-blueprints-for-proton"
}
}
################################################################################
# Common Data
################################################################################
data "aws_availability_zones" "available" {}
data "aws_partition" "current" {}
data "aws_caller_identity" "current" {}