Skip to content

Instantly share code, notes, and snippets.

@shmileee
Created April 30, 2022 14:08
Show Gist options
  • Save shmileee/385cbe78143d878b1947768cd9350892 to your computer and use it in GitHub Desktop.
Save shmileee/385cbe78143d878b1947768cd9350892 to your computer and use it in GitHub Desktop.
provider "aws" {
region = "eu-west-1"
assume_role {
role_arn = var.role_arn != "" ? var.role_arn : null
}
}
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
token = data.aws_eks_cluster_auth.cluster.token
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
}
data "aws_eks_cluster" "cluster" {
name = module.eks.cluster_id
}
data "aws_eks_cluster_auth" "cluster" {
name = module.eks.cluster_id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment