data.tf
data "aws_eks_cluster" "cluster" {
name = "${var.env}-${var.cluster_name}"
}
data "aws_eks_cluster_auth" "auth" {
name = "${var.env}-${var.cluster_name}"
}
provider.tf
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.auth.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.auth.token
}
}
Install the chart
resource "helm_release" "csi_secrets_store" {
name = "csi-secrets-store"
repository = "https://kubernetes-sigs.github.io/secrets-store-csi-driver/charts"
chart = "secrets-store-csi-driver"
namespace = "kube-system"
set {
name = "syncSecret.enabled"
value = "true"
}
}
Top comments (0)