https://pulumi.com logo
f

faint-motherboard-95438

01/04/2019, 1:28 PM
How am I supposed to keep consistent strings or data (ie. passwords) generated during components creation process (not coming from the config) ? If I generate something random, pulumi wants to change it every time I run an update, which is not what I want, I want to keep it during the stack lifetime or until destroyed otherwise.
a

abundant-airplane-93796

01/04/2019, 1:40 PM
could you check for the existence of the value in the config, generate and store it if not present? or is config a complete no-go
(will freely admit i don't know right now if there's a way to set config values from the code - just getting started with pulumi...)
f

faint-motherboard-95438

01/04/2019, 1:44 PM
If there’s a way to store it in the config from the code, that would be perfect, but unfortunately I don’t think we can (or I don’t know how). But anyway my goal is to keep them independent from real user inputs in the config.
ok nevermind, I found it, there’s a package for that
@pulumi/random
Sorry I didn’t dig enough 🙂
w

white-balloon-205

01/04/2019, 7:07 PM
Yes -
@pulumi/random
is very handy for generating persistent secrets/randomness within a Pulumi program.