Skip to content

Commit 48fb317

Browse files
committed
Update provider configurations: replace deprecated API version and improve comments
1 parent 97a2478 commit 48fb317

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Terraform/1-provider.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
# Configure the AWS Provider
1+
# AWS Provider
22
provider "aws" {
33
region = "us-east-1"
44
}
55

6-
# Configure the Kubernetes Provider
6+
# Kubernetes Provider
77
provider "kubernetes" {
88
host = module.eks.cluster_endpoint
99
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
1010

1111
exec {
12-
api_version = "client.authentication.k8s.io/v1beta1"
12+
api_version = "client.authentication.k8s.io/v1" # use v1 (v1beta1 is deprecated)
1313
command = "aws"
1414
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
1515
}
1616
}
1717

18-
# Configure the Helm Provider
18+
# Helm Provider (latest version syntax)
1919
provider "helm" {
20-
kubernetes {
20+
kubernetes = {
2121
host = module.eks.cluster_endpoint
2222
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
2323

24-
exec {
25-
api_version = "client.authentication.k8s.io/v1beta1"
24+
exec = {
25+
api_version = "client.authentication.k8s.io/v1"
2626
command = "aws"
2727
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
2828
}
2929
}
3030
}
31-

0 commit comments

Comments
 (0)