Hi all ! I have a question regarding extracting se...
# general
Hi all ! I have a question regarding extracting secrets from STACK configuration files. Based on this document, there is provision to store secrets based on a provided path. Something like this
Copy code
pulumi config set --path --secret endpoints[0].token accesstokenvalue
Now, if we wish to access this secret within the Pulumi script, I am not certain if we can access it directly like the usual way mentioned in the docs:
Copy code
import pulumi
config = pulumi.Config()
How would we extract something that is deep in the STACK config file because the require_secret function takes a string and not a namespaced variable
you have to read the whole endpoints object
I dont know how to do this in python but it should look like this
Copy code
config.require_secret('endpoints').apply(a => a[0].token)