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

Breaking change on 5.0.0 #185

Closed
mreadings opened this issue Sep 2, 2021 · 31 comments
Closed

Breaking change on 5.0.0 #185

mreadings opened this issue Sep 2, 2021 · 31 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@mreadings
Copy link

Updated to pulumi-azuread 5.0.0

dotnet add package pulumi.AzureAD --version 5.0.0

now crashes when calling

var adApp = new Pulumi.AzureAD.Application(appName, new ApplicationArgs() { DisplayName = appName });

@mreadings mreadings added the kind/bug Some behavior is incorrect or out of spec label Sep 2, 2021
@stack72
Copy link
Contributor

stack72 commented Sep 2, 2021

Hi @mreadings

Please can you give us the crash logs so we can try and pin-point this?

Thanks

Paul

@bweber
Copy link

bweber commented Sep 10, 2021

I am getting exact same error when I upgrade to version 5 with a similar setup as @mreadings did:

panic: Unknown kind: bool

goroutine 37 [running]:

github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).get(0xc000502e70, 0xc000656140, 0x1f, 0xc000502e10, 0x0, 0x1f, 0x7fde3f1a0108)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:313 +0xa1f

github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).IsComputed(0xc000502e70, 0xc000656140, 0x1f, 0x1370ec0)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:226 +0x4c

