https://pulumi.com logo
#general
Title
# general
l

little-soccer-5693

11/01/2021, 9:55 PM
hello. i'm following the example in the pulumi go SDK for creating an apigatewayv2.Route(https://github.com/pulumi/pulumi-aws/blob/master/sdk/go/aws/apigatewayv2/route.go#L82); however the example fails to compile:
Diagnostics:
pulumi:pulumi:Stack (lambdaexample-dev):
error: an unhandled error occurred: program exited with non-zero exit code: 1
panic: applier must have 1 input parameter assignable from pulumi.ID
goroutine 1 [running]:
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.makeContextful({0xbe88a0|github.com/pulumi/pulumi/sdk/v3/go/pulumi.makeContextful({0xbe88a0>, 0xd77960}, {0xe675f0, 0xc9a9e0})
/home/mbrown/src/lambdaexample/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:340 +0x4a6
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyT(0xc000527180|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyT(0xc000527180>, {0xbe88a0, 0xd77960})
/home/mbrown/src/lambdaexample/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:419 +0x5d
main.createResources(0xc000370c80)
/home/mbrown/src/lambdaexample/main.go:186 +0xd98
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunWithContext(0xc000370c80|github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunWithContext(0xc000370c80>, 0xd77968)
/home/mbrown/src/lambdaexample/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/run.go:103 +0x199
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunErr(0x43f0c5|github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunErr(0x43f0c5>, {0x0, 0x0, 0xc0000001a0})
/home/mbrown/src/lambdaexample/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/run.go:84 +0x310
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.Run(0x0|github.com/pulumi/pulumi/sdk/v3/go/pulumi.Run(0x0>, {0x0, 0xba3520, 0xc0000001a0})
/home/mbrown/src/lambdaexample/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/run.go:41 +0x25
main.main()
/home/mbrown/src/lambdaexample/main.go:228 +0x27
exit status 2
any suggestions?
i seem to have found the problem.
exampleIntegration.ID().ApplyT
should instead be:
exampleIntegration.ID().ToStringOutput().ApplyT
b

bored-oyster-3147

11/01/2021, 10:49 PM
Btw if you do an Apply without doing a transformation of the output than it is a no-op. You don't need the apply.
14 Views