Last active
February 27, 2021 13:49
-
-
Save NassK/370dbabef61e05345fd088013a9d1fa3 to your computer and use it in GitHub Desktop.
step_4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 4: Configuring the Kubectl CLI | |
resource "null_resource" "generate_kubeconfig" { # Generate a kubeconfig (needs aws cli >=1.62 and kubectl) | |
provisioner "local-exec" { | |
command = "aws eks update-kubeconfig --name ${var.cluster_name}" | |
} | |
depends_on = [aws_eks_cluster.cluster] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "region" { | |
description = "The AWS region" | |
default = "eu-west-1" | |
} | |
variable "cluster_name" { | |
description = "The name of the Amazon EKS cluster." | |
default = "my-eks-cluster" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment