anyone knows how to get provider related configura...
# general
t
anyone knows how to get provider related configuration from code (basically from another namespace)? (for example gcp project)
b
gcp.config.project should do it
its in the config namespace
t
in any case it automatically adds full_key with a project_name prefix, so it becomes: project_name:gcp.config.project
b
what language are you using?
t
using python and trying for example: config.require('gcp.config.project') config.require('gcp.project') config.require('gcp:project') but in all cases result is the same
b
you need to load the config of the "gcp" namespace
and then it will give you access to this
config = pulumi.Config() project = config.get('project')
so like that
notice no need for
gcp:
t
yep, tried this way as well, but still: error: Missing required configuration variable 'project_name:project'
b
that's kinda different
what does your Pulumi.<stack>.yaml file look like? (please remove sensitive info)
t
encryptionsalt: .... config: gcpproject project_name gcpregion region_name [and some other stack specific vars]