GoogleCloudPlatform / terraformer

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

panic: unknown resource type google_compute_region_instance_group #1859

Closed akamalov closed 3 months ago

akamalov commented 6 months ago

Environment:

MacOS Sonoma 14.4 Terraform v1.4.6 Terraformer v0.8.24

Issue:

When running a command:

$ terraformer import google --projects "test" --regions "us-east4" --resources="*"

...encountered an error:

panic: unknown resource type google_compute_region_instance_group

goroutine 1916 [running]:
github.com/hashicorp/terraform/plugin.(*GRPCProvider).getResourceSchema(0x140001ae900?, {0x10c4ceece, 0x24})
    github.com/hashicorp/terraform@v0.12.31/plugin/grpc_provider.go:92 +0xc8
github.com/hashicorp/terraform/plugin.(*GRPCProvider).ReadResource(0x14000ae32d0, {{0x10c4ceece, 0x24}, {{{0x10f8157c8, 0x14000844c70}}, {0x10e11adc0, 0x14002ac60c0}}, {0x115f03300, 0x0, 0x0}})
    github.com/hashicorp/terraform@v0.12.31/plugin/grpc_provider.go:321 +0xbc
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper.(*ProviderWrapper).Refresh(0x14000adae70, 0x140028dfbd0, 0x140028dfb80)
    github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper/provider.go:171 +0x318
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*Resource).Refresh(0x14002d2a240, 0x0?)
    github.com/GoogleCloudPlatform/terraformer/terraformutils/resource.go:130 +0x50
github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResourceWorker(0x0?, 0x104b97860?, 0x14002606720?)
    github.com/GoogleCloudPlatform/terraformer/terraformutils/utils.go:153 +0xc8
created by github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResources in goroutine 1
    github.com/GoogleCloudPlatform/terraformer/terraformutils/utils.go:80 +0xb4
akamalov commented 5 months ago

I also tried with beta provider support, I am getting the same error. Linking previously closed ticket experiencing the same issue:

https://github.com/GoogleCloudPlatform/terraformer/issues/590 https://github.com/GoogleCloudPlatform/terraformer/issues/683 https://github.com/GoogleCloudPlatform/terraformer/issues/1050

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.

github-actions[bot] commented 3 months ago

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