github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).Get(0xc000502e70, 0xc000656140, 0x1f, 0x15a7a29, 0xd, 0xc0004ee2f8)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:206 +0x4c

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readPrimitive(0xc000502ed0, 0xc000656140, 0x1f, 0xc000521180, 0x0, 0x0, 0x0, 0x0, 0x0, 0x63f025, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:223 +0x7c

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc000502ed0, 0xc00066f280, 0x4, 0x4, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:101 +0x65c

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00000eb30, 0xc00066f280, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x203000, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x181ba60, 0xc00000eb30, 0xc000503050, 0x3, 0x3, 0xc0002e4500, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:180 +0x12f

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readSet(0xc000502ed0, 0xc000503050, 0x3, 0x3, 0xc0002e4500, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:261 +0x12a

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc000502ed0, 0xc000503050, 0x3, 0x3, 0x1370c01, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:107 +0x905

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00000eb28, 0xc000503050, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x128, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField(0x181ba60, 0xc00000eb28, 0xc000862d20, 0x2, 0x2, 0xc000383830, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:236 +0x21a

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc000502ed0, 0xc000862d20, 0x2, 0x2, 0x13b3b01, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:109 +0x7ea

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00000eb18, 0xc000862d20, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x181ba60, 0xc00000eb18, 0xc0005bf440, 0x1, 0x1, 0xc0002e4640, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:203 +0x36f

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc000502ed0, 0xc0005bf440, 0x1, 0x1, 0xc00085c200, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:103 +0x55f

github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).ReadField(0xc000502ed0, 0xc0005bf440, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:29 +0xc5

github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Resource.InstanceState(0xc0000cb800, 0xc00085c1b0, 0x24, 0xc000502e10, 0xc000502db0, 0x0, 0x0, 0xc000502e10, 0x0)

	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.4.1-0.20210714215802-5020116ac4e6/pkg/tfshim/sdk-v2/resource.go:97 +0x1f5

github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformState(0xc0000daf80, 0x18446b8, 0xc0000cb800, 0x15af3d4, 0x13, 0xc00085c1b0, 0x24, 0xc000502d20, 0xdd, 0x1, ...)

	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.4.1-0.20210714215802-5020116ac4e6/pkg/tfbridge/schema.go:847 +0x20a

github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Diff(0xc00000a3c0, 0x1839a48, 0xc000502c90, 0xc0002c1650, 0xc00000a3c0, 0x13e3a01, 0xc00066e640)

	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.4.1-0.20210714215802-5020116ac4e6/pkg/tfbridge/provider.go:730 +0x4b4

github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1(0x1839a48, 0xc000502c90, 0x150f7e0, 0xc0002c1650, 0x151da00, 0x20afe28, 0x1839a48, 0xc000502c90)

	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.6.2-0.20210712183851-30278f8e4c08/proto/go/provider.pb.go:2576 +0x89

github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x1839a48, 0xc000502b40, 0x150f7e0, 0xc0002c1650, 0xc0008622a0, 0xc000534540, 0x0, 0x0, 0x181aca0, 0xc00038bc40)

	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x30a

github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler(0x1563040, 0xc00000a3c0, 0x1839a48, 0xc000502b40, 0xc0006684e0, 0xc000488900, 0x1839a48, 0xc000502b40, 0xc000867500, 0x644)

	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.6.2-0.20210712183851-30278f8e4c08/proto/go/provider.pb.go:2578 +0x150

google.golang.org/grpc.(*Server).processUnaryRPC(0xc00061ec40, 0x1847278, 0xc000640c00, 0xc0000ac480, 0xc0002f79b0, 0x206c1e8, 0x0, 0x0, 0x0)

	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1217 +0x52b

google.golang.org/grpc.(*Server).handleStream(0xc00061ec40, 0x1847278, 0xc000640c00, 0xc0000ac480, 0x0)

	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1540 +0xd0c

google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0002ab850, 0xc00061ec40, 0x1847278, 0xc000640c00, 0xc0000ac480)

	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:878 +0xab

created by google.golang.org/grpc.(*Server).serveStreams.func1

	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:876 +0x1fd

error: transport is closing

@Sodki
Copy link

Sodki commented Sep 14, 2021

Same for me after upgrading to 5.2.0. Getting back to 4.3.0 made it work again.

@jkonecki-techfabric
Copy link

Issue is still present in 5.3.

@PawelStadnicki
Copy link

I noticed somewhere in Terraform issues that right now you should provide owners for application or/and service principal.

Check if something similar to the following will help you (C#):
image

@nicro950
Copy link

nicro950 commented Oct 1, 2021

I found this issue after some research, which is related to the terraform azuread provider hashicorp/terraform-provider-azuread#494. It looks like the "publicClient": false, state output has received a new type in the terraform state, which looks like it result in a crash when updating the azuread provider and running preview since it does not understand value of type bool at that location.

After exporting the stack, removing the "publicClient": false, from the output of the azure ad application in the state file, and then importing it again, then it looks like both refresh and preview is working normal locally at least, have not yet tried pulumi up yet.

The thing about pulumi refresh that fails that I mentioned, is if the state is exported, change the azure ad provider from 4.3.0 to 5.3.0 in the state and import the state again, then pulumi refresh will fail with the same error.

So in general it looks like that pulumi azuread 4.x state is not directly compatible with the pulumi azuread 5.x state

@jkonecki-techfabric
Copy link

@stack72 Hi Paul, could you please let us know if the issue is with Pulumi or a dependency? If the latter, we can chase at source.

@jkonecki-techfabric
Copy link

Issue is still present in 5.5.

Neither of the workarounds suggested by @PawelStadnicki or @nicro950 works for me.

@mpp-scottm
Copy link

mpp-scottm commented Oct 21, 2021

Also seeing this on versions up to 5.5.

Reverting to 4.3.0 works ok

 panic: Unknown kind: bool

 goroutine 42 [running]:

 github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).get(0xc0005b2fc0, 0xc0005fcec0, 0x1f, 0xc0005b2ea0, 0x0, 0x1f, 0x7f9eb8154108)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:313 +0xa1f

 github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).IsComputed(0xc0005b2fc0, 0xc0005fcec0, 0x1f, 0x13ef420)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:226 +0x4c

 github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).Get(0xc0005b2fc0, 0xc0005fcec0, 0x1f, 0x163ab58, 0xd, 0xc000110f28)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:206 +0x4c

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readPrimitive(0xc0005b3020, 0xc0005fcec0, 0x1f, 0xc0008e0140, 0x0, 0x0, 0x0, 0x0, 0x0, 0x13dd720, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:223 +0x7c

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0005b3020, 0xc000723800, 0x4, 0x4, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:101 +0x65c

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc000586348, 0xc000723800, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x203000, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x18c6a40, 0xc000586348, 0xc0005b38c0, 0x3, 0x3, 0xc00073d900, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:180 +0x12f

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readSet(0xc0005b3020, 0xc0005b38c0, 0x3, 0x3, 0xc00073d900, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:261 +0x12a

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0005b3020, 0xc0005b38c0, 0x3, 0x3, 0x13ef101, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:107 +0x905

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc000586340, 0xc0005b38c0, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField(0x18c6a40, 0xc000586340, 0xc0008b3180, 0x2, 0x2, 0xc00073a180, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:236 +0x21a

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0005b3020, 0xc0008b3180, 0x2, 0x2, 0x1433a01, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:109 +0x7ea

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc000586330, 0xc0008b3180, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa5

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x18c6a40, 0xc000586330, 0xc0007d7440, 0x1, 0x1, 0xc00073da40, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:203 +0x36f

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0005b3020, 0xc0007d7440, 0x1, 0x1, 0xc000c8d600, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:103 +0x55f

 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).ReadField(0xc0005b3020, 0xc0007d7440, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:29 +0xc5

 github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Resource.InstanceState(0xc000163980, 0xc000c8d500, 0x24, 0xc0005b2ea0, 0xc0005b2e70, 0x0, 0xc000337800, 0xc0005b2ea0, 0x0)

 	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.8.2-0.20210930033847-5bba386a0e79/pkg/tfshim/sdk-v2/resource.go:97 +0x1f5

 github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformState(0xc000099580, 0x18f0fb8, 0xc000163980, 0x1642aa7, 0x13, 0xc000c8d500, 0x24, 0xc0005b2c00, 0x11f, 0x1, ...)

 	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.8.2-0.20210930033847-5bba386a0e79/pkg/tfbridge/schema.go:858 +0x20a

 github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Diff(0xc0002dc1e0, 0x18e5c88, 0xc0005b2b40, 0xc00072e310, 0xc0002dc1e0, 0x1465801, 0xc000722a00)

 	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.8.2-0.20210930033847-5bba386a0e79/pkg/tfbridge/provider.go:730 +0x4b4

 github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1(0x18e5c88, 0xc0005b2b40, 0x159f840, 0xc00072e310, 0x15ae460, 0x21b5d08, 0x18e5c88, 0xc0005b2b40)

 	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.13.2/proto/go/provider.pb.go:2584 +0x89

 github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x18e5c88, 0xc0005b27b0, 0x159f840, 0xc00072e310, 0xc0008b2420, 0xc00062e378, 0x0, 0x0, 0x18c5c80, 0xc00005bda0)

 	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x30a

 github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler(0x15f5520, 0xc0002dc1e0, 0x18e5c88, 0xc0005b27b0, 0xc000088c00, 0xc00073e500, 0x18e5c88, 0xc0005b27b0, 0xc0008b6900, 0x848)

 	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.13.2/proto/go/provider.pb.go:2586 +0x150

 google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001a4c40, 0x18f3b78, 0xc00013b500, 0xc0003b4c60, 0xc000774f60, 0x2171d08, 0x0, 0x0, 0x0)

 	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1217 +0x52b

 google.golang.org/grpc.(*Server).handleStream(0xc0001a4c40, 0x18f3b78, 0xc00013b500, 0xc0003b4c60, 0x0)

 	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1540 +0xd0c

 google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0007484f0, 0xc0001a4c40, 0x18f3b78, 0xc00013b500, 0xc0003b4c60)

 	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:878 +0xab

 created by google.golang.org/grpc.(*Server).serveStreams.func1

 	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:876 +0x1fd

