I just tried to convert a small-ish collection of ...
# python
t
I just tried to convert a small-ish collection of Terraform TF to Pulumi using
pulumi convert --from terraform --language python
and I got this error message with a long stack trace (in thread.) Any ideas? I’m using the Keycloak Terraform provider.
Copy code
Converting to python...
panic: fatal: An assertion has failed: error typechecking expression: :0,0-0: cannot assign expression of type {

  attributes: map(dynamic)?,

  clientId: string?,

  compositeRoles: list(string)?,

  description: string?,

  id: string?,

  name: string?,

  realmId: string?,

} to location of type output(string?):
Copy code
goroutine 68 [running]:

<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)>

        /home/runner/work/pulumi/pulumi/sdk/go/common/util/contract/failfast.go:23

<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf>(0xd8?, {0x10590ca97?, 0x1?}, {0x14001837ff8?, 0x10640af20?, 0x14000c922a0?})

        /home/runner/work/pulumi/pulumi/sdk/go/common/util/contract/assert.go:35 +0xe0

<http://github.com/pulumi/pulumi/pkg/v3/codegen/pcl.(*observeContext).PostVisit(0x14001bee180|github.com/pulumi/pulumi/pkg/v3/codegen/pcl.(*observeContext).PostVisit(0x14001bee180>, {0x10640aca0, 0x14001bc7d00})

        /home/runner/work/pulumi/pulumi/pkg/codegen/pcl/rewrite_apply.go:572 +0xb4

