Pavan Kumar
11/25/2021, 4:21 PMnew StackA()
new StackB()
for (const region of ['us-east-1', 'us-east-2']) {
new StackC(region)
}
Ömer Toraman
11/25/2021, 4:21 PMÖmer Toraman
11/25/2021, 4:22 PMÖmer Toraman
11/25/2021, 4:22 PMFrank
sst deploy --region us-east-1
sst deploy --region us-east-2
@Pavan Kumar in your case, it seems you don’t want to deploy StackA
and StackB
to multiple regions. Can you elaborate on ur use case?Ömer Toraman
11/25/2021, 8:35 PMPavan Kumar
11/26/2021, 3:27 AMFrank
if (app.region === "us-east-1") {
new StackA()
new StackB()
}
new StackC()
And you can deploy to:
sst deploy --region us-east-1
sst deploy --region us-east-2
I’d like to think of an app as something that I can take it and deploy to any AWS account any region.Frank
if (app.stage === "prod") {
new StackA()
new StackB()
}
new StackC()
And you can deploy to:
sst deploy --stage prod --region us-east-1
sst deploy --stage prod-us-east-2 --region us-east-2
sst deploy --stage prod-us-west-1 --region us-west-1
sst deploy --stage prod-us-west-2 --region us-west-2
This way, you have your 1 main prod
stage, and X prod-$region
stages. From the name of the stage, you know prod
has all resources, and prod-$region
only has region specific resources.Pavan Kumar
11/26/2021, 3:29 PMFrank
thdxr
11/26/2021, 3:42 PMthdxr
11/26/2021, 3:44 PMFrank
thdxr
11/26/2021, 3:50 PMthdxr
11/26/2021, 3:52 PMPavan Kumar
11/26/2021, 3:58 PMthdxr
11/26/2021, 4:02 PMthdxr
11/26/2021, 4:03 PMPavan Kumar
11/27/2021, 4:51 AMPavan Kumar
11/27/2021, 4:54 AMsst deploy --region us-east-1
sst deploy --region us-east-2
Is it possible to use exported named output of one region to another region, as follows.
new CfnOutput(this, "TableName", {
value: bucket.bucketArn,
exportName: "MyBucketArn",
});
Frank
Frank