Garret Harp
04/16/2022, 5:55 PMthdxr
04/16/2022, 9:57 PMthdxr
04/16/2022, 9:58 PMGarret Harp
04/16/2022, 10:49 PMFrank
Garret Harp
04/18/2022, 4:59 PMconst regions = [
'us-east-1',
'us-west-1',
...
]
const data = new DataStack(app, 'Data', {
region: 'us-east-1',
replicateTo: regions.filter(r => r !== 'us-east-1')
})
const apis = [...regions].map(r => {
return new ApiStack(app, `Api${r}`, {
region: r,
table: data.dynamodbTable
})
})
new Route53Stack(app, 'Route53', {
region: 'us-east-1',
apiUrls: apis.map(api => api.url)
})
That would be super cool, obviously a few minor changes would need to be made specifically for local dev so its just one region not global table no route53 but would be easy enough to change per env given existing way apps are created basically just need the ability to add a region modifier.Garret Harp
04/18/2022, 5:05 PM