https://pulumi.com logo
Title
b

busy-insurance-52853

10/26/2021, 2:07 PM
hey all, I am having really tough time figuring out how to fetch exported variable in golang so I
ctx.Export("vpcID", vpc.ID())
and I want to get that output later on in the script, how do I do that?
b

billowy-army-68599

10/26/2021, 2:08 PM
oh sorry, wait. do you want this in another pulumi program? or inside the same one @busy-insurance-52853?
b

busy-insurance-52853

10/26/2021, 2:10 PM
same one, I did try this but did not provide full slug like
jaxxstorm/eks.go/%v
lemme give it a go
where did you get that string from btw?
note: im running in local at the moment
b

billowy-army-68599

10/26/2021, 2:14 PM
oh, you're using local backends?
b

busy-insurance-52853

10/26/2021, 2:15 PM
yes, i am testing pulumi at the moment and wanted to use it locally first
bonus question: if its possible I would like to fetch that info within the code and not hard code it
b

billowy-army-68599

10/26/2021, 2:24 PM
what are your projects/stacks called? you have to hard code it, because the projects have a specific name
can you show me the output of
pulumi stack ls
b

busy-insurance-52853

10/26/2021, 2:25 PM
* main > p stack ls
NAME  LAST UPDATE     RESOURCE COUNT
dev*  27 minutes ago  8
not sure how project is named, I guess its the
name
in
Pulumi.yaml
, its
name: infra
i might have pulled off something which is not doable, lemme share you my code
send the repo to jaxxstorm