-
Notifications
You must be signed in to change notification settings - Fork 1
/
terraform.tf
34 lines (30 loc) · 1.06 KB
/
terraform.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
terraform {
required_version = "~> 1.1.3" # which means ">= 0.12.24" and "< 0.13"
backend "s3" {}
required_providers {
aws = "~> 4.3.0"
kubernetes = "~> 2.8.0"
random = "~> 3.1.0"
helm = "~> 2.4.1"
local = "~> 2.1.0"
}
}
provider "aws" {
region = var.aws_region
}
# get EKS authentication for being able to manage k8s objects from terraform
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
# load_config_file = false
}
provider "helm" {
kubernetes {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
# load_config_file = false
}
}
data "aws_caller_identity" "current" {} # used for accesing Account ID and ARN