Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: unknown resource type google_compute_region_instance_group #683

Closed
aamarques opened this issue Nov 25, 2020 · 6 comments
Closed

panic: unknown resource type google_compute_region_instance_group #683

aamarques opened this issue Nov 25, 2020 · 6 comments

Comments

@aamarques
Copy link

aamarques commented Nov 25, 2020

google_compute_region_instance_group failed with panic: unknown resource type google_compute_region_instance_group

$ terraformer import  google --path-output=project-dev --regions=europe-west1,europe-west2,europe-west3,europe-west4 --projects=project-dev --resources=regionInstanceGroups
2020/11/25 12:34:28 google importing project project-dev region europe-west1
2020/11/25 12:34:29 google importing... regionInstanceGroups
2020/11/25 12:34:30 google Connecting....
2020/11/25 12:34:30 google save regionInstanceGroups
2020/11/25 12:34:30 google save tfstate for regionInstanceGroups
2020/11/25 12:34:30 google importing project project-dev region europe-west2
2020/11/25 12:34:31 google importing... regionInstanceGroups
2020/11/25 12:34:31 google Connecting....
2020/11/25 12:34:31 google save regionInstanceGroups
2020/11/25 12:34:31 google save tfstate for regionInstanceGroups
2020/11/25 12:34:31 google importing project project-dev region europe-west3
2020/11/25 12:34:32 google importing... regionInstanceGroups
2020/11/25 12:34:33 Refreshing state... google_compute_region_instance_group.tfer--dev-002D-docker-002D-primary-002D-master
**panic: unknown resource type google_compute_region_instance_group**

goroutine 282 [running]:
github.com/hashicorp/terraform/plugin.(*GRPCProvider).getResourceSchema(0xc0005ea1c0, 0x1a85636, 0x24, 0x0, 0x0)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:92 +0x129
github.com/hashicorp/terraform/plugin.(*GRPCProvider).ReadResource(0xc0005ea1c0, 0x1a85636, 0x24, 0x1de8ee0, 0xc0007413b0, 0x1705220, 0xc000bb1140, 0x2958858, 0x0, 0x0, ...)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:321 +0xa3
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper.(*ProviderWrapper).Refresh(0xc000d6ad80, 0xc000bb7540, 0xc000bb74f0, 0x2, 0xc000bd1e80, 0x76)
        /home/user/terraformer/terraformutils/providerwrapper/provider.go:153 +0x28c
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*Resource).Refresh(0xc000bd6100, 0xc000d6ad80)
        /home/user/terraformer/terraformutils/resource.go:122 +0x4f
github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResourceWorker(0xc000be2ba0, 0xc000bb98d0, 0xc000d6ad80)
        /home/user/terraformer/terraformutils/utils.go:107 +0xc6
created by github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResources
        /home/user/terraformer/terraformutils/utils.go:77 +0x103

versions:

$ terraformer version
Terraformer v0.8.9

$terraform version
Terraform v0.13.5
+ provider registry.terraform.io/hashicorp/google-beta v3.49.0

Didn't work with the previous version (beta or not)

@sergeylanzman
Copy link
Collaborator

now in 0.8.10

@aamarques
Copy link
Author

aamarques commented Dec 3, 2020

Thank you @sergeylanzman but the problem is different.

@aamarques
Copy link
Author

with or without beta provider

╰$ terraformer import  google --path-output=project-dev --regions=europe-west1,europe-west2,europe-west3,europe-west4 --projects=project-dev --bucket gs://terraform-state-dev --state=bucket --resources=regionInstanceGroups
2020/12/03 10:33:47 google importing project project-dev region europe-west1
2020/12/03 10:33:48 google importing... regionInstanceGroups
2020/12/03 10:33:49 google Connecting....
2020/12/03 10:33:49 google save regionInstanceGroups
2020/12/03 10:33:49 google upload tfstate to  bucket gs://terraform-state-dev
2020/12/03 10:33:49 google importing project project-dev region europe-west2
2020/12/03 10:33:50 google importing... regionInstanceGroups
2020/12/03 10:33:50 google Connecting....
2020/12/03 10:33:50 google save regionInstanceGroups
2020/12/03 10:33:50 google upload tfstate to  bucket gs://terraform-state-dev
2020/12/03 10:33:51 google importing project project-dev region europe-west3
2020/12/03 10:33:51 google importing... regionInstanceGroups
2020/12/03 10:33:52 Refreshing state... google_compute_region_instance_group.tfer--dev-002D-docker-002D-primary-002D-master-002D-v-002D-2
2020/12/03 10:33:52 Refreshing state... google_compute_region_instance_group.tfer--dev-002D-docker-002D-primary-002D-node-002D-preemtive
panic: unknown resource type google_compute_region_instance_group

goroutine 299 [running]:
github.com/hashicorp/terraform/plugin.(*GRPCProvider).getResourceSchema(0xc00037d1f0, 0x1aa958a, 0x24, 0x0, 0x0)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:92 +0x129
github.com/hashicorp/terraform/plugin.(*GRPCProvider).ReadResource(0xc00037d1f0, 0x1aa958a, 0x24, 0x1e106c0, 0xc00055d760, 0x1722fc0, 0xc000f187e0, 0x2990898, 0x0, 0x0, ...)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:321 +0xa3
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper.(*ProviderWrapper).Refresh(0xc00093b2c0, 0xc000ae8280, 0xc000ae8230, 0x2, 0xc000906480, 0x76)
        /home/user/terraformer/terraformutils/providerwrapper/provider.go:153 +0x28c
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*Resource).Refresh(0xc000ba4100, 0xc00093b2c0)
        /home/user/terraformer/terraformutils/resource.go:122 +0x4f
