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

Creating an ObjectBucket is not using the configured scaleway:project_id #232

Open
juchom opened this issue May 3, 2023 · 6 comments
Open
Assignees

Comments

@juchom
Copy link

juchom commented May 3, 2023

If you configure the default scaleway:project_id and you create an ObjectBucket like this :

var bucket = new ObjectBucket("bucket", new()
{
    Name = "bucket",
});

The bucket is created in the default project and not in scaleway:project_id like other resources.

@dirien
Copy link
Collaborator

dirien commented Jun 19, 2023

Hey @juchom,

can you try with the latest version 1.9.0?

@juchom
Copy link
Author

juchom commented Jun 20, 2023

I've juste updated my project with 1.9.0 and I have this error when I try a pulumi update

  pulumi:pulumi:Stack (proj-stg):
    panic: HasAttribute on non-object Type
    goroutine 15 [running]:
    github.com/hashicorp/go-cty/cty.Type.HasAttribute({{0x0?, 0x0?}}, {0x1c3676d?, 0x85db5f?})
        /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(0xc000f02150?, 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({0x20da038?, 0xc00011e018?}, 0x1c451e6?, {0x1979d80?, 0xc00039aa80?})
        /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(0xc000310f00, {0x20da038, 0xc00011e018}, 0xc000e50750, 0xc000d71da0, 0xc0001d03c0, {0x1979d80, 0xc00039aa80}, 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?, {0x20da038?, 0xc00011e018?}, 0xc000e50750, 0x8020106?, {0x1979d80?, 0xc00039aa80?})
        /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({0x14ab5170108?, {0x30?, 0xc000280000?, 0xc000d71da0?}}, 0x0?, 0x1a32ac0?, 0xc000e50410, 0x85dea7?, {{{0x20daea8, 0xc00058d6e0}}, ...}, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfshim/sdk-v2/provider_diff.go:87 +0x730
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Diff({0xc000628180?, {0x0?, 0x0?, 0x0?}}, {0x1c549e2, 0x15}, {0x20dafc0?, 0xc000e2e1a0}, {0x20d1060, 0xc000d71da0})
        /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).Diff(0xc00052bb80, {0x20da0a8?, 0xc000d714d0?}, 0xc000d7ce00)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/provider.go:637 +0x571
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1({0x20da0a8, 0xc000d714d0}, {0x1b81b00?, 0xc000d7ce00})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:555 +0x78
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x20da0a8, 0xc000d712c0}, {0x1b81b00, 0xc000d7ce00}, 0xc000d5b620, 0xc000e023a8)
        /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_Diff_Handler({0x1bf9a60?, 0xc00052bb80}, {0x20da0a8, 0xc000d712c0}, 0xc000d7cd90, 0xc0006880c0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:557 +0x138
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0009b6000, {0x20e1840, 0xc0003f5520}, 0xc000d7b560, 0xc0006451a0, 0x2d77648, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1345 +0xdf0
    google.golang.org/grpc.(*Server).handleStream(0xc0009b6000, {0x20e1840, 0xc0003f5520}, 0xc000d7b560, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1722 +0xa2f
    google.golang.org/grpc.(*Server).serveStreams.func1.2()
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:966 +0x98
    created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:964 +0x28a

  scaleway:index:DatabaseInstance (proj-pg):
    error: error reading from server: read tcp 127.0.0.1:54081->127.0.0.1:54080: wsarecv: An existing connection was forcibly closed by the remote host.

@dirien dirien self-assigned this Jun 20, 2023
@dirien
Copy link
Collaborator

dirien commented Jun 22, 2023

Thanks @juchom for the feedback. I track error message in this issue pulumi/pulumi-terraform-bridge#1231

@MathyV
Copy link

MathyV commented Aug 6, 2023

Thanks @juchom for the feedback. I track error message in this issue pulumi/pulumi-terraform-bridge#1231

I'm running into similar problems. I see that the related issue is closed and a new version of the bridge is released. Any way I can test this easily or do I have to compile Pulumi myself, and if so, how can this be done? I can't seem to find build documentation.

@MathyV
Copy link

MathyV commented Aug 7, 2023

I managed to create a build of the provider using v3.56.2 of the bridge and can confirm the problem is now resolved.

I also had to apply the replace to the sdk suggested in pulumi/pulumi-terraform-bridge#1302 to get the build going.

@teknologista
Copy link

teknologista commented Sep 2, 2023

@dirien These errors with getLocality seem to be getting in the way of everyone by reading the last 3 or 4 issues in this repo.

Do you have any plans to fix them ?
As it seem the issue is fixed in pulumi/pulumi-terraform-bridge/issues/1231

@MathyV maybe you can contribute a PR or build somewhere...

Many thanks everyone

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

4 participants