This message was deleted.
# general
s
This message was deleted.
h
At the most basic, you can create different "providers" for each region ("us-west-2", "us-east-1", etc.). When you create a resource, pass the
provider
to create the resource in that region. Here is an example of creating a us-east-1 provider in TypeScript:
Copy code
const useast1 = await (async () => {
    const provider = new aws.Provider("useast1", { region: "us-east-1"})
    await ProviderResource.register(provider)
    return provider
  })()
l
ProviderResource doesn't seem to be documented outside of the API docs, and the API docs are pretty light too: it doesn't say why I'd use ProviderResource or what it's for. I've been using providers straight from the constructor:
Copy code
const usEast1 =  new aws.Provider("useast1", { region: "us-east-1"});
const vpc = new awsx.ec2.Vpc("vpcInUsEast1", { /* ... */ }, { [provider: usEast1});
Is this the wrong thing to do? What am I missing out on by not using
ProviderResource.register
?
h
I'm not sure. I think I copied that code from somewhere and didn't think about what's it doing.