Is it possible to get config values from a default...
# getting-started
b
Is it possible to get config values from a default provider? I want to get the default project assigned to the GCP default provider. To work around I can add another config key for project, but it seems strange to have both
gcp:project
and
<namespace>:project
set in config
p
If itโ€™s already available in the config, you can easily read the values from another namespace.
Config
constructor takes an additional parameter - you can specify the namespace there
b
Oh! Thanks for the pointer! I was looking for exactly that ๐Ÿ™‚
p
Copy code
gcp_config = pulumi.Config("gcp")
gcp_project = gcp_config.require("project")
something like that ๐Ÿ™‚
b
yup works like a charm, thanks again