GoogleCloudPlatform / terraformer

CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Apache License 2.0
12.09k stars 1.6k forks source link

google_compute_region_instance_group is not a resource but a data source. #1842

Closed teadur closed 2 weeks ago

teadur commented 5 months ago

Could we get this google_compute_region_instance_group removed so the terraformer would not break out of box on that resource ?

Disabling it and running Terraform 1.7.2 with terraformer 0.8.24 with hasicorp-google provider 4.59.0 ( make sure you are not running cached older/newer version from .terraform/providers/registry.terraform.io/hashicorp/google/ ) results in succeful plan/import of my gcp setup.

       @tdiazvelez Had to dig a little bit but this is because `google_compute_region_instance_group` is not a resource but a data source.

As far as I know Terraformer only creates terraform_remote_state data sources based on the resources it has but doesn't create any other.

You can solve this by excluding it by

terraformer import google --resources="*" --excludes="regionInstanceGroups" --regions=europe-west4 --projects=MY-PROJECT

@sergeylanzman want me to create a PR to remove the google_compute_region_instance_group resource?

Also, about the issues with GCP provider, the issue started in 4.60.0 due to the plugin framework added back in, so using version 4.59.0 will work.

Originally posted by @DanielRieske in https://github.com/GoogleCloudPlatform/terraformer/issues/1719#issuecomment-1584507579

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

teadur commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been stalled for 7 days with no activity.