Skip to content

Commit

Permalink
use data
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 18, 2024
1 parent 6c4db94 commit ded4ea0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lab/us-gov-east-1/vpc/mcmCluster/eks-config/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@


provider "aws" {
profile = var.profile
region = var.region
}

data "aws_eks_cluster" "cluster" {
name = var.cluster_name
}

data "aws_eks_cluster_auth" "cluster" {
name = var.cluster_name
}

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
}

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
}
}

0 comments on commit ded4ea0

Please sign in to comment.