sst 2.1.24 → 2.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap.d.ts +1 -1
- package/bootstrap.js +5 -2
- package/cli/commands/bootstrap.d.ts +2 -0
- package/cli/commands/bootstrap.js +5 -1
- package/package.json +1 -1
- package/sst.mjs +17 -6
package/bootstrap.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export declare const useBootstrap: () => Promise<{
|
|
|
2
2
|
version: string;
|
|
3
3
|
bucket: string;
|
|
4
4
|
}>;
|
|
5
|
-
export declare function bootstrapSST(tags?: Record<string, string>, publicAccessBlockConfiguration?: boolean): Promise<void>;
|
|
5
|
+
export declare function bootstrapSST(tags?: Record<string, string>, publicAccessBlockConfiguration?: boolean, qualifier?: string): Promise<void>;
|
package/bootstrap.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from "path";
|
|
|
3
3
|
import { bold, dim } from "colorette";
|
|
4
4
|
import { spawn } from "child_process";
|
|
5
5
|
import { DescribeStacksCommand, CloudFormationClient, } from "@aws-sdk/client-cloudformation";
|
|
6
|
-
import { Duration, Tags, Stack, RemovalPolicy,
|
|
6
|
+
import { App, DefaultStackSynthesizer, CfnOutput, Duration, Tags, Stack, RemovalPolicy, } from "aws-cdk-lib";
|
|
7
7
|
import { Function, Runtime, Code } from "aws-cdk-lib/aws-lambda";
|
|
8
8
|
import { SqsEventSource } from "aws-cdk-lib/aws-lambda-event-sources";
|
|
9
9
|
import { PolicyStatement } from "aws-cdk-lib/aws-iam";
|
|
@@ -81,7 +81,7 @@ async function loadCDKStatus() {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
export async function bootstrapSST(tags, publicAccessBlockConfiguration) {
|
|
84
|
+
export async function bootstrapSST(tags, publicAccessBlockConfiguration, qualifier) {
|
|
85
85
|
// Normalize input
|
|
86
86
|
tags = tags || {};
|
|
87
87
|
publicAccessBlockConfiguration =
|
|
@@ -93,6 +93,9 @@ export async function bootstrapSST(tags, publicAccessBlockConfiguration) {
|
|
|
93
93
|
env: {
|
|
94
94
|
region: project.config.region,
|
|
95
95
|
},
|
|
96
|
+
synthesizer: new DefaultStackSynthesizer({
|
|
97
|
+
qualifier,
|
|
98
|
+
}),
|
|
96
99
|
});
|
|
97
100
|
// Add tags to stack
|
|
98
101
|
for (const [key, value] of Object.entries(tags)) {
|
|
@@ -3,6 +3,10 @@ export const bootstrap = (program) => program.command("bootstrap", "Create the S
|
|
|
3
3
|
type: "array",
|
|
4
4
|
string: true,
|
|
5
5
|
describe: "Tags to add for the bootstrap stack",
|
|
6
|
+
})
|
|
7
|
+
.option("qualifier", {
|
|
8
|
+
type: "string",
|
|
9
|
+
describe: "A string that is added to the names of all resources in the bootstrap stack",
|
|
6
10
|
})
|
|
7
11
|
.option("public-access-block-configuration", {
|
|
8
12
|
type: "boolean",
|
|
@@ -21,7 +25,7 @@ export const bootstrap = (program) => program.command("bootstrap", "Create the S
|
|
|
21
25
|
Colors.line(`${Colors.primary(`➜`)} Using tags`, tags);
|
|
22
26
|
}
|
|
23
27
|
const spinner = createSpinner(" Deploying bootstrap stack").start();
|
|
24
|
-
await bootstrapSST(tags, args.publicAccessBlockConfiguration);
|
|
28
|
+
await bootstrapSST(tags, args.publicAccessBlockConfiguration, args.qualifier);
|
|
25
29
|
spinner.succeed(Colors.bold(` Bootstrapped account ${identity.Account} in region ${project.config.region}`));
|
|
26
30
|
process.exit(0);
|
|
27
31
|
});
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -2781,12 +2781,13 @@ import {
|
|
|
2781
2781
|
CloudFormationClient
|
|
2782
2782
|
} from "@aws-sdk/client-cloudformation";
|
|
2783
2783
|
import {
|
|
2784
|
+
App,
|
|
2785
|
+
DefaultStackSynthesizer,
|
|
2786
|
+
CfnOutput,
|
|
2784
2787
|
Duration,
|
|
2785
2788
|
Tags,
|
|
2786
2789
|
Stack,
|
|
2787
|
-
RemovalPolicy
|
|
2788
|
-
App,
|
|
2789
|
-
CfnOutput
|
|
2790
|
+
RemovalPolicy
|
|
2790
2791
|
} from "aws-cdk-lib";
|
|
2791
2792
|
import { Function, Runtime, Code } from "aws-cdk-lib/aws-lambda";
|
|
2792
2793
|
import { SqsEventSource } from "aws-cdk-lib/aws-lambda-event-sources";
|
|
@@ -2826,7 +2827,7 @@ async function loadCDKStatus() {
|
|
|
2826
2827
|
}
|
|
2827
2828
|
}
|
|
2828
2829
|
}
|
|
2829
|
-
async function bootstrapSST(tags, publicAccessBlockConfiguration) {
|
|
2830
|
+
async function bootstrapSST(tags, publicAccessBlockConfiguration, qualifier) {
|
|
2830
2831
|
tags = tags || {};
|
|
2831
2832
|
publicAccessBlockConfiguration = publicAccessBlockConfiguration === false ? false : true;
|
|
2832
2833
|
const project = useProject();
|
|
@@ -2834,7 +2835,10 @@ async function bootstrapSST(tags, publicAccessBlockConfiguration) {
|
|
|
2834
2835
|
const stack = new Stack(app, STACK_NAME, {
|
|
2835
2836
|
env: {
|
|
2836
2837
|
region: project.config.region
|
|
2837
|
-
}
|
|
2838
|
+
},
|
|
2839
|
+
synthesizer: new DefaultStackSynthesizer({
|
|
2840
|
+
qualifier
|
|
2841
|
+
})
|
|
2838
2842
|
});
|
|
2839
2843
|
for (const [key, value] of Object.entries(tags)) {
|
|
2840
2844
|
Tags.of(app).add(key, value);
|
|
@@ -7830,6 +7834,9 @@ var bootstrap = (program2) => program2.command(
|
|
|
7830
7834
|
type: "array",
|
|
7831
7835
|
string: true,
|
|
7832
7836
|
describe: "Tags to add for the bootstrap stack"
|
|
7837
|
+
}).option("qualifier", {
|
|
7838
|
+
type: "string",
|
|
7839
|
+
describe: "A string that is added to the names of all resources in the bootstrap stack"
|
|
7833
7840
|
}).option("public-access-block-configuration", {
|
|
7834
7841
|
type: "boolean",
|
|
7835
7842
|
default: true,
|
|
@@ -7850,7 +7857,11 @@ var bootstrap = (program2) => program2.command(
|
|
|
7850
7857
|
Colors2.line(`${Colors2.primary(`\u279C`)} Using tags`, tags);
|
|
7851
7858
|
}
|
|
7852
7859
|
const spinner = createSpinner2(" Deploying bootstrap stack").start();
|
|
7853
|
-
await bootstrapSST2(
|
|
7860
|
+
await bootstrapSST2(
|
|
7861
|
+
tags,
|
|
7862
|
+
args.publicAccessBlockConfiguration,
|
|
7863
|
+
args.qualifier
|
|
7864
|
+
);
|
|
7854
7865
|
spinner.succeed(
|
|
7855
7866
|
Colors2.bold(
|
|
7856
7867
|
` Bootstrapped account ${identity.Account} in region ${project.config.region}`
|