This message was deleted.
# general
s
This message was deleted.
e
Forcing it to be required isn't something we'd considered, but I guess that looks reasonable, if you want to raise an issue to track that we could probably get the config system fixed up pretty easy to enable it. Getting the project should just be
config.Get(ctx, "gcp:project")
r
So config.Require() doesn’t exist in the same way as for environment other config then? Ultimately I can programmatically catch it and handle it for now.
The top level functions take namespaces keys, e.g. "namespace:value"
I think once you have a Config type and call Get/Require on that it's limited to just one namespace (generally the project namespace)
r
Mmm okay; interesting thanks so much for the tips I’m gonna dive in and have a look see where I land. I might also raise and issue if I see it still of value.
s
I have a working Go project that uses multiple config namespaces:
Copy code
awsRegion := config.Require("aws:region")
keyPair := config.Require("keypairname")
Granted, I wrote this a while ago, but I just ran
pulumi up
with no issues (Go 1.19, Pulumi 3.76.1).