https://pulumi.com logo
Title
s

salmon-account-74572

07/01/2020, 8:19 PM
Hi all, I was running into a problem with type mismatches that was fixed by a recent commit (see https://pulumi-community.slack.com/archives/CCWP5TJ5U/p1593124071219300 and the resulting thread). However, it now appears that the use of
Pulumi.Map
to create maps for assigning AWS tags is broken. Sample code is threaded below.
I was using the following code pattern to assign AWS tags to various objects:
Tags: pulumi.Map{
 	"Name": pulumi.String(fmt.Sprintf("%s-priv-rt", baseName)),
 	k8sTag: pulumi.String("shared"),
},
This worked with version 2.4.0 of the Pulumi SDK, but using the latest commit causes this error to appear when running `pulumi up`:
./main.go:139:4: cannot use pulumi.Map literal (type pulumi.Map) as type pulumi.StringMapInput in field value:
    	pulumi.Map does not implement pulumi.StringMapInput (missing ToStringMapOutput method)
Is this a bug with the SDK, or am I doing something wrong? (I'd be inclined to think it was the latter if it hadn't worked earlier.)
l

lemon-agent-27707

07/01/2020, 8:27 PM
There was a change that restricted maps to only having string values: https://github.com/pulumi/pulumi-aws/blob/master/CHANGELOG.md#2100-2020-06-23 you'll need to use
pulumi.StringMap
Sorry for the inconvenience.
s

salmon-account-74572

07/01/2020, 8:33 PM
OK, that seems to fix it. VS Code still thinks it's an error (I guess it's the Go language server reporting an issue), but
pulumi up
works.
l

lemon-agent-27707

07/01/2020, 8:34 PM
Great, glad to hear it's working!
s

salmon-account-74572

07/01/2020, 8:51 PM
BTW: making sure
$GOPATH/bin
was included in
$PATH
fixed the "errors" in VS Code