<@U016960RCFK> did you find an answer? I am stucke...
# python
d
@flat-australia-79845 did you find an answer? I am stucked trying to read the gcp.config.region in python, I am trying to import pulumi_gcp.config but it does not exists
g
d
Not sure I understood. I can ‘t read the GCP region configuration param in python
f
@damp-elephant-82829 I had to do
from pulumi_gcp import config
as well as
import pulumi_gcp as gcp
then, if you have your stack set, you should be able to read it with
gcp.config.region
.
this is my import lines
Copy code
import pulumi
import pulumi_gcp as gcp
from pulumi_gcp import config, storage, cloudfunctions, cloudscheduler  # noqa
d
How do you access config then? gcp.config.region ?
f
yes
does it work for you? if not, how does your config file looks like?
is your stack selected?
d
it tells me that pulumi_gcp does not contain the module config
even if I have done a pulumi config set gcp:region ‘eu-west3’
f
are you doing
from pulumi_gcp import config
?
d
I am doing import pulumi_gcp; pulumi_gcp.config
f
I know this does not make sense, but you have also to import config with:
from pulumi_gcp import config