Skip to content

Commit de91533

Browse files
authored
Update eks k8s auth to use json output (#631)
1 parent bf1a10c commit de91533

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

examples/eks/eks_cluster_readonly/castai.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ provider "helm" {
1616
api_version = "client.authentication.k8s.io/v1beta1"
1717
command = "aws"
1818
# This requires the awscli to be installed locally where Terraform is executed.
19-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region]
19+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region, "--output", "json"]
2020
}
2121
}
2222
}

examples/eks/eks_cluster_with_security/providers.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ provider "kubernetes" {
1616
api_version = "client.authentication.k8s.io/v1beta1"
1717
command = "aws"
1818
# This requires the awscli to be installed locally where Terraform is executed
19-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region]
19+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region, "--output", "json"]
2020
}
2121
}
2222

@@ -28,7 +28,7 @@ provider "helm" {
2828
api_version = "client.authentication.k8s.io/v1beta1"
2929
command = "aws"
3030
# This requires the awscli to be installed locally where Terraform is executed.
31-
args = ["eks", "get-token", "--cluster-name", var.cluster_name, "--region", var.cluster_region, "--profile", var.profile]
31+
args = ["eks", "get-token", "--cluster-name", var.cluster_name, "--region", var.cluster_region, "--profile", var.profile, "--output", "json"]
3232
}
3333
}
3434
}

examples/eks/eks_cluster_with_security_runtime_rules/providers.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ provider "kubernetes" {
1616
api_version = "client.authentication.k8s.io/v1beta1"
1717
command = "aws"
1818
# This requires the awscli to be installed locally where Terraform is executed
19-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region]
19+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region, "--output", "json"]
2020
}
2121
}
2222

@@ -28,7 +28,7 @@ provider "helm" {
2828
api_version = "client.authentication.k8s.io/v1beta1"
2929
command = "aws"
3030
# This requires the awscli to be installed locally where Terraform is executed.
31-
args = ["eks", "get-token", "--cluster-name", var.cluster_name, "--region", var.cluster_region, "--profile", var.profile]
31+
args = ["eks", "get-token", "--cluster-name", var.cluster_name, "--region", var.cluster_region, "--profile", var.profile, "--output", "json"]
3232
}
3333
}
3434
}

examples/eks/eks_clusters/providers.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ provider "kubernetes" {
1010
api_version = "client.authentication.k8s.io/v1beta1"
1111
command = "aws"
1212
# This requires the awscli to be installed locally where Terraform is executed
13-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region]
13+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region, "--output", "json"]
1414
}
1515
}
1616

@@ -27,7 +27,7 @@ provider "helm" {
2727
api_version = "client.authentication.k8s.io/v1beta1"
2828
command = "aws"
2929
# This requires the awscli to be installed locally where Terraform is executed.
30-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region]
30+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name, "--region", var.cluster_region, "--output", "json"]
3131
}
3232
}
3333
}

0 commit comments

Comments
 (0)