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

Crash when using data.cloudamqp_vpc_info with GCE #131

Closed
orlandothoeny opened this issue Dec 3, 2021 · 5 comments
Closed

Crash when using data.cloudamqp_vpc_info with GCE #131

orlandothoeny opened this issue Dec 3, 2021 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@orlandothoeny
Copy link
Contributor

orlandothoeny commented Dec 3, 2021

When I use the data.cloudamqp_vpc_info data source. I get the following error.

I have a dedicated instance running which is inside a VPC.

Using provider version 1.14.0:

╷
│ Error: Plugin did not respond
│ 
│   with module.rabbitmq.data.cloudamqp_vpc_info.rabbitmq,
│   on ../modules/rabbitmq/main.tf line 57, in data "cloudamqp_vpc_info" "rabbitmq":
│   57: data "cloudamqp_vpc_info" "rabbitmq" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-cloudamqp_v1.14.0 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 75 [running]:
github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp.dataSourceVpcInfoRead(0xc0001cb110, {0xe27ec0, 0xc0006640a8})
        github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp/data_source_cloudamqp_vpc_info.go:52 +0x59a
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc0006fa820, 0xc0006e0780, {0xe27ec0, 0xc0006640a8})
        github.com/hashicorp/[email protected]/helper/schema/resource.go:413 +0x66
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc000826500, 0xc000309b28, 0xd32e80)
        github.com/hashicorp/[email protected]/helper/schema/provider.go:451 +0x65
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc000884608, {0xc000a4b4c0, 0x4ed866}, 0xc000a4b4c0)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:1046 +0x2da
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler({0xe02360, 0xc000884608}, {0x10086f0, 0xc0006e1500}, 0xc000058840, 0x0)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3341 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005588c0, {0x1018198, 0xc0001aaa80}, 0xc00058ed00, 0xc00082ee70, 0x1602b30, 0x0)
        google.golang.org/[email protected]/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0005588c0, {0x1018198, 0xc0001aaa80}, 0xc00058ed00, 0x0)
        google.golang.org/[email protected]/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:857 +0x294

Error: The terraform-provider-cloudamqp_v1.14.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Using provider version 1.13.0:

╷
│ Error: Request cancelled
│ 
│   with module.rabbitmq.data.cloudamqp_vpc_info.rabbitmq,
│   on ../modules/rabbitmq/main.tf line 57, in data "cloudamqp_vpc_info" "rabbitmq":
│   57: data "cloudamqp_vpc_info" "rabbitmq" {
│ 
│ The plugin.(*GRPCProvider).ReadDataSource request was cancelled.
╵

Stack trace from the terraform-provider-cloudamqp_v1.13.0 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 78 [running]:
github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp.dataSourceVpcInfoRead(0xc0002d2af0, {0xe27e40, 0xc000816760})
        github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp/data_source_cloudamqp_vpc_info.go:52 +0x59a
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc000144960, 0xc000117290, {0xe27e40, 0xc000816760})
        github.com/hashicorp/[email protected]/helper/schema/resource.go:413 +0x66
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc000194c80, 0xc00056db28, 0xd32e00)
        github.com/hashicorp/[email protected]/helper/schema/provider.go:451 +0x65
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc00000f1b0, {0xc000310e00, 0x4ed7a6}, 0xc000310e00)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:1046 +0x2da
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler({0xe022e0, 0xc00000f1b0}, {0x1008630, 0xc0001171a0}, 0xc000167080, 0x0)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3341 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001b4540, {0x10180d8, 0xc0008d2000}, 0xc000024300, 0xc0008258c0, 0x1602b30, 0x0)
        google.golang.org/[email protected]/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0001b4540, {0x10180d8, 0xc0008d2000}, 0xc000024300, 0x0)
        google.golang.org/[email protected]/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:857 +0x294

Error: The terraform-provider-cloudamqp_v1.13.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Using provider version 1.12.0:

