https://pulumi.com logo
Title
f

famous-art-56985

03/03/2022, 12:47 PM
Pulumi does not seem to allow me to access config values for the provider programmatically. For example if I write:
config.get('gcp:project')
p

prehistoric-activity-61023

03/03/2022, 12:49 PM
config values are namespaced
you need to access the
gcp
namespace first like:
config = Config("gcp")
config.get("project")
(writing from my memory so please adjust based on IDE hints)
by default,
Config
object resolves to your project namespace so it cannot be used to access other namespaces
f

famous-art-56985

03/03/2022, 12:53 PM
wonderful thanks:
const project = new pulumi.Config('gcp').require('project');
const namespace = new pulumi.Config('kubernetes').require('namespace');
Seems to work
🙌 1