https://pulumi.com logo
#general
Title
# general
i

icy-controller-6092

08/22/2022, 6:45 PM
Hi all, if I create a
new aws.Provider(region, { region })
everything on the class is now an
Output
… how can I access the region as a string elsewhere in the code, which was statically defined on creation? I am trying to do an API gateway multi-region deployment, and need to give each resource a unique name. I want to append the name of the provider to all the resources generated per provider
it’s a shame the URN doesn’t include the region
basically I’m trying to get this to work:
Copy code
const regions = ['us-west-1', 'us-east-2']
for (const region of regions) {
  const apiStack = createApiStack(new aws.Provider(region, { region  })
}
2 Views