Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stack-set)!: Remove support for Stack Sets #2150

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/curly-peas-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@guardian/cdk": major
---

Removes supports for Stack Sets (added in #977) as it's no longer used,
because of a lack of CD tooling support for deploying Stack Sets.

Removing unused code means less code to maintain, and reduced complexity.

Should Stack Sets be needed in future, https://github.com/cdklabs/cdk-stacksets offers an alternative approach to creating them in CDK.
21 changes: 2 additions & 19 deletions src/constructs/core/stack.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { CfnElement, StackProps } from "aws-cdk-lib";
import { Annotations, App, Aspects, CfnParameter, LegacyStackSynthesizer, Stack, Tags } from "aws-cdk-lib";
import { Template } from "aws-cdk-lib/assertions";
import type { App, CfnElement, StackProps } from "aws-cdk-lib";
import { Annotations, Aspects, CfnParameter, LegacyStackSynthesizer, Stack, Tags } from "aws-cdk-lib";
import type { IConstruct } from "constructs";
import gitUrlParse from "git-url-parse";
import { AwsBackupTag } from "../../aspects/aws-backup";
Expand Down Expand Up @@ -268,19 +267,3 @@ export class GuStack extends Stack implements StackStageIdentity {
Annotations.of(construct).addInfo(`Setting logical ID for ${id} to ${logicalId}. Reason: ${reason}`);
}
}

/**
* A GuStack but designed for Stack Set instances.
*
* In a stack set application, `GuStackForStackSetInstance` is used to represent the infrastructure to provision in target AWS accounts.
*/
export class GuStackForStackSetInstance extends GuStack {
// eslint-disable-next-line custom-rules/valid-constructors -- GuStackForStackSet should have a unique `App`
constructor(id: string, props: GuStackProps) {
super(new App(), id, props);
}

get cfnJson(): string {
return JSON.stringify(Template.fromStack(this).toJSON(), null, 2);
}
}
265 changes: 0 additions & 265 deletions src/constructs/stack-set/__snapshots__/stack-set.test.ts.snap

This file was deleted.

1 change: 0 additions & 1 deletion src/constructs/stack-set/index.ts

This file was deleted.

69 changes: 0 additions & 69 deletions src/constructs/stack-set/stack-set.test.ts

This file was deleted.

Loading