Hi, I'm Edward, a newbie in pulumi. It's a fantast...
# general
q
Hi, I'm Edward, a newbie in pulumi. It's a fantastic iac tool! I have a simple question for the config store. In python I didn't find a method provided in Config to iterate all configs or secrets. I'm trying to get some configs with same prefix 'myprefix:'. Is there any way to filter the config? Or I need to use something like dictionary for these configs and store to one key? 😊
l
For each prefix, you construct a separate Config object: https://www.pulumi.com/docs/reference/pkg/python/pulumi/#pulumi.Config
Then you can get or require all the values from one prefix with that object.
Iteration is not supported. You cannot access a value unless you know its key.
q
Got it! Thanks very much for your help ❤️