hi guys, still in the "getting started" phase of P...
# getting-started
w
hi guys, still in the "getting started" phase of Pulumi. With output variables, what are my optins to push them into other programs? I could write c# code in the Pulumi program and push that into octopus as a variable, or are there are any other methods? In my case, I want to use the property of something I provision as a variable fgor an octopus deployment.
e
You can use the pulumi cli to write out stack outputs as a json blob, e.g:
Copy code
$ pulumi stack output --json --stack dev
{
  "bucketName": "my-bucket-026fb45",
  "codeId": "arn:aws:codebuild:us-west-1:616138583583:project/project-ba84a1b"
}
w
hmm I ran that command but it says stack dev cant be found? but i have a dev stack.
e
What does
pulumi stack ls
show?
w
I fixed this by running pulumi stack select dev -c, so now the command doesn't error out.
Note I have not yet defined output variables. Maybe its a bug in the cli.
ah looking at the vstacks the first was gurdips1/dev
e
Yeh it might not of been able to auto fill the project name depending on what your directory was when you ran
stack output
w
This raises a few Questions. When I am running pulumi commands, I notice a lot of them don't speicfy a project name. So presumably should be run in the directory of the project?
with the stack output command, the output variable is a secret, how can I get the actual plaintext value?
e
They don't have to be run from the project directory, but if you run them from elsewhere you need to tell it which project you mean. If you run it from the project directory the cli can auto-fill the project name based on the Pulumi.yaml it finds.
Copy code
$ pulumi stack export --help
...
      --show-secrets false   Emit secrets in plaintext in exported stack. Defaults to false
w
ah gotcha! That's helpful on both of my questions. On another note, I deployed my first pulumi program and was a breeze.
🙌 1