╷
│ Error: Plugin did not respond
│ 
│   with module.rabbitmq.data.cloudamqp_vpc_info.rabbitmq,
│   on ../modules/rabbitmq/main.tf line 57, in data "cloudamqp_vpc_info" "rabbitmq":
│   57: data "cloudamqp_vpc_info" "rabbitmq" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-cloudamqp_v1.12.0 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 45 [running]:
github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp.dataSourceVpcInfoRead(0xc0002d3810, {0xe282c0, 0xc00000f168})
        github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp/data_source_cloudamqp_vpc_info.go:52 +0x59a
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc00069caa0, 0xc000598630, {0xe282c0, 0xc00000f168})
        github.com/hashicorp/[email protected]/helper/schema/resource.go:413 +0x66
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc0006ae380, 0xc000693b28, 0xd32ec0)
        github.com/hashicorp/[email protected]/helper/schema/provider.go:451 +0x65
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc0005b2610, {0xc0001c09c0, 0x4ed7a6}, 0xc0001c09c0)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:1046 +0x2da
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler({0xe02860, 0xc0005b2610}, {0x1008950, 0xc000275c50}, 0xc0005336e0, 0x0)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3341 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001628c0, {0x10182b8, 0xc00032c000}, 0xc000230500, 0xc0006b0c30, 0x1602b30, 0x0)
        google.golang.org/[email protected]/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0001628c0, {0x10182b8, 0xc00032c000}, 0xc000230500, 0x0)
        google.golang.org/[email protected]/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:857 +0x294

Error: The terraform-provider-cloudamqp_v1.12.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Using provider version 1.11.0:

╷
│ Error: Plugin did not respond
│ 
│   with module.rabbitmq.data.cloudamqp_vpc_info.rabbitmq,
│   on ../modules/rabbitmq/main.tf line 57, in data "cloudamqp_vpc_info" "rabbitmq":
│   57: data "cloudamqp_vpc_info" "rabbitmq" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵
Releasing state lock. This may take a few moments...

Stack trace from the terraform-provider-cloudamqp_v1.11.0 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 114 [running]:
github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp.dataSourceVpcInfoRead(0xc0001fcaf0, {0xe282c0, 0xc00089e760})
        github.com/cloudamqp/terraform-provider-cloudamqp/cloudamqp/data_source_cloudamqp_vpc_info.go:52 +0x59a
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc0001628c0, 0xc0004b08a0, {0xe282c0, 0xc00089e760})
        github.com/hashicorp/[email protected]/helper/schema/resource.go:413 +0x66
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc00093e200, 0xc000793b28, 0xd32ec0)
        github.com/hashicorp/[email protected]/helper/schema/provider.go:451 +0x65
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc00000ef98, {0xc00061cfc0, 0x4ed626}, 0xc00061cfc0)
        github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:1046 +0x2da
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler({0xe02860, 0xc00000ef98}, {0x10088d0, 0xc00057abd0}, 0xc0002c4b40, 0x0)
        github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3341 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003ace00, {0x1018238, 0xc00019ea80}, 0xc00001e300, 0xc00029ac60, 0x1602b30, 0x0)
        google.golang.org/[email protected]/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0003ace00, {0x1018238, 0xc00019ea80}, 0xc00001e300, 0x0)
        google.golang.org/[email protected]/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:857 +0x294

Error: The terraform-provider-cloudamqp_v1.11.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
@dentarg
Copy link
Member

dentarg commented Dec 3, 2021

@orlandothoeny Can you share which region you are using? If you can email even more details (like your hostname) to support that would be great, thanks!

@dentarg dentarg changed the title Crash when using data.cloudamqp_vpc_info Crash when using data.cloudamqp_vpc_info with GCE Dec 4, 2021
@dentarg
Copy link
Member

dentarg commented Dec 4, 2021

I can reproduce this when using a google-compute-engine region

Essentially, the provider doesn't yet support the VPC features for anything other than AWS (#74), but we will work on this going forward.

@orlandothoeny
Copy link
Contributor Author

Thanks for looking into this @dentarg.

Yes, I was using an instance/VPC on GCP.

@dentarg dentarg added the enhancement New feature or request label Dec 8, 2021
@dentarg
Copy link
Member

dentarg commented Dec 8, 2021

Basically the same issue as #74 (we will solve both) but keeping this open for visibility.

@dentarg dentarg added this to the Next milestone Dec 8, 2021
@tbroden84
Copy link
Contributor

After internal discussion we decided to split the two VPC info data sources. Default one is for AWS and the new one for GCP. Created a new document page for this at data_source_vpc_gcp_info.go. Released this in the latest release v1.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants