@guardian/cdk 50.6.0 → 50.6.1

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.
@@ -7,9 +7,13 @@ export interface GuFastlyKinesisLogRoleProps {
7
7
  */
8
8
  stream: GuKinesisStream;
9
9
  /**
10
- * Name of the IAM role
10
+ * The name of the IAM role
11
11
  */
12
12
  roleName?: string;
13
+ /**
14
+ * The name of the policy attached to this role which allows writing to the Kinesis stream
15
+ */
16
+ policyName?: string;
13
17
  }
14
18
  /**
15
19
  * A construct to create an IAM Role for Fastly to assume in order to write to a
@@ -1 +1 @@
1
- {"version":3,"file":"fastly-kinesis-log.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/constructs/iam/roles/fastly-kinesis-log.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,qBAAa,kCAAmC,SAAQ,MAAM;gBAChD,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,2BAA2B;CAgB3E"}
1
+ {"version":3,"file":"fastly-kinesis-log.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/constructs/iam/roles/fastly-kinesis-log.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,qBAAa,kCAAmC,SAAQ,MAAM;gBAChD,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,2BAA2B;CAoB3E"}
@@ -18,13 +18,13 @@ const kinesis_put_records_1 = require("../../policies/kinesis-put-records");
18
18
  class GuFastlyKinesisLogRoleExperimental extends iam_1.GuRole {
19
19
  constructor(scope, id, props) {
20
20
  const fastlyCustomerId = core_1.GuFastlyCustomerIdParameter.getInstance(scope).valueAsString;
21
- const { roleName, stream } = props;
21
+ const { policyName, roleName, stream } = props;
22
22
  super(scope, id, {
23
23
  roleName,
24
24
  assumedBy: new aws_iam_1.AccountPrincipal(fastly_aws_account_id_1.FASTLY_AWS_ACCOUNT_ID),
25
25
  externalIds: [fastlyCustomerId],
26
26
  });
27
- const policy = new kinesis_put_records_1.GuKinesisPutRecordsPolicyExperimental(scope, "GuKinesisPutRecordsPolicy", {
27
+ const policy = new kinesis_put_records_1.GuKinesisPutRecordsPolicyExperimental(scope, policyName ?? "GuKinesisPutRecordsPolicyExperimental", {
28
28
  stream,
29
29
  });
30
30
  policy.attachToRole(this);
@@ -1 +1 @@
1
- {"version":3,"file":"fastly-kinesis-log.js","sourceRoot":"","sources":["../../../../../src/experimental/constructs/iam/roles/fastly-kinesis-log.ts"],"names":[],"mappings":";;;AAAA,iDAAuD;AACvD,uFAAoF;AAEpF,sDAA0E;AAC1E,oDAAoD;AAEpD,4EAA2F;AAa3F;;;;;;;;GAQG;AACH,MAAa,kCAAmC,SAAQ,YAAM;IAC5D,YAAY,KAAc,EAAE,EAAU,EAAE,KAAkC;QACxE,MAAM,gBAAgB,GAAG,kCAA2B,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC;QACtF,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAEnC,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,QAAQ;YACR,SAAS,EAAE,IAAI,0BAAgB,CAAC,6CAAqB,CAAC;YACtD,WAAW,EAAE,CAAC,gBAAgB,CAAC;SAChC,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,IAAI,2DAAqC,CAAC,KAAK,EAAE,2BAA2B,EAAE;YAC3F,MAAM;SACP,CAAC,CAAC;QAEH,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF;AAjBD,gFAiBC","sourcesContent":["import { AccountPrincipal } from \"aws-cdk-lib/aws-iam\";\nimport { FASTLY_AWS_ACCOUNT_ID } from \"../../../../constants/fastly-aws-account-id\";\nimport type { GuStack } from \"../../../../constructs/core\";\nimport { GuFastlyCustomerIdParameter } from \"../../../../constructs/core\";\nimport { GuRole } from \"../../../../constructs/iam\";\nimport type { GuKinesisStream } from \"../../../../constructs/kinesis\";\nimport { GuKinesisPutRecordsPolicyExperimental } from \"../../policies/kinesis-put-records\";\n\nexport interface GuFastlyKinesisLogRoleProps {\n /**\n * The Kinesis stream into which Fastly will put records\n */\n stream: GuKinesisStream;\n /**\n * Name of the IAM role\n */\n roleName?: string;\n}\n\n/**\n * A construct to create an IAM Role for Fastly to assume in order to write to a\n * specific Kinesis stream.\n *\n * In order to use this construct, an SSM parameter named `/account/external/fastly/customer.id`\n * needs to exist in the AWS account's parameter store, and the value should be\n * the Guardian's Fastly customer id.\n *\n */\nexport class GuFastlyKinesisLogRoleExperimental extends GuRole {\n constructor(scope: GuStack, id: string, props: GuFastlyKinesisLogRoleProps) {\n const fastlyCustomerId = GuFastlyCustomerIdParameter.getInstance(scope).valueAsString;\n const { roleName, stream } = props;\n\n super(scope, id, {\n roleName,\n assumedBy: new AccountPrincipal(FASTLY_AWS_ACCOUNT_ID),\n externalIds: [fastlyCustomerId],\n });\n\n const policy = new GuKinesisPutRecordsPolicyExperimental(scope, \"GuKinesisPutRecordsPolicy\", {\n stream,\n });\n\n policy.attachToRole(this);\n }\n}\n"]}
1
+ {"version":3,"file":"fastly-kinesis-log.js","sourceRoot":"","sources":["../../../../../src/experimental/constructs/iam/roles/fastly-kinesis-log.ts"],"names":[],"mappings":";;;AAAA,iDAAuD;AACvD,uFAAoF;AAEpF,sDAA0E;AAC1E,oDAAoD;AAEpD,4EAA2F;AAiB3F;;;;;;;;GAQG;AACH,MAAa,kCAAmC,SAAQ,YAAM;IAC5D,YAAY,KAAc,EAAE,EAAU,EAAE,KAAkC;QACxE,MAAM,gBAAgB,GAAG,kCAA2B,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC;QACtF,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAE/C,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,QAAQ;YACR,SAAS,EAAE,IAAI,0BAAgB,CAAC,6CAAqB,CAAC;YACtD,WAAW,EAAE,CAAC,gBAAgB,CAAC;SAChC,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,IAAI,2DAAqC,CACtD,KAAK,EACL,UAAU,IAAI,uCAAuC,EACrD;YACE,MAAM;SACP,CACF,CAAC;QAEF,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF;AArBD,gFAqBC","sourcesContent":["import { AccountPrincipal } from \"aws-cdk-lib/aws-iam\";\nimport { FASTLY_AWS_ACCOUNT_ID } from \"../../../../constants/fastly-aws-account-id\";\nimport type { GuStack } from \"../../../../constructs/core\";\nimport { GuFastlyCustomerIdParameter } from \"../../../../constructs/core\";\nimport { GuRole } from \"../../../../constructs/iam\";\nimport type { GuKinesisStream } from \"../../../../constructs/kinesis\";\nimport { GuKinesisPutRecordsPolicyExperimental } from \"../../policies/kinesis-put-records\";\n\nexport interface GuFastlyKinesisLogRoleProps {\n /**\n * The Kinesis stream into which Fastly will put records\n */\n stream: GuKinesisStream;\n /**\n * The name of the IAM role\n */\n roleName?: string;\n /**\n * The name of the policy attached to this role which allows writing to the Kinesis stream\n */\n policyName?: string;\n}\n\n/**\n * A construct to create an IAM Role for Fastly to assume in order to write to a\n * specific Kinesis stream.\n *\n * In order to use this construct, an SSM parameter named `/account/external/fastly/customer.id`\n * needs to exist in the AWS account's parameter store, and the value should be\n * the Guardian's Fastly customer id.\n *\n */\nexport class GuFastlyKinesisLogRoleExperimental extends GuRole {\n constructor(scope: GuStack, id: string, props: GuFastlyKinesisLogRoleProps) {\n const fastlyCustomerId = GuFastlyCustomerIdParameter.getInstance(scope).valueAsString;\n const { policyName, roleName, stream } = props;\n\n super(scope, id, {\n roleName,\n assumedBy: new AccountPrincipal(FASTLY_AWS_ACCOUNT_ID),\n externalIds: [fastlyCustomerId],\n });\n\n const policy = new GuKinesisPutRecordsPolicyExperimental(\n scope,\n policyName ?? \"GuKinesisPutRecordsPolicyExperimental\",\n {\n stream,\n }\n );\n\n policy.attachToRole(this);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guardian/cdk",
3
3
  "description": "Generic Guardian flavoured AWS CDK components",
4
- "version": "50.6.0",
4
+ "version": "50.6.1",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "files": [
@@ -31,31 +31,31 @@
31
31
  "@guardian/eslint-config-typescript": "5.0.0",
32
32
  "@guardian/eslint-plugin-tsdoc-required": "^0.1.3",
33
33
  "@types/git-url-parse": "^9.0.1",
34
- "@types/jest": "^29.5.1",
34
+ "@types/jest": "^29.5.2",
35
35
  "@types/js-yaml": "^4.0.5",
36
36
  "@types/lodash.camelcase": "^4.3.7",
37
37
  "@types/lodash.kebabcase": "^4.1.7",
38
38
  "@types/lodash.upperfirst": "^4.3.7",
39
- "@types/node": "20.2.3",
39
+ "@types/node": "20.2.5",
40
40
  "@types/yargs": "^17.0.19",
41
41
  "aws-cdk": "2.78.0",
42
42
  "cz-conventional-changelog": "^3.3.0",
43
- "eslint": "^8.41.0",
43
+ "eslint": "^8.42.0",
44
44
  "eslint-plugin-custom-rules": "file:tools/eslint",
45
45
  "gh-pages": "^5.0.0",
46
46
  "jest": "^29.5.0",
47
47
  "prettier": "^2.8.8",
48
- "semantic-release": "^21.0.2",
48
+ "semantic-release": "^21.0.3",
49
49
  "serve": "^14.2.0",
50
50
  "ts-jest": "^29.1.0",
51
51
  "ts-node": "^10.9.1",
52
- "typedoc": "^0.24.7",
52
+ "typedoc": "^0.24.8",
53
53
  "typescript": "~4.9.5"
54
54
  },
55
55
  "dependencies": {
56
56
  "@oclif/core": "2.8.5",
57
57
  "aws-cdk-lib": "2.78.0",
58
- "aws-sdk": "^2.1384.0",
58
+ "aws-sdk": "^2.1392.0",
59
59
  "chalk": "^4.1.2",
60
60
  "codemaker": "^1.82.0",
61
61
  "constructs": "10.2.18",