We have all our Kubernetes applications defined in Terraform using the terraform-kubernetes-provider. We're trying to move to a GitOps approach (using ArgoCD) but can't find a way to get Terraform to provide the raw manifest files WITHOUT applying them in the Kubernetes cluster.

I can easily get the manifest files manually AFTER apply with kubectl get deployment -oyaml >> raw-manifest-files.yaml but I'd prefer to do this within Terraform to save time converting.

Is there anyway I can get the raw manifest values via some Terraform command or from the state file?

Or is there any easy way to convert Terraform Kubernetes resources to Kubernetes manifest files (or even helm charts)?


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.