Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit a14bc6a

Browse files
authored
Merge pull request #121 from saiteja313/master
Failure to provision managed worker nodes as call to kubernetes provider fails to find current kubeconfig
2 parents a3e150a + eb999db commit a14bc6a

File tree

1 file changed

+16
-0
lines changed
  • demo/infrastructure/modules/amazon-cluster

1 file changed

+16
-0
lines changed

demo/infrastructure/modules/amazon-cluster/cluster.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,19 @@ module "eks" {
114114

115115
worker_additional_security_group_ids = ["${aws_security_group.all_worker_mgmt.id}"]
116116
}
117+
118+
data "aws_eks_cluster" "cluster" {
119+
name = module.eks.cluster_id
120+
}
121+
122+
data "aws_eks_cluster_auth" "cluster" {
123+
name = module.eks.cluster_id
124+
}
125+
126+
provider "kubernetes" {
127+
host = data.aws_eks_cluster.cluster.endpoint
128+
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
129+
token = data.aws_eks_cluster_auth.cluster.token
130+
load_config_file = false
131+
version = "~> 1.10"
132+
}

0 commit comments

Comments
 (0)