Hi, I'm not seeing any documentation suggesting th...
# aws
b
Hi, I'm not seeing any documentation suggesting that Pulumi can only create subnets in the us-east-* regions, but trying to create one in us-west-* seems to result in errors each time. The error message is:
Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f.
Has anyone else seen this issue or did I miss something in the docs? Thanks.
b
Is the VPC you're passing it located in US-West-1? I think that's what determines what AZs are valid
b
VPC is in the us-west-2 region and the AZ is set to us-west-2a
s
your admin can also lock down where you are allowed to deploy resources, I have created subnets in almost every Region bar Japan, China and Australia with pulumi and the only reason I cannot create them there is my Admin has made it so I cannot make them... are you sure that the VPC was created in us-west-2 ?
l
If you are working with a stack where you want to manage stacks in multiple regions, it might be that you need to manage separate providers for the regions involved. For instance, if you are using both
us-east-1
and
us-west-2
, something like:
Copy code
const usEast1 = new aws.Provider("us-east-1", {
  region: "us-east-1",
  ...
})

const usWest2 = new aws.Provider("us-west-2", {
  region: "us-west-2",
  ...
})

const eastVpc = new aws.vpc.Vpc(..., { ... }, { provider: usEast1 })

const westVpc = new aws.vpc.Vpc(..., { ... }, { provider: usWest2 })
b
Thanks, @lively-crayon-44649 I'll give that a try and see if that works out.