https://pulumi.com logo
Title
b

better-actor-92669

11/18/2019, 3:13 PM
Hi guys. When you set
pulumi config set gcp:project <your-project-here>
, how can I then get the value of it?
config.get("gcp:project")
doesn't work, even though it is set:
config:
  gcp:project: some-project-name
from pulumi_gcp.config import project, zone

cluster_name = project + '-gke-cluster-1'
f

future-barista-68134

11/18/2019, 5:15 PM
See https://www.pulumi.com/docs/intro/concepts/config/. Make sure you create the config object first:
config = pulumi.Config()
. Also here’s a link to the API reference: https://www.pulumi.com/docs/reference/pkg/python/pulumi/#configuration-and-metadata%C2%B6
b

better-actor-92669

11/19/2019, 12:04 AM
thanks @future-barista-68134. I posted a solution to my own question