<http://github.com/pulumi/pulumi/pkg/v3/codegen/pcl.(*applyRewriter).postVisit(0x14001656cc0|github.com/pulumi/pulumi/pkg/v3/codegen/pcl.(*applyRewriter).postVisit(0x14001656cc0>, {0x10640aca0?, 0x14001bc7d00?})

        /home/runner/work/pulumi/pulumi/pkg/codegen/pcl/rewrite_apply.go:249 +0x38

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitFunctionCall(0x14001bc7d00|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitFunctionCall(0x14001bc7d00>, 0x14001bc7d00?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:157 +0x114

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640aca0|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640aca0>?, 0x14001bc7d00?}, 0x14001838238?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:323 +0x98

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitExpressions({0x14001817980|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitExpressions({0x14001817980>, 0x6, 0x6}, 0x14001838618, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:273 +0xac

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitTupleCons(0x140001d3a80|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitTupleCons(0x140001d3a80>, 0x140001d3a80?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:247 +0x48

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640b020|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640b020>?, 0x140001d3a80?}, 0x14001651d00?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:341 +0x26c

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitExpressions({0x1400151fd10|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitExpressions({0x1400151fd10>, 0x1, 0x1}, 0x14001838618, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:273 +0xac

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitFunctionCall(0x14001bc7e00|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.visitFunctionCall(0x14001bc7e00>, 0x14001bc7e00?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:152 +0x48

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640aca0|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.VisitExpression({0x10640aca0>?, 0x14001bc7e00?}, 0x0?, 0x14001838608)

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/visitor.go:323 +0x98

<http://github.com/pulumi/pulumi/pkg/v3/codegen/pcl.RewriteAppliesWithSkipToJSON({0x10640aca0|github.com/pulumi/pulumi/pkg/v3/codegen/pcl.RewriteAppliesWithSkipToJSON({0x10640aca0>, 0x14001bc7e00}, {0x1063e8540, 0x105f65c08}, 0x0, 0x1)

        /home/runner/work/pulumi/pulumi/pkg/codegen/pcl/rewrite_apply.go:681 +0x14c

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).lowerExpression(0x140011fabc0|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).lowerExpression(0x140011fabc0>, {0x10640aca0?, 0x14001bc7e00?}, {0x10640a920, 0x140001d3500})

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program_expressions.go:33 +0x58

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration(0x140011fabc0|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration(0x140011fabc0>, {0x1063e6498, 0x14000f557d0}, 0x1400083a210, 0x0)

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:794 +0x1c74

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration.func2()|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration.func2()>

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:846 +0xec

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)>

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/format/gen.go:85

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResourceDeclaration>(0x140011fabc0, {0x1063e6498, 0x14000f557d0}, 0x1400083a210, 0x1)

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:841 +0x964

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResource(...)|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genResource(...)>

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:967

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition.func3.1()|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition.func3.1()>

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:272 +0x3a0

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)>

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/format/gen.go:85

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition.func3()|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition.func3()>

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:240 +0x344

<http://github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)|github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model/format.(*Formatter).Indented(...)>

        /home/runner/work/pulumi/pulumi/pkg/codegen/hcl2/model/format/gen.go:85

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition|github.com/pulumi/pulumi/pkg/v3/codegen/python.(*generator).genComponentDefinition>(0x140011fabc0, {0x1063e6498, 0x14000f557d0}, 0x140002b86e0, {0x140000639bf, 0x5})

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:220 +0x2ac

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.GenerateProgram(0x140011fa340)|github.com/pulumi/pulumi/pkg/v3/codegen/python.GenerateProgram(0x140011fa340)>

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:93 +0x2dc

<http://github.com/pulumi/pulumi/pkg/v3/codegen/python.GenerateProject({0x106fe4f10|github.com/pulumi/pulumi/pkg/v3/codegen/python.GenerateProject({0x106fe4f10>, 0x1}, {{0x14001372920, 0x7}, {{0x14001372927, 0x9}, 0x0}, {0x0, 0x0}, 0x0, ...}, ...)

        /home/runner/work/pulumi/pulumi/pkg/codegen/python/gen_program.go:305 +0x38

main.(*pythonLanguageHost).GenerateProject(0x1070bb8e0?, {0x10636e600?, 0x40?}, 0x14000928a80)

        /home/runner/work/pulumi/pulumi/sdk/python/cmd/pulumi-language-python/main.go:1068 +0x2c8

<http://github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GenerateProject_Handler.func1({0x1063fe888|github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GenerateProject_Handler.func1({0x1063fe888>?, 0x14000205920?}, {0x10632e460?, 0x14000928a80?})

        /home/runner/work/pulumi/pulumi/sdk/proto/go/language_grpc.pb.go:445 +0xd0

<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1063fe888|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1063fe888>, 0x140007038c0}, {0x10632e460, 0x14000928a80}, 0x14000b68b00, 0x14000ca0b40)

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

<http://github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GenerateProject_Handler({0x10636e600|github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GenerateProject_Handler({0x10636e600>, 0x14000b6a940}, {0x1063fe888, 0x140007038c0}, 0x14000928a00, 0x14000b68700)

        /home/runner/work/pulumi/pulumi/sdk/proto/go/language_grpc.pb.go:447 +0x148

<http://google.golang.org/grpc.(*Server).processUnaryRPC(0x1400020ca00|google.golang.org/grpc.(*Server).processUnaryRPC(0x1400020ca00>, {0x1063fe888, 0x14000703830}, {0x106407ae0, 0x14000827380}, 0x140008dea20, 0x14000702a20, 0x1070ed970, 0x0)

        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1369 +0xb58

<http://google.golang.org/grpc.(*Server).handleStream(0x1400020ca00|google.golang.org/grpc.(*Server).handleStream(0x1400020ca00>, {0x106407ae0, 0x14000827380}, 0x140008dea20)

        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1780 +0xb20

<http://google.golang.org/grpc.(*Server).serveStreams.func2.1()|google.golang.org/grpc.(*Server).serveStreams.func2.1()>

        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1019 +0x8c

created by <http://google.golang.org/grpc.(*Server).serveStreams.func2|google.golang.org/grpc.(*Server).serveStreams.func2> in goroutine 23

        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1030 +0x13c

error: could not generate output program: error reading from server: EOF
w
Thanks for the bug report. Opening an issue in pulumi/pulumi would help make sure this is tracked! I do see https://github.com/pulumi/pulumi/issues/16205 open, which could be related, but would be great to have a new issue on this to make sure.