@kralikba
Copy link

kralikba commented Nov 3, 2021

Issue still present in 5.6

@Pseudo-Eponymous
Copy link

Just wondering if this is something that will be looked at or whether the solution proposed for migrating from azure classic to azure native would be the correct course of action:

https://www.pulumi.com/registry/packages/azure-native/from-classic/

We are reluctant to reimport our stack and would rather not expend the effort if there is a migration tool in dev

@jkonecki-techfabric
Copy link

AFAIK, there is no 'native' equivalent so you cannot migrate. Azure Native provider has only support for Azure AD B2C tenants.

If I remember correctly, this is because Microsoft hasn't ported Azure AD to Azure Resource Manager, hence we have to keep using terraform.

The fact that Pulumi is not even commenting on this ticket is really disappointing :-(

@nicro950
Copy link

We have now upgraded several stacks to use the new 5.x azure ad instead of the 4.x azure ad. The way we achieved it is the following:

  • Use pulumi state export --file state.json (Please also take a backup of the state.json file before changing it)
  • Find the AppRegistration resource in the file, should have the type azuread:index/application:Application
    • Remove the publicClient property from the Output block
    • If the __meta property is there, remove that as well
  • Reimport the state with pulumi state import --file state.json
  • The next time you are running pulumi preview or pulumi up make sure that you do not use the -r or --refresh option, since that will revert the state file again.
  • Running pulumi refresh will also revert the state file back to the original incompatible state.

It is also possible to try and remove the complete output block from the azure ad app registration resource.

@Sodki
Copy link

Sodki commented Dec 3, 2021

Thank you @nicro950, we followed your instructions successfully. We needed to tweak the settings of some resources later, but I consider that to be expected.

@jkonecki-techfabric
Copy link

I confirm @nicro950 workaround is working fine - many thanks!

@khellang
Copy link

khellang commented Dec 14, 2021

Seeing this with 5.11 as well. Had to revert back to 4.3. Also tried @nicro950's workaround to no avail 😞

@stack72
Copy link
Contributor

stack72 commented Dec 14, 2021 via email

@khellang
Copy link

I don't think I'll have time this week. We're pretty busy dealing with Log4Shell 😅 This is what I'm getting after updating to 5.x:

panic: Unknown kind: bool
    goroutine 101 [running]:
    github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).get(0xc0006b43f0, 0xc000d257e0, 0x1f, 0xc0006b40f0, 0x0, 0x1f, 0x1b895450108)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:313 +0xa1f
    github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).IsComputed(0xc0006b43f0, 0xc000d257e0, 0x1f, 0x18389e0)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:226 +0x53
    github.com/hashicorp/terraform-plugin-sdk/v2/terraform.(*ResourceConfig).Get(0xc0006b43f0, 0xc000d257e0, 0x1f, 0x1a89127, 0xd, 0xc000521678)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/terraform/resource.go:206 +0x53
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readPrimitive(0xc0006b4450, 0xc000d257e0, 0x1f, 0xc000920780, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b8bac7ffff, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:223 +0x85
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0006b4450, 0xc0006af4c0, 0x4, 0x4, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:101 +0x65c
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc0000074e0, 0xc0006af4c0, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa8
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x1d26820, 0xc0000074e0, 0xc0006b4900, 0x3, 0x3, 0xc0001d9040, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:180 +0x139
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readSet(0xc0006b4450, 0xc0006b4900, 0x3, 0x3, 0xc0001d9040, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:261 +0x13c
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0006b4450, 0xc0006b4900, 0x3, 0x3, 0x1838701, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:107 +0x905
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc0000074d8, 0xc0006b4900, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa8
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField(0x1d26820, 0xc0000074d8, 0xc0010022a0, 0x2, 0x2, 0xc00064ee70, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:236 +0x21a
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0006b4450, 0xc0010022a0, 0x2, 0x2, 0x187de01, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:109 +0x7ea
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc0000074c8, 0xc0010022a0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:327 +0xa8
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField(0x1d26820, 0xc0000074c8, 0xc000919440, 0x1, 0x1, 0xc0001d9180, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader.go:203 +0x37f
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc0006b4450, 0xc000919440, 0x1, 0x1, 0xc000d24b00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:103 +0x55f
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).ReadField(0xc0006b4450, 0xc000919440, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/field_reader_config.go:29 +0xd3
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Resource.InstanceState(0xc0001a9d40, 0xc00016e750, 0x24, 0xc0006b40f0, 0xc0006b40c0, 0x0, 0xc000275800, 0xc0006b40f0, 0x0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfshim/sdk-v2/resource.go:97 +0x1f6
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformState(0xc00067d200, 0x1d51d78, 0xc0001a9d40, 0x1a919d9, 0x13, 0xc00016e750, 0x24, 0xc00117f890, 0x5e4, 0x1, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfbridge/schema.go:858 +0x20d
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Diff(0xc000332c00, 0x1d46548, 0xc00117f800, 0xc000c044d0, 0xc000332c00, 0x18b0101, 0xc0006aec40)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfbridge/provider.go:730 +0x4c6
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1(0x1d46548, 0xc00117f800, 0x19ed180, 0xc000c044d0, 0x19fbee0, 0x265c400, 0x1d46548, 0xc00117f800)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.17.0/proto/go/provider.pb.go:2584 +0x8d
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x1d46548, 0xc00117ecf0, 0x19ed180, 0xc000c044d0, 0xc0001077a0, 0xc001174978, 0x0, 0x0, 0x1d25a40, 0xc0002d4410)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x31c
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler(0x1a43b00, 0xc000332c00, 0x1d46548, 0xc00117ecf0, 0xc0005fa960, 0xc0000b9220, 0x1d46548, 0xc00117ecf0, 0xc000d6a600, 0x118a)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.17.0/proto/go/provider.pb.go:2586 +0x15e
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc00051ca80, 0x1d54c38, 0xc000684480, 0xc0007e3200, 0xc000871f20, 0x26013c8, 0x0, 0x0, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1217 +0x52b
    google.golang.org/grpc.(*Server).handleStream(0xc00051ca80, 0x1d54c38, 0xc000684480, 0xc0007e3200, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1540 +0xd0c
    google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0004ecac0, 0xc00051ca80, 0x1d54c38, 0xc000684480, 0xc0007e3200)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:878 +0xb2
    created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:876 +0x1fd

I'm not sure if it's helpful. Let me know if there's anything more I can provide to make it easier to debug. I must say, it sounds like @nicro950 is onto something with #185 (comment).

@nicro950
Copy link

That looks like the exact same problem we had, but we manage to fix it with the steps I explained in an earlier comment. It could be that there is another field which is a bool value in the 4.x provider, and has a more complex value in the 5.x provider. @khellang Could it be that there is more than one ad application in the state?

@khellang
Copy link

Could it be that there is more than one ad application in the state?

No, just one application. We are setting FallbackPublicClientEnabled on that application though 🤷🏻‍♂️

@nicro950
Copy link

Was there any need to change the type of any fields when upgrading to the 5.x library? A way of troubleshooting that I used was upgrading the state to use the latest 5.x client and run refresh. That should result in the same problem being displayed, and then it is possible to remove one output block at a time to figure out what field is causing the problem. But from the error message it should be a field that is a bool in the 4.x provider, and something else in the 5.x provider. Not sure if there is more then the publicClient and _meta fields.

@khellang
Copy link

Was there any need to change the type of any fields when upgrading to the 5.x library?

No, it was a simple version bump and everything compiled cleanly. When running pulumi up I got the error above.

@nicro950
Copy link

Hmm, very strage, we have updated probably between 10 and 20 stacks by now, and we have not encountered any other problems than I described in my previous comment with publicClient and the _meta field. It could also be worth a shot to remove all the output blocks from the azure ad resources in the stack, then reimport the stack.

@barclayadam
Copy link

I had the same above error (panic: Unknown kind: bool) that was fixed by removing publicClient from the state package. Unfortunately, it just brings a new error, as below.

I am looking to upgrade a TS, using the Automation API, stack from v4.0.0 to v5.12.0

    panic: interface conversion: interface {} is nil, not string
    goroutine 101 [running]:
    github.com/hashicorp/terraform-provider-azuread/internal/services/applications/migrations.ResourceApplicationInstanceStateUpgradeV0(0x2301518, 0xc00012c268, 0xc000511ce0, 0x1e3ed80, 0xc0005bb880, 0x1, 0xc000159648, 0xb739d894d7f4ab5)
        /home/runner/go/pkg/mod/github.com/hashicorp/terraform-provider-azuread@v1.6.1-0.20211215222804-a7f59c2ea5f7/internal/services/applications/migrations/application_resource.go:550 +0x345
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.UpgradeJSONState(0x2301518, 0xc00012c268, 0x0, 0xc000511ce0, 0xc000185d40, 0x1e3ed80, 0xc0005bb880, 0xc000511ce0, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20201218231525-9cca98608a5e/helper/schema/grpc_provider.go:428 +0xe2
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.upgradeResourceState(0xc00070a3c0, 0xc000185d40, 0xc000994380, 0x13, 0xc000392d78, 0xc0002d5a01)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfshim/sdk-v2/upgrade_state.go:44 +0x238
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Diff(0xc00070a3c0, 0x204be17, 0x13, 0x23025b8, 0xc000dee9d0, 0x22e5220, 0xc0002d5ad0, 0xc0002d5920, 0x0, 0x0, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfshim/sdk-v2/provider.go:95 +0xd7
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Diff(0xc0005be000, 0x2301588, 0xc0002d46f0, 0xc000994310, 0xc0005be000, 0x1e69001, 0xc000de2400)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.11.0/pkg/tfbridge/provider.go:745 +0x6ea
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1(0x2301588, 0xc0002d46f0, 0x1fa6f40, 0xc000994310, 0x1fb5de0, 0x2c1b860, 0x2301588, 0xc0002d46f0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.17.0/proto/go/provider.pb.go:2584 +0x8d
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x2301588, 0xc000320630, 0x1fa6f40, 0xc000994310, 0xc000c96600, 0xc00071b1e8, 0x0, 0x0, 0x22e0a00, 0xc0004cdac0)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x31c
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler(0x1ffdec0, 0xc0005be000, 0x2301588, 0xc000320630, 0xc000f3f440, 0xc000286d20, 0x2301588, 0xc000320630, 0xc000ddaa80, 0x938)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.17.0/proto/go/provider.pb.go:2586 +0x15e
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc00070e8c0, 0x230fd58, 0xc0006c4900, 0xc000360a20, 0xc000537140, 0x2bc0808, 0x0, 0x0, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1217 +0x52b
    google.golang.org/grpc.(*Server).handleStream(0xc00070e8c0, 0x230fd58, 0xc0006c4900, 0xc000360a20, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:1540 +0xd0c
    google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000a2e130, 0xc00070e8c0, 0x230fd58, 0xc0006c4900, 0xc000360a20)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:878 +0xb2
    created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.1/server.go:876 +0x1fd

@wvanderdeijl
Copy link

I also run into the issue with interface {} is nil, not string
Looking at the callstack it seems to be triggered by this code:
https://github.com/hashicorp/terraform-provider-azuread/blob/9b876bc873732379e909edbe2d59d524cc845a00/internal/services/applications/migrations/application_resource.go#L550

That's migrating the groupMembershipClaims property in the state. I've tried removing it from the state, having it as "" and having it as "None" but in all these situations I get this error :-(

@wvanderdeijl
Copy link

The only workaround I could find for the panic: interface conversion: interface {} is nil, not string was to export the stack state, upgrade the schema manually, and import the fixed stack state.

The changes I had to make:

  • remove publicClient from outputs (as explained earlier to prevent panic: Unknown kind: bool)
  • set groupMembershipClaims in outputs to an array of strings (["None"] in our case)
  • add \"schema_version\":\"1\" to __meta in outputs to mark the schema to have been upgraded from (unspecified version 0) to version 1. This prevents pulumi/terraform to do their own attempt at upgrading the state which fails to upgrade groupMembershipClaims. Be careful as __meta is an escaped JSON. In the end we had this value:
    "__meta": "{\"e2bfxxxx-xxxx-xxxx-xxxx-xxxxxxxxc4c0\":{\"create\":300000000000,\"delete\":300000000000,\"read\":300000000000,\"update\":300000000000},\"schema_version\":\"1\"}",
    

@RehanSaeed
Copy link

I've been getting a 403 when calling new Application(appName, new ApplicationArgs() { DisplayName = appName }) have have raised #246. Is this issue related?

@nickpainter
Copy link

Issue is still present with @pulumi/azuread 5.19.0.

@jkodroff jkodroff self-assigned this Jul 21, 2022
@jkodroff
Copy link
Member

This appears to be resolved upstream. I was able to successfully run the following program to completion with Pulumi.AzureAD v5.26.1:

using Pulumi;

return await Deployment.RunAsync(() =>
{
  new Pulumi.AzureAD.Application("myapp", new Pulumi.AzureAD.ApplicationArgs
  {
    DisplayName = "myApp"
  });
});

@jkodroff jkodroff added the resolution/fixed This issue was fixed label Jul 21, 2022
@JontyMC
Copy link

JontyMC commented Dec 16, 2022

I am upgrading Pulumi.AzureAD from 2.6.1 to 5.32.0 and I am seeing this issue.

@scp-mb
Copy link

scp-mb commented May 24, 2023

Still an issue as of 5.37.0 upgrading from 4.x. Had to edit the state file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests