https://pulumi.com logo
#python
Title
b

brief-school-94535

03/22/2019, 3:15 PM
@microscopic-pilot-97530 I can retrieve the
Copy code
conf = pulumi.Config(‘gke’)
stack_name = conf.require(‘name’)
No problem but
Copy code
gcp_project = conf.require(‘gcp:project’)
gcp_zone = conf.require(‘gcp:zone’)
Error with
Copy code
pulumi:pulumi:Stack (gke-k8s):
    error: Missing required configuration variable ‘gke:gcp:project’
        please set a value using the command pulumi config set gke:gcp:project <value>
    error: an unhandled error occurred: Program exited with non-zero exit code: 1
The config values are set in my Pulumi.k8s.yaml file. any advise?
m

microscopic-pilot-97530

03/22/2019, 3:24 PM
I think you want to do something like:
Copy code
gcp_conf = pulumi.Config('gcp')
gcp_project = gcp_conf.require('project')
gcp_zone = gcp_conf.require('zone')
b

brief-school-94535

03/22/2019, 3:25 PM
Ok I see the namespace for gcp is different from the overall project & stack?
m

microscopic-pilot-97530

03/22/2019, 3:26 PM
Right
b

brief-school-94535

03/22/2019, 3:27 PM
boom that worked
🎉 1
thx Justin
😄 1
I think the docs should be a bit clearer on the config portion. I thought the namespace was tied to the projectstack then the rest of it appended but clearly this is not hte case
m

microscopic-pilot-97530

03/22/2019, 3:34 PM
Agreed. We could definitely make this more clear in the docs.
❤️ 1