sl1pm4t / k2tf

Kubernetes YAML to Terraform HCL converter
Mozilla Public License 2.0
1.17k stars 108 forks source link

Add reverse functionality #42

Closed matttrach closed 4 years ago

matttrach commented 4 years ago

It would be cool to have a way to create k8 configs from Terraform resources.

This would allow k8 admins who do not have a lot of Terraform experience to review what the Terraform provider was going to do in the planning stage in k8 terms.

We could also use this to lint the k8 output and further verify our Terraform output.

sl1pm4t commented 4 years ago

Hi @matttrach - I've had similar thoughts about this too, but I think it makes most sense to put that kind of functionality into the Terraform Kubernetes provider. To convert a Terraform resource back into a K8S object, k2tf would have to be able to fully process the Terraform resource graph, render templates, interpolate variables etc. - all of which Terraform + the provider can already do.