-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprovider.tf
29 lines (25 loc) · 936 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
provider "aws" {
region = var.aws_region
}
data "aws_eks_cluster" "eks" {
depends_on = [module.eks]
name = module.eks.cluster_name
}
data "aws_eks_cluster_auth" "eks" {
depends_on = [module.eks]
name = module.eks.cluster_name
}
provider "kubernetes" {
host = data.aws_eks_cluster.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority.0.data) # needed by Helm provider to trust K8s API server
token = data.aws_eks_cluster_auth.eks.token
config_path = var.kubeconfig_path
}
provider "helm" {
kubernetes {
host = data.aws_eks_cluster.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.eks.token
config_path = var.kubeconfig_path
}
}