0

I want to use EFS in my EKS cluster. I'm following this eks workshop.

I need to deploy EFS CSI Driver using kustomize:

kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.0"

What's the equivalent of the above command in terraform?

Is it something like this?

terraform {
  required_providers {
    kustomization = {
      source  = "kbst/kustomize"
      version = "v0.2.0-beta.3"
    }
  }
  required_version = ">= 0.12"
}

provider "kustomization" {}

data "kustomization" "test" {
  provider = kustomization

  path = "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.0"
}

resource "kustomization_resource" "test" {
  provider = kustomization

  for_each = data.kustomization.test.ids

  manifest = data.kustomization.test.manifests[each.value]
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.