@guardian/cdk 57.0.0 → 57.1.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.
@@ -0,0 +1,31 @@
1
+ import { Table } from "aws-cdk-lib/aws-dynamodb";
2
+ import type { TableProps } from "aws-cdk-lib/aws-dynamodb";
3
+ import type { GuStack } from "../core";
4
+ export interface OptIn {
5
+ enabled: true;
6
+ }
7
+ export interface OptOut {
8
+ enabled: false;
9
+ /**
10
+ * We recommend using DevX Backups where possible. If it is not suitable for your use-case please document
11
+ * this here so that we can understand why this is switched off when performing security audits.
12
+ */
13
+ optOutReason: string;
14
+ }
15
+ export interface GuDynamoTableProps extends TableProps {
16
+ /**
17
+ * We recommend using DevX Backups to protect your DynamoDB table's backups.
18
+ * For more details on this feature, see the
19
+ * [documentation](https://docs.google.com/document/d/11EZtuVHCnjavE9AYLroiuDUsMzbp2ulFBtj4VkyCKNc/edit?usp=sharing).
20
+ */
21
+ devXBackups: OptIn | OptOut;
22
+ }
23
+ /**
24
+ * DeletionProtection is enabled by default for this Table.
25
+ * We recommend enabling this enabled for all active DynamoDB tables.
26
+ * The default can be overridden in the GuDynamoTable instantiation if needed eg: for table deletion.
27
+ */
28
+ export declare class GuDynamoTable extends Table {
29
+ constructor(scope: GuStack, id: string, props: GuDynamoTableProps);
30
+ }
31
+ //# sourceMappingURL=dynamodb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamodb.d.ts","sourceRoot":"","sources":["../../../src/constructs/dynamodb/dynamodb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,KAAK,CAAC;IACf;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD;;;;OAIG;IACH,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB;CAIlE"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuDynamoTable = void 0;
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_dynamodb_1 = require("aws-cdk-lib/aws-dynamodb");
6
+ /**
7
+ * DeletionProtection is enabled by default for this Table.
8
+ * We recommend enabling this enabled for all active DynamoDB tables.
9
+ * The default can be overridden in the GuDynamoTable instantiation if needed eg: for table deletion.
10
+ */
11
+ class GuDynamoTable extends aws_dynamodb_1.Table {
12
+ constructor(scope, id, props) {
13
+ super(scope, id, { deletionProtection: true, ...props });
14
+ aws_cdk_lib_1.Tags.of(this).add("devx-backup-enabled", String(props.devXBackups.enabled));
15
+ }
16
+ }
17
+ exports.GuDynamoTable = GuDynamoTable;
18
+ //# sourceMappingURL=dynamodb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamodb.js","sourceRoot":"","sources":["../../../src/constructs/dynamodb/dynamodb.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,2DAAiD;AA0BjD;;;;GAIG;AACH,MAAa,aAAc,SAAQ,oBAAK;IACtC,YAAY,KAAc,EAAE,EAAU,EAAE,KAAyB;QAC/D,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACzD,kBAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,qBAAqB,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;CACF;AALD,sCAKC","sourcesContent":["import { Tags } from \"aws-cdk-lib\";\nimport { Table } from \"aws-cdk-lib/aws-dynamodb\";\nimport type { TableProps } from \"aws-cdk-lib/aws-dynamodb\";\nimport type { GuStack } from \"../core\";\n\nexport interface OptIn {\n enabled: true;\n}\n\nexport interface OptOut {\n enabled: false;\n /**\n * We recommend using DevX Backups where possible. If it is not suitable for your use-case please document\n * this here so that we can understand why this is switched off when performing security audits.\n */\n optOutReason: string;\n}\n\nexport interface GuDynamoTableProps extends TableProps {\n /**\n * We recommend using DevX Backups to protect your DynamoDB table's backups.\n * For more details on this feature, see the\n * [documentation](https://docs.google.com/document/d/11EZtuVHCnjavE9AYLroiuDUsMzbp2ulFBtj4VkyCKNc/edit?usp=sharing).\n */\n devXBackups: OptIn | OptOut;\n}\n\n/**\n * DeletionProtection is enabled by default for this Table.\n * We recommend enabling this enabled for all active DynamoDB tables.\n * The default can be overridden in the GuDynamoTable instantiation if needed eg: for table deletion.\n */\nexport class GuDynamoTable extends Table {\n constructor(scope: GuStack, id: string, props: GuDynamoTableProps) {\n super(scope, id, { deletionProtection: true, ...props });\n Tags.of(this).add(\"devx-backup-enabled\", String(props.devXBackups.enabled));\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./dynamodb";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constructs/dynamodb/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dynamodb"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constructs/dynamodb/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B","sourcesContent":["export * from \"./dynamodb\";\n"]}