google cloud platform – How can I generate a Terraform configuration file from existing infrastructure?
I’m new to Terraform. I have what seems like a simple problem, but I’ve been unable to come up with a solution.
I have an existing project not managed by Terraform, and I’d like to start using Terraform to manage it. What I’d like is an automated way to generate the configuration file so that I don’t have to write it by hand.
If it matters, the project is in GCP (GKE specifically), so I think the only providers I should need are Google and Kubernetes. I tried using this tool, but I have concerns about it due to the fact that it’s in beta and the documentation states there are some resource types that aren’t supported.
Is there a more standard or general-purpose way of achieving this? Can I perhaps generate a state file from my existing project and then import that? It feels like this shouldn’t be difficult, so maybe I’m just missing something obvious. Any help would be much appreciated.
Read more here: Source link
