This message was deleted.
s
This message was deleted.
m
Will require that your state is stored securely as the passwords will not be encrypted in the state file.
t
@miniature-king-36473 I'm just playing with that actually. If I was to use this with the pulumi web service would that count as the stack being stored securely?
Presumably I'd just create my .env by interpolating these values?
m
https://www.pulumi.com/docs/intro/concepts/state mentions "Encrypted state in transit and at rest" Yes you can interpolate them. An alternative is to use the AWS Parameter store for the passwords and pull these down in the ansible script. However this may be overkill for your use case.
🙌 1
t
Thanks @miniature-king-36473 - this looks like a good solution. Is there a way to query just a part of the state? Say I wanted to just ask for the
--show-secrets
of one part of the state?
m
to get the passwords I would just reference the resources you create for the password - no need to query the state.
Copy code
const password = new random.RandomPassword("password", {...})

// can just reference the generated password in code.
password.generated
t
Got it, I was more meaning if I as an operator wanted to look up a particular password for a service on one of the machines I've set up (say I wanted to log into a database with one of the randomly generated passwords)
m
you could publish them as an output of your stack, allowing you to retrieve them with
pulumi stack --show-secrets output [password-name]
t
perfect, thanks!
@miniature-king-36473:
pulumi stack output --show-secrets -j | jq ".secrets.hasura"
perfect 🙂
🙌 1