pulumi-gcp: panic: interface conversion: interface {} is nil, not map[string]interface {}

What happened?

When trying to apply previously working Region Instance Group Managers, I receive a fatal error on creation panic: interface conversion: interface {} is nil, not map[string]interface {}

here is the pulumi up

     pulumi:pulumi:Stack                        bamboo-agent-infra-dev
 +   ├─ gcp:compute:RegionInstanceGroupManager  generic-bba-v2-igm      create
 +   └─ gcp:compute:RegionAutoscaler            generic-bba-v2-scaler   create


Resources:
    + 2 to create
    4 unchanged

Do you want to perform this update? yes
Updating (company/dev)

warning: Your Pulumi organization is on an expired trial or a canceled subscription. Update your subscription to maintain organization access: https://app.pulumi.com/company/settings/billing-usage

View in Browser (Ctrl+O): https://app.pulumi.com/company/bamboo-agent-infra/dev/updates/46

     Type                                       Name                    Status                  Info
     pulumi:pulumi:Stack                        bamboo-agent-infra-dev  **failed**              1 error; 28 messages
 +   └─ gcp:compute:RegionInstanceGroupManager  generic-bba-v2-igm      **creating failed**     1 error


Diagnostics:
  pulumi:pulumi:Stack (bamboo-agent-infra-dev):
    panic: interface conversion: interface {} is nil, not map[string]interface {}
    goroutine 115 [running]:
    github.com/hashicorp/terraform-provider-google-beta/google-beta.expandAllInstancesConfig({0x0, 0x0, 0x4312f99?}, {0xc001322aa0?, 0x1, 0xc000f45d00?})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-google-beta@v1.20.1-0.20230307171238-23b2271b4580/google-beta/resource_compute_instance_group_manager.go:1303 +0xa14
    github.com/hashicorp/terraform-provider-google-beta/google-beta.resourceComputeRegionInstanceGroupManagerCreate(0x103c20a8?, {0x42e6700?, 0xc0011d4900})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-google-beta@v1.20.1-0.20230307171238-23b2271b4580/google-beta/resource_compute_region_instance_group_manager.go:536 +0x514
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x49ffdf0?, {0x49ffdf0?, 0xc0000480d8?}, 0xd?, {0x42e6700?, 0xc0011d4900?})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20220824175045-450992f2f5b9/helper/schema/resource.go:700 +0x178
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00061ad20, {0x49ffdf0, 0xc0000480d8}, 0x0, 0xc000f45b80, {0x42e6700, 0xc0011d4900})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20220824175045-450992f2f5b9/helper/schema/resource.go:842 +0xa85
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0x43170d8?}, {0x43b772d, 0x2c}, {0x0?, 0x0}, {0x4a093f8?, 0xc000f45b80})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.38.1/pkg/tfshim/sdk-v2/provider.go:122 +0x19b
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0xc000232280, {0x49ffe60?, 0xc0012ede00?}, 0xc0012e2f50)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.38.1/pkg/tfbridge/provider.go:885 +0x643
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x49ffe60, 0xc0012ede00}, {0x40853c0?, 0xc0012e2f50})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.53.1/proto/go/provider_grpc.pb.go:573 +0x78
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x49ffe60, 0xc0012eda10}, {0x40853c0, 0xc0012e2f50}, 0xc0012e54c0, 0xc0012d3788)
    	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3f9
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x42bc5e0?, 0xc000232280}, {0x49ffe60, 0xc0012eda10}, 0xc0012d5650, 0xc000c03280)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.53.1/proto/go/provider_grpc.pb.go:575 +0x138
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005de1e0, {0x4a09880, 0xc00103a340}, 0xc0012f9d40, 0xc000726150, 0x70d3720, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.51.0/server.go:1340 +0xd23
    google.golang.org/grpc.(*Server).handleStream(0xc0005de1e0, {0x4a09880, 0xc00103a340}, 0xc0012f9d40, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.51.0/server.go:1713 +0xa2f
    google.golang.org/grpc.(*Server).serveStreams.func1.2()
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.51.0/server.go:965 +0x98
    created by google.golang.org/grpc.(*Server).serveStreams.func1
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.51.0/server.go:963 +0x28a

    error: update failed

  gcp:compute:RegionInstanceGroupManager (generic-bba-v2-igm):
    error: error reading from server: EOF

Expected Behavior

The Region instance group manager should be created. This was working with no code changes last week.

Steps to reproduce

Create a region instance group manager

Output of pulumi about

Version      3.74.0
Go Version   go1.20.5
Go Compiler  gc

Plugins
NAME    VERSION
gcp     6.59.0
nodejs  unknown

Host
OS       darwin
Version  12.6.5
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v19.5.0'

Current Stack: company/bamboo-agent-infra/dev

TYPE                                           URN
pulumi:pulumi:Stack                            urn:pulumi:dev::bamboo-agent-infra::pulumi:pulumi:Stack::bamboo-agent-infra-dev
pulumi:providers:gcp                           urn:pulumi:dev::bamboo-agent-infra::pulumi:providers:gcp::default_6_51_0
gcp:serviceAccount/account:Account             urn:pulumi:dev::bamboo-agent-infra::gcp:serviceAccount/account:Account::svc-bamboo-pulumi-runner
gcp:projects/iAMMember:IAMMember               urn:pulumi:dev::bamboo-agent-infra::gcp:projects/iAMMember:IAMMember::pulumi-runner-perms
gcp:compute/instanceTemplate:InstanceTemplate  urn:pulumi:dev::bamboo-agent-infra::gcp:compute/instanceTemplate:InstanceTemplate::generic-bba-v2-template

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already).

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (11 by maintainers)

Most upvoted comments

