Hey everyone! i'm new to pulumi. I was trying to f...
# python
m
Hey everyone! i'm new to pulumi. I was trying to fetch all the stack config values dynamically but couldn't find a way to do so in the docs. Am I missing something or is it not possible to get all the stack config values dynamically?
v
Hey, you want to get the config values from a local or inline program?
m
I was trying to get from the python script
import pulumi
config = pulumi.Config()
v
That's a good start, you can use that config object to get the properties from your stack e.g. config.get() or config.require()
m
so i'm able to fetch all the configs if i already know the key using config.get(<key_name>). What I want to do is list out all the configs that are available without knowing the keys. Something like this if possible
import pulumi
config = pulumi.Config()
all_configs = config.get_all()
for key, value in all_configs.items():
print(key, value)
v
That's something that you can do via the automation API, but it runs a bit different compared to your local program (pulumi).