I'm importing with terraformer (not terraform, check this https://github.com/GoogleCloudPlatform/terraformer) some infrastructure hosted on Google Cloud, please see my command below.
i.e: terraformer import google --resources=networks,subnetworks,firewall,routes,forwardingRules,vpnTunnels --regions=europe-blabla1 --projects=my_project
It works okay, the output of the command is a separate folder with tfstate and tf files per every resource I imported.
2021/05/18 11:03:20 google Connecting....
2021/05/18 11:03:20 google save firewall
2021/05/18 11:03:20 google save tfstate for firewall
2021/05/18 11:03:20 google save routes
2021/05/18 11:03:20 google save tfstate for routes
2021/05/18 11:03:20 google save forwardingRules
2021/05/18 11:03:20 google save tfstate for forwardingRules
2021/05/18 11:03:20 google save vpnTunnels
2021/05/18 11:03:20 google save tfstate for vpnTunnels
2021/05/18 11:03:20 google save networks
2021/05/18 11:03:20 google save tfstate for networks
2021/05/18 11:03:20 google save subnetworks
2021/05/18 11:03:20 google save tfstate for subnetworks
Now what I want to accomplish is to merge those multiples tfstate files into a single one, in order to have stacks for let's say: one for networking, and the same for iam, instances and so for.
I wonder if someone has been able to do this?, or If there is a better approach to accomplish this?.