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

chore(deps): Update GuCDK from 57.0.0 to 59.5.1 #945

Merged
merged 1 commit into from
Sep 19, 2024
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: 0 additions & 10 deletions cdk/.editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions cdk/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions cdk/.eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions cdk/.prettierrc

This file was deleted.

24 changes: 2 additions & 22 deletions cdk/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# Prism Infrastructure

This directory defines the components to be deployed to AWS defined as CDK stacks:
- [Prism](./lib/prism.ts) for the application
- [Prism Access](./lib/prism-access.ts) for the stack set that creates a role for Prism to assume in another account
This directory defines the components to be deployed to AWS.

## Useful commands

We follow the [`script/task`](https://github.com/github/scripts-to-rule-them-all) pattern,
find useful scripts within the [`script`](./script) directory for common tasks.

- `./script/setup` to install dependencies
- `./script/start` to run the Jest unit tests in watch mode
- `./script/lint` to lint the code using ESLint
- `./script/test` to lint, run tests and generate templates of the CDK stacks
- `./script/build` to compile TypeScript to JS and generate templates of the CDK stacks
- `./script/ci` to perform CI tasks: lint, build, test and generate templates

There are also some other commands defined in `package.json`, including:

- `yarn lint --fix` attempt to autofix any linter errors
- `yarn format` format the code using Prettier
- `yarn watch` watch for changes and compile

However, it's advised you configure your IDE to format on save to avoid horrible "correct linting" commits.
See [`package.json`](./package.json) for a list of available scripts.
20 changes: 10 additions & 10 deletions cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import { PrismEc2App } from "../lib/prism-ec2-app";
const app = new App();

new PrismEc2App(app, "Prism-CODE", {
stage: "CODE",
domainName: "prism.code.dev-gutools.co.uk",
minimumInstances: 1,
cloudFormationStackName: "prism-CODE",
env: { region: "eu-west-1" },
stage: "CODE",
domainName: "prism.code.dev-gutools.co.uk",
minimumInstances: 1,
cloudFormationStackName: "prism-CODE",
env: { region: "eu-west-1" },
});

new PrismEc2App(app, "Prism-PROD", {
stage: "PROD",
domainName: "prism.gutools.co.uk",
minimumInstances: 2,
cloudFormationStackName: "prism-PROD",
env: { region: "eu-west-1" },
stage: "PROD",
domainName: "prism.gutools.co.uk",
minimumInstances: 2,
cloudFormationStackName: "prism-PROD",
env: { region: "eu-west-1" },
});

new PrismAccess(app, "PrismAccessStackSet");
7 changes: 0 additions & 7 deletions cdk/jest.config.js

This file was deleted.

27 changes: 26 additions & 1 deletion cdk/lib/__snapshots__/prism-ec2-app.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ exports[`The PrismEc2App stack matches the snapshot 1`] = `
"GuSubnetListParameter",
"GuSubnetListParameter",
"GuPlayApp",
"GuDistributionBucketParameter",
"GuCertificate",
"GuInstanceRole",
"GuSsmSshPolicy",
"GuDescribeEC2Policy",
"GuLoggingStreamNameParameter",
"GuLogShippingPolicy",
"GuDistributionBucketParameter",
"GuGetDistributablePolicy",
"GuParameterStoreReadPolicy",
"GuAmiParameter",
Expand Down Expand Up @@ -93,6 +93,11 @@ exports[`The PrismEc2App stack matches the snapshot 1`] = `
},
},
"MaxSize": "4",
"MetricsCollection": [
{
"Granularity": "1Minute",
},
],
Comment on lines +96 to +100
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"MinSize": "2",
"Tags": [
{
Expand Down Expand Up @@ -631,6 +636,7 @@ exports[`The PrismEc2App stack matches the snapshot 1`] = `
},
"Port": 443,
"Protocol": "HTTPS",
"SslPolicy": "ELBSecurityPolicy-TLS13-1-2-2021-06",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"Type": "AWS::ElasticLoadBalancingV2::Listener",
},
Expand Down Expand Up @@ -1005,6 +1011,24 @@ exports[`The PrismEc2App stack matches the snapshot 1`] = `
"Namespace": "AWS/ApplicationELB",
"Period": 60,
"Statistic": "Maximum",
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/prism",
},
{
"Key": "Stack",
"Value": "deploy",
},
{
"Key": "Stage",
"Value": "PROD",
},
],
"Threshold": 1,
"TreatMissingData": "notBreaching",
},
Expand Down Expand Up @@ -1124,6 +1148,7 @@ exports[`The PrismEc2App stack matches the snapshot 1`] = `
"InstanceType": "t4g.medium",
"MetadataOptions": {
"HttpTokens": "required",
"InstanceMetadataTags": "enabled",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"SecurityGroupIds": [
{
Expand Down
Loading
Loading