https://pulumi.com logo
#general
Title
# general
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:
Copy code
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:
Copy code
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:
Copy code
const project = new pulumi.Config('gcp').require('project');
const namespace = new pulumi.Config('kubernetes').require('namespace');
Seems to work
🙌 1
3 Views