github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResourceWorker(0xc000b08060, 0xc000ad4670, 0xc00093b2c0)
        /home/user/terraformer/terraformutils/utils.go:107 +0xc6
created by github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResources
        /home/user/terraformer/terraformutils/utils.go:77 +0x103

Using beta provider


╰$ terraformer import  google --path-output=project-dev --regions=europe-west1,europe-west2,europe-west3,europe-west4 --projects=project-dev --bucket gs://terraform-state-dev --state=bucket --resources=regionInstanceGroups --provider-type beta
2020/12/03 10:40:57 google importing project project-dev region europe-west1
2020/12/03 10:40:58 google-beta importing... regionInstanceGroups
2020/12/03 10:40:59 google-beta Connecting....
2020/12/03 10:40:59 google-beta save regionInstanceGroups
2020/12/03 10:40:59 google-beta upload tfstate to  bucket gs://terraform-state-dev
2020/12/03 10:40:59 google importing project project-dev region europe-west2
2020/12/03 10:41:00 google-beta importing... regionInstanceGroups
2020/12/03 10:41:00 google-beta Connecting....
2020/12/03 10:41:00 google-beta save regionInstanceGroups
2020/12/03 10:41:00 google-beta upload tfstate to  bucket gs://terraform-state-dev
2020/12/03 10:41:01 google importing project project-dev region europe-west3
2020/12/03 10:41:02 google-beta importing... regionInstanceGroups
2020/12/03 10:41:02 Refreshing state... google_compute_region_instance_group.tfer--dev-002D-docker-002D-primary-002D-master-002D-v-002D-2
panic: unknown resource type google_compute_region_instance_group

goroutine 296 [running]:
github.com/hashicorp/terraform/plugin.(*GRPCProvider).getResourceSchema(0xc0003ba2a0, 0x1aa958a, 0x24, 0x0, 0x0)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:92 +0x129
github.com/hashicorp/terraform/plugin.(*GRPCProvider).ReadResource(0xc0003ba2a0, 0x1aa958a, 0x24, 0x1e106c0, 0xc0004bc580, 0x1722fc0, 0xc000bce390, 0x2990898, 0x0, 0x0, ...)
        /home/user/go/pkg/mod/github.com/hashicorp/terraform@v0.12.29/plugin/grpc_provider.go:321 +0xa3
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper.(*ProviderWrapper).Refresh(0xc000b9e1e0, 0xc000bd6280, 0xc000bd6230, 0x2, 0xc000c18300, 0x76)
        /home/user/terraformer/terraformutils/providerwrapper/provider.go:153 +0x28c
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*Resource).Refresh(0xc0001c4200, 0xc000b9e1e0)
        /home/user/terraformer/terraformutils/resource.go:122 +0x4f
github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResourceWorker(0xc000be6060, 0xc000bc0c90, 0xc000b9e1e0)
        /home/user/terraformer/terraformutils/utils.go:107 +0xc6
created by github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResources
        /home/user/terraformer/terraformutils/utils.go:77 +0x103
╰$ terraform version
Terraform v0.13.5

Your version of Terraform is out of date! The latest version
is 0.14.0. You can update by downloading from https://www.terraform.io/downloads.html

╰$ terraformer version
Terraformer v0.8.10

@github-actions
Copy link

github-actions bot commented Apr 4, 2021

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 github-actions bot added the Stale label Apr 4, 2021
@github-actions
Copy link

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

@georgewilliamherbert
Copy link

Reopening as this is still happening with 0.8.15. Running from my Mac against GCP projects now seeing:

2021/09/14 12:56:49 Refreshing state... google_compute_region_instance_group.tfer--europe-002D-west4-002D-puppetmaster

panic: unknown resource type google_compute_region_instance_group
goroutine 32644 [running]:
github.com/hashicorp/terraform/plugin.(*GRPCProvider).getResourceSchema(0xc00087e1c0, 0xa9a0383, 0x24, 0x0, 0x0)
github.com/hashicorp/terraform@v0.12.31/plugin/grpc_provider.go:92 +0x12a
github.com/hashicorp/terraform/plugin.(*GRPCProvider).ReadResource(0xc00087e1c0, 0xa9a0383, 0x24, 0xb6e2318, 0xc00192b9f0, 0x985cbe0, 0xc0036383c0, 0x104e88b0, 0x0, 0x0, ...)
github.com/hashicorp/terraform@v0.12.31/plugin/grpc_provider.go:321 +0xa5
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper.(*ProviderWrapper).Refresh(0xc0001d7110, 0xc00020e320, 0xc00020e0a0, 0x2, 0xc00662c770, 0x63)
github.com/GoogleCloudPlatform/terraformer/terraformutils/providerwrapper/provider.go:171 +0x305
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*Resource).Refresh(0xc0051b7950, 0xc0001d7110)
github.com/GoogleCloudPlatform/terraformer/terraformutils/resource.go:130 +0x4f
github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResourceWorker(0xc0026e2720, 0xc005145f90, 0xc0001d7110)
github.com/GoogleCloudPlatform/terraformer/terraformutils/utils.go:153 +0xcd
created by github.com/GoogleCloudPlatform/terraformer/terraformutils.RefreshResources
github.com/GoogleCloudPlatform/terraformer/terraformutils/utils.go:80 +0x145

$ terraform version
Terraform v1.0.4
on darwin_amd64

Your version of Terraform is out of date! The latest version
is 1.0.6. You can update by downloading from https://www.terraform.io/downloads.html

$ terraformer version
Terraformer v0.8.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants