Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Commit 9d4702c

Browse files
add option to configure a different installer stack
1 parent 863ef13 commit 9d4702c

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

reference-artifacts/Custom-Scripts/lza-upgrade/src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ export interface Config {
3636
skipDriftDetection?: boolean;
3737
localConfigFilePath?: string;
3838
enableTerminationProtection?: boolean;
39+
lzaInstallerTemplateBucket?: string
40+
lzaInstallerTemplateKey?: string
3941
}

reference-artifacts/Custom-Scripts/lza-upgrade/src/preparation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ export class Preparation {
5555
}
5656

5757
async prepareLza() {
58-
await getLZAInstallerStackTemplate('solutions-reference');
58+
await getLZAInstallerStackTemplate(this.config.lzaInstallerTemplateBucket ?? 'solutions-reference',
59+
this.config.lzaInstallerTemplateKey ?? 'landing-zone-accelerator-on-aws/latest/AWSAccelerator-InstallerStack.template');
5960
await putLZAInstallerStackTemplate(this.config.aseaConfigBucketName, this.homeRegion);
6061
const installerStackParameters: InstallerStackParameters = {
6162
repositorySource: this.config.lzaCodeRepositorySource ?? 'github',

reference-artifacts/Custom-Scripts/lza-upgrade/src/preparation/aws-lza.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ export async function createLZAInstallerCloudFormationStack(
147147
}
148148
}
149149

150-
export async function getLZAInstallerStackTemplate(bucketName: string) {
150+
export async function getLZAInstallerStackTemplate(bucketName: string, objectKey: string) {
151151
const s3Client = new S3Client({ endpoint: 'https://s3.amazonaws.com', region: 'us-east-1' });
152152
const template = await s3Client.send(
153153
new GetObjectCommand({
154154
Bucket: bucketName,
155-
Key: 'landing-zone-accelerator-on-aws/latest/AWSAccelerator-InstallerStack.template',
155+
Key: objectKey,
156156
}),
157157
);
158158

0 commit comments

Comments
 (0)