https://pulumi.com logo
Title
a

alert-gpu-24581

04/12/2021, 5:12 PM
Hello good fellas. First time pulumi user here. Any pointer on what’s the current stable go sdk version ? I am trying to spin an ec2 instance. The web server example is old (not v3) and the current reference doc does not have go sample
b

billowy-army-68599

04/12/2021, 5:14 PM
oh thankyou, I didn't know this was missing! cc @limited-planet-95090
We do have an example here that's up to date: https://github.com/pulumi/examples/tree/master/aws-go-webserver
l

limited-planet-95090

04/12/2021, 5:17 PM
@alert-gpu-24581 Sorry to hear you ran into this problem in the docs. We’re working on updating the Go version in our docs and examples.
a

alert-gpu-24581

04/12/2021, 5:18 PM
That example doc go code is not working on v3. I was following the go getting started guide. Create bucket works, but ec2/ lookup Ami throws a bunch go build error
Thank you for the prompt answer
b

billowy-army-68599

04/12/2021, 5:20 PM
can you share the code you have, the provider version you're using and the error?
a

alert-gpu-24581

04/12/2021, 5:23 PM
Sure. Gimme a second,
there were two issues. by deault go mod init picked an older (3.22) version, which didn't have the lookupAmi method,. so that was first error.
after fixing that, i hit the second error, which I think is related to the Map type. I fixed it entirely by guessing (YOLO). Let me know if its correct.
it will be super helpful if theres godoc for the core types etc.
b

billowy-army-68599

04/12/2021, 7:15 PM