Will have a look next week! Sorry for the delay.

yea I’ve tried it in both, I’ll bump it again and give you another trace. I originally reverted back to older versions that our stack would of been on when it was working…

     pulumi:pulumi:Stack                        bamboo-agent-infra-dev  **failed**              1 error; 34 messages
 +   └─ gcp:compute:RegionInstanceGroupManager  generic-bba-v2-igm      **creating failed**     1 error


Diagnostics:
  pulumi:pulumi:Stack (bamboo-agent-infra-dev):
    panic: interface conversion: interface {} is nil, not map[string]interface {}
    goroutine 111 [running]:
    github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.expandAllInstancesConfig({0x0, 0x0, 0x484462b?}, {0xc0061638a0?, 0x1, 0xc005f4d600?})
    	/home/runner/work/pulumi-gcp/pulumi-gcp/upstream/google-beta/services/compute/resource_compute_instance_group_manager.go:1344 +0x9f5
    github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.resourceComputeRegionInstanceGroupManagerCreate(0x47c6f40?, {0x4814ba0?, 0xc005bc0900?})
    	/home/runner/work/pulumi-gcp/pulumi-gcp/upstream/google-beta/services/compute/resource_compute_region_instance_group_manager.go:542 +0x9a5
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x4f73830?, {0x4f73830?, 0xc00011e008?}, 0xd?, {0x4814ba0?, 0xc005bc0900?})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230327102345-3fa930f86570/helper/schema/resource.go:700 +0x178
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc001a1a540, {0x4f73830, 0xc00011e008}, 0x0, 0xc005f4d400, {0x4814ba0, 0xc005bc0900})
    	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20230327102345-3fa930f86570/helper/schema/resource.go:842 +0xa85
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc00012b440?, {0x0?, 0xc005f4d400?, 0xc006148650?}}, {0x48f8fa4, 0x2c}, {0x0?, 0x0}, {0x4f7ebf0, 0xc005f4d400})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.49.0/pkg/tfshim/sdk-v2/provider.go:100 +0x199
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0xc001434500, {0x4f738a0?, 0xc006138ed0?}, 0xc0061056d0)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.49.0/pkg/tfbridge/provider.go:747 +0x663
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create.func1({0x4f84060?, 0xc001434500?})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.4/muxer.go:344 +0x36
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc001affa40?, 0x40, 0xc00248f780?)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.4/muxer.go:303 +0xbd
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create(0x0?, {0x4f738a0?, 0xc006138ed0?}, 0x40?)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/muxer@v0.0.4/muxer.go:343 +0x68
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x4f738a0, 0xc006138ed0}, {0x457bc80?, 0xc0061056d0})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.69.0/proto/go/provider_grpc.pb.go:573 +0x78
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x4f738a0, 0xc006138ae0}, {0x457bc80, 0xc0061056d0}, 0xc006107920, 0xc00612aaf8)
    	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3e8
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x47cfd40?, 0xc001affa40}, {0x4f738a0, 0xc006138ae0}, 0xc00607fb20, 0xc0007de040)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.69.0/proto/go/provider_grpc.pb.go:575 +0x138
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc00054e000, {0x4f7f140, 0xc0051009c0}, 0xc00612d200, 0xc0058bb3b0, 0x7eabe00, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.55.0/server.go:1337 +0xdf3
    google.golang.org/grpc.(*Server).handleStream(0xc00054e000, {0x4f7f140, 0xc0051009c0}, 0xc00612d200, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.55.0/server.go:1714 +0xa36
    google.golang.org/grpc.(*Server).serveStreams.func1.1()
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.55.0/server.go:959 +0x98
    created by google.golang.org/grpc.(*Server).serveStreams.func1
    	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.55.0/server.go:957 +0x18c

    error: update failed

  gcp:compute:RegionInstanceGroupManager (generic-bba-v2-igm):
    error: error reading from server: EOF

Resources:
    4 unchanged

Duration: 3s


~/Workspace/bamboo-agent-infra build-on-dev-push* 11s
❯ pulumi about
CLI
Version      3.74.0
Go Version   go1.20.5
Go Compiler  gc

Plugins
NAME    VERSION
gcp     6.59.0
nodejs  unknown

Host
OS       darwin
Version  12.6.5
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v19.5.0'

Current Stack: RnD-Dexcom/bamboo-agent-infra/dev

TYPE                                           URN
pulumi:pulumi:Stack                            urn:pulumi:dev::bamboo-agent-infra::pulumi:pulumi:Stack::bamboo-agent-infra-dev
pulumi:providers:gcp                           urn:pulumi:dev::bamboo-agent-infra::pulumi:providers:gcp::default_6_59_0
gcp:compute/instanceTemplate:InstanceTemplate  urn:pulumi:dev::bamboo-agent-infra::gcp:compute/instanceTemplate:InstanceTemplate::generic-bba-v2-template
gcp:projects/iAMMember:IAMMember               urn:pulumi:dev::bamboo-agent-infra::gcp:projects/iAMMember:IAMMember::pulumi-runner-perms
gcp:serviceAccount/account:Account             urn:pulumi:dev::bamboo-agent-infra::gcp:serviceAccount/account:Account::svc-bamboo-pulumi-runner

That’s strange, re: the version, I see this:

pulumi:providers:gcp                           urn:pulumi:dev::bamboo-agent-infra::pulumi:providers:gcp::default_6_51_0

In the pulumi about output, indicating version 6.51.0. Have you run npm install or yarn and then pulumi up?

I want to focus in on this a bit more. @t0yv0 it looks like the package version doesn’t match the plugin version, which could definitely cause some interesting issues. The stack trace lines up with 6.51.0, not 6.59.0.