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

create Loadbalancer fails at preview #252

Open
hyper-ricardo opened this issue Sep 7, 2023 · 1 comment
Open

create Loadbalancer fails at preview #252

hyper-ricardo opened this issue Sep 7, 2023 · 1 comment

Comments

@hyper-ricardo
Copy link

hyper-ricardo commented Sep 7, 2023

Hello !

I am trying to create a load balance via a NPM projet with the fallowing code and encouter this error : panic: HasAttribute on non-object Type

The Node.js code (from the documentation):

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";

const main = new scaleway.LoadbalancerIp("main", {zone: "fr-par-1"});
const base = new scaleway.Loadbalancer("base", {
    ipId: main.id,
    zone: main.zone,
    type: "LB-S",
});

Is there any way I miss a mandatory attribute?

Thanks!!


Pulumi version: 3.80.0
@lbrlabs/pulumi-scaleway: ^1.10.0

Full stacktrace:

Diagnostics:
  scaleway:index:Loadbalancer (base):
    error: Preview failed: error reading from server: EOF

  pulumi:pulumi:Stack (cluster-base-prod):
    error: preview failed

    panic: HasAttribute on non-object Type
    goroutine 87 [running]:
    github.com/hashicorp/go-cty/cty.Type.HasAttribute({{0x0?, 0x0?}}, {0x17c62a3?, 0x40d5bf?})
        /home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/cty/object_type.go:104 +0x8b
    github.com/scaleway/terraform-provider-scaleway/v2/scaleway.getLocality(0xc000b0dc80?, 0x0?)
        /home/runner/go/pkg/mod/github.com/scaleway/terraform-provider-scaleway/[email protected]/scaleway/helpers.go:915 +0x45
    github.com/scaleway/terraform-provider-scaleway/v2/scaleway.customizeDiffLocalityCheck.func1({0x1c5a158?, 0xc0000500b8?}, 0x17d49ae?, {0x1505b00?, 0xc00017a3c0?})
        /home/runner/go/pkg/mod/github.com/scaleway/terraform-provider-scaleway/[email protected]/scaleway/helpers.go:932 +0x71
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc0002acae0, {0x1c5a158, 0xc0000500b8}, 0xc000663ee0, 0xc000b0ce70, 0xc00034dc60, {0x1505b00, 0xc00017a3c0}, 0x0)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:699 +0x4d4
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x0?, {0x1c5a158?, 0xc0000500b8?}, 0xc000663ee0, 0xc000b0ce70?, {0x1505b00?, 0xc00017a3c0?})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:895 +0x6c
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.simpleDiff({0x0?, {0xffffffffffffffff?, 0xc00070f4d0?, 0xe39ae9?}}, 0x15bf0a0?, 0xc000b0ce40?, 0xc000663e10, 0xc00070f538?, {{{0x1c5b038, 0xc00011a408}}, ...}, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfshim/sdk-v2/provider_diff.go:87 +0x785
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Diff({0xc000522120?, {0x0?, 0xc0001e0b00?, 0xc0009a34d0?}}, {0x17d1ec2, 0xb}, {0x0?, 0x0}, {0x1c51140, 0xc000b0ce70})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfshim/sdk-v2/provider_diff.go:63 +0x30c
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0xc0001e0b00, {0x1c5a1c8?, 0xc000b0cd20?}, 0xc000661a40)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/provider.go:721 +0x41d
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x1c5a1c8, 0xc000b0cd20}, {0x16f4080?, 0xc000661a40})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:573 +0x78
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1c5a1c8, 0xc000b0cc60}, {0x16f4080, 0xc000661a40}, 0xc000655340, 0xc000011b60)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/go/otgrpc/server.go:57 +0x3f9
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x17866e0?, 0xc0001e0b00}, {0x1c5a1c8, 0xc000b0cc60}, 0xc000529490, 0xc0005482a0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:575 +0x138
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0009ca000, {0x1c618c0, 0xc00018a820}, 0xc000673e60, 0xc0009b85a0, 0x28e8e60, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1337 +0xdf0
    google.golang.org/grpc.(*Server).handleStream(0xc0009ca000, {0x1c618c0, 0xc00018a820}, 0xc000673e60, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1714 +0xa2f
    google.golang.org/grpc.(*Server).serveStreams.func1.1()
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:959 +0x98
    created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:957 +0x18c
@JesusTheHun
Copy link

JesusTheHun commented Sep 12, 2023

I've got the same error for a scaleway.Function.

Last version that works is 1.7.0

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

No branches or pull requests

2 participants