forked from nimbux911/terraform-aws-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.tf
43 lines (36 loc) · 983 Bytes
/
provider.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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">=3.0, ~> 4.20"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2.11"
}
helm = {
source = "hashicorp/helm"
version = "2.5.1"
}
}
}
provider "kubernetes" {
host = aws_eks_cluster.main.endpoint
cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data)
exec {
api_version = var.k8s_auth_api
args = ["eks", "get-token", "--cluster-name", var.cluster_name]
command = "aws"
}
}
provider "helm" {
kubernetes {
host = aws_eks_cluster.main.endpoint
cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data)
exec {
api_version = var.k8s_auth_api
args = ["eks", "get-token", "--cluster-name", var.cluster_name]
command = "aws"
}
}
}