@@ -12,20 +12,6 @@ locals {
12
12
# EKS Module
13
13
# ###############################################################################
14
14
15
- data "aws_eks_cluster" "cluster" {
16
- name = module. eks . cluster_id
17
- }
18
-
19
- data "aws_eks_cluster_auth" "cluster" {
20
- name = module. eks . cluster_id
21
- }
22
-
23
- provider "kubernetes" {
24
- host = data. aws_eks_cluster . cluster . endpoint
25
- cluster_ca_certificate = base64decode (data. aws_eks_cluster . cluster . certificate_authority [0 ]. data )
26
- token = data. aws_eks_cluster_auth . cluster . token
27
- }
28
-
29
15
# Based on the official aws-node-termination-handler setup guide at https://github.com/aws/aws-node-termination-handler#infrastructure-setup
30
16
31
17
provider "helm" {
@@ -259,6 +245,23 @@ module "eks" {
259
245
}
260
246
}
261
247
248
+ # ###############################################################################
249
+ # Kubernetes provider configuration
250
+ # ###############################################################################
251
+ data "aws_eks_cluster" "cluster" {
252
+ name = module. eks . cluster_id
253
+ }
254
+
255
+ data "aws_eks_cluster_auth" "cluster" {
256
+ name = module. eks . cluster_id
257
+ }
258
+
259
+ provider "kubernetes" {
260
+ host = data. aws_eks_cluster . cluster . endpoint
261
+ cluster_ca_certificate = base64decode (data. aws_eks_cluster . cluster . certificate_authority [0 ]. data )
262
+ token = data. aws_eks_cluster_auth . cluster . token
263
+ }
264
+
262
265
# ###############################################################################
263
266
# Supporting Resources
264
267
# ###############################################################################
0 commit comments