curved-quill-94238
02/22/2022, 3:39 PMconfig
from inside an inline program (Python flavor)? I feel like there must be a way to do this, but I haven't found it in the docs, examples, or Stack Overflow
I tried pulumi.get_stack()
to see if I could then run get_config
, but apparently get_stack
returns just the str
of the stack name, not the actual Stack
object itselfpulumi.runtime.get_config
? seems like it might bebland-continent-32037
02/22/2022, 10:37 PMpulumi config
has get functionality, and it's accessible programmatically. It looks like this:
config = pulumi.Config();
name = config.require('name');
lucky = config.get_int('lucky') or 42
print(f'Hello, {name} -- I see your lucky number is {lucky}!')
curved-quill-94238
02/23/2022, 4:44 PMPulumiFn
that I don't get when using pulumi.runtime.get_config
error: an unhandled error occurred: Missing required configuration variable 'iac-demo:proj:aws_account_id'
please set a value using the command `pulumi config set iac-demo:proj:aws_account_id <value>`