brash-waiter-28842
07/03/2021, 6:06 AMnet, err := compute.NewNetwork(ctx, infraName, networkConf)
if err != nil {
return err
}
ctx.Export("vpcName", net.Name)
Here’s the output of it getting created:
Updating (mars-vpc):
+ pulumi:pulumi:Stack gcp-mars-vpc creating
+ gcp:compute:Network mars-vpc creating
+ gcp:compute:Network mars-vpc created
+ pulumi:pulumi:Stack gcp-mars-vpc created
Outputs:
vpcName: "mars-vpc"
Resources:
+ 2 created
For GKE, I am trying to get the `vpcName`:
vpcStack, err := pulumi.NewStackReference(ctx, vpcStackName, nil)
if err != nil {
panic(err)
}
vpcName := vpcStack.GetOutput(pulumi.String("vpcName"))
gkeConf := &container.ClusterArgs{
Description: pulumi.StringPtr(fmt.Sprintf("GKE created for %s-krate", strings.Split(stack, "-")[0])),
Location: pulumi.StringPtr("asia-southeast2"),
Name: pulumi.StringPtr(infraName),
Network: vpcName.ApplyT(func(v string) string {
return v
}).(pulumi.StringOutput),
}
But i get this error:
stderr: error: an unhandled error occurred: go inline source runtime error, an unhandled error occurred:: applier must have 1 input parameter assignable from interface {}
what am i missing? any help would be appreciated…No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by