@guardian/cdk 57.1.0 → 58.0.0
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/lib/constructs/core/stack.d.ts +0 -8
- package/lib/constructs/core/stack.d.ts.map +1 -1
- package/lib/constructs/core/stack.js +1 -5
- package/lib/constructs/core/stack.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/aspects/aws-backup.d.ts +0 -15
- package/lib/aspects/aws-backup.d.ts.map +0 -1
- package/lib/aspects/aws-backup.js +0 -25
- package/lib/aspects/aws-backup.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IAspect } from "aws-cdk-lib";
|
|
2
|
-
import type { IConstruct } from "constructs";
|
|
3
|
-
/**
|
|
4
|
-
* Applies the tags that enable backups for supported resources.
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/guardian/aws-backup
|
|
7
|
-
*/
|
|
8
|
-
export declare class AwsBackupTag implements IAspect {
|
|
9
|
-
/**
|
|
10
|
-
* These resources are backed up by https://github.com/guardian/aws-backup.
|
|
11
|
-
*/
|
|
12
|
-
static resourceTypes: string[];
|
|
13
|
-
visit(node: IConstruct): void;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=aws-backup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aws-backup.d.ts","sourceRoot":"","sources":["../../src/aspects/aws-backup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,YAAa,YAAW,OAAO;IAC1C;;OAEG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,CAAoD;IAE3E,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CASrC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AwsBackupTag = void 0;
|
|
4
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
-
/**
|
|
6
|
-
* Applies the tags that enable backups for supported resources.
|
|
7
|
-
*
|
|
8
|
-
* @see https://github.com/guardian/aws-backup
|
|
9
|
-
*/
|
|
10
|
-
class AwsBackupTag {
|
|
11
|
-
visit(node) {
|
|
12
|
-
if (node instanceof aws_cdk_lib_1.CfnResource) {
|
|
13
|
-
const { cfnResourceType } = node;
|
|
14
|
-
if (AwsBackupTag.resourceTypes.includes(cfnResourceType) && aws_cdk_lib_1.TagManager.isTaggable(node)) {
|
|
15
|
-
node.tags.setTag("devx-backup-enabled", "true");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.AwsBackupTag = AwsBackupTag;
|
|
21
|
-
/**
|
|
22
|
-
* These resources are backed up by https://github.com/guardian/aws-backup.
|
|
23
|
-
*/
|
|
24
|
-
AwsBackupTag.resourceTypes = ["AWS::RDS::DBInstance", "AWS::DynamoDB::Table"];
|
|
25
|
-
//# sourceMappingURL=aws-backup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aws-backup.js","sourceRoot":"","sources":["../../src/aspects/aws-backup.ts"],"names":[],"mappings":";;;AACA,6CAAsD;AAGtD;;;;GAIG;AACH,MAAa,YAAY;IAMhB,KAAK,CAAC,IAAgB;QAC3B,IAAI,IAAI,YAAY,yBAAW,EAAE;YAC/B,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;YAEjC,IAAI,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACvF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;aACjD;SACF;IACH,CAAC;;AAdH,oCAeC;AAdC;;GAEG;AACI,0BAAa,GAAa,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import type { IAspect } from \"aws-cdk-lib\";\nimport { CfnResource, TagManager } from \"aws-cdk-lib\";\nimport type { IConstruct } from \"constructs\";\n\n/**\n * Applies the tags that enable backups for supported resources.\n *\n * @see https://github.com/guardian/aws-backup\n */\nexport class AwsBackupTag implements IAspect {\n /**\n * These resources are backed up by https://github.com/guardian/aws-backup.\n */\n static resourceTypes: string[] = [\"AWS::RDS::DBInstance\", \"AWS::DynamoDB::Table\"];\n\n public visit(node: IConstruct): void {\n if (node instanceof CfnResource) {\n const { cfnResourceType } = node;\n\n if (AwsBackupTag.resourceTypes.includes(cfnResourceType) && TagManager.isTaggable(node)) {\n node.tags.setTag(\"devx-backup-enabled\", \"true\");\n }\n }\n }\n}\n"]}
|