I had added a config.require("aws:region") statement, the problem went away when I removed the statement
b
broad-dog-22463
10/31/2020, 6:20 PM
@average-kilobyte-47828 it’s because the config.require isn’t correct. You need to declare a config of type aws and then you can get the region
Something like (typing on phone)
Const conf = new Pulumi.Config(“aws”)
Const region = conf.get(“region”)
a
average-kilobyte-47828
10/31/2020, 6:47 PM
thanks @broad-dog-22463, that makes sense but wasn't apparent to me from the docs
b
broad-dog-22463
10/31/2020, 6:53 PM
Sorry about that - there are a couple of ways here to get the region - that namespace config object or I believe you can use Pulumi.config.region (without needing to instantiate the config object)
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.