Skip to content

Instantly share code, notes, and snippets.

@carlosescura
Last active September 19, 2020 06:42
Show Gist options
  • Save carlosescura/2b7917b3d60bbab4d65a520dc399025b to your computer and use it in GitHub Desktop.
Save carlosescura/2b7917b3d60bbab4d65a520dc399025b to your computer and use it in GitHub Desktop.
data "aws_region" current {}
data "aws_eks_cluster" "cluster" {
name = var.cluster_id
}
data "aws_eks_cluster_auth" "cluster" {
name = var.cluster_id
}
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
load_config_file = false
version = "1.10.0"
}
provider "helm" {
kubernetes {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
load_config_file = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment