From 0c81d35edc71f144603ba0fbb4fc8542e8fe6e10 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Fri, 25 Jun 2021 17:03:39 -0400 Subject: [PATCH 1/6] Issue219 - Fix topicsProp attribute name (#235) Based on hayesry review and approval from iamtb12, I'm overriding the code owner review requirement and merging this PR. --- .../aws-events-rule-sns/lib/index.ts | 4 ++-- .../@aws-solutions-constructs/core/lib/input-validation.ts | 5 +---- .../core/test/input-validation.test.ts | 2 +- .../lib/lambda/service-staff/create-order/package.json | 2 +- source/use_cases/aws-restaurant-management-demo/package.json | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts index 95d8b4209..00a6da972 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts @@ -25,7 +25,7 @@ export interface EventsRuleToSnsProps { * * @default - Default props are used */ - readonly topicsProps?: sns.TopicProps + readonly topicProps?: sns.TopicProps /** * User provided eventRuleProps to override the defaults * @@ -85,7 +85,7 @@ export class EventsRuleToSns extends Construct { // Setup the sns topic. [this.snsTopic, this.encryptionKey] = defaults.buildTopic(this, { existingTopicObj: props.existingTopicObj, - topicProps: props.topicsProps, + topicProps: props.topicProps, enableEncryptionWithCustomerManagedKey: enableEncryptionParam, encryptionKey: props.encryptionKey, encryptionKeyProps: props.encryptionKeyProps diff --git a/source/patterns/@aws-solutions-constructs/core/lib/input-validation.ts b/source/patterns/@aws-solutions-constructs/core/lib/input-validation.ts index cba8ca850..dd73ed699 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/input-validation.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/input-validation.ts @@ -45,10 +45,7 @@ export interface VerifiedProps { readonly existingBucketObj?: s3.Bucket, readonly bucketProps?: s3.BucketProps, - // topicsProps is an incorrect attribute used in event-rule-sns that - // we need to support readonly topicProps?: sns.TopicProps, - readonly topicsProps?: sns.TopicProps, readonly existingTopicObj?: sns.Topic, readonly glueJobProps?: glue.CfnJobProps, @@ -108,7 +105,7 @@ export function CheckProps(propsObject: VerifiedProps | any) { errorFound = true; } - if ((propsObject.topicProps || propsObject.topicsProps) && propsObject.existingTopicObj) { + if ((propsObject.topicProps) && propsObject.existingTopicObj) { errorMessages += 'Error - Either provide topicProps or existingTopicObj, but not both.\n'; errorFound = true; } diff --git a/source/patterns/@aws-solutions-constructs/core/test/input-validation.test.ts b/source/patterns/@aws-solutions-constructs/core/test/input-validation.test.ts index c610d7e4c..e7d69bfb7 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/input-validation.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/input-validation.test.ts @@ -197,7 +197,7 @@ test('Test fail SNS topic check with bad topic attribute name', () => { const stack = new Stack(); const props: defaults.VerifiedProps = { - topicsProps: {}, + topicProps: {}, existingTopicObj: new sns.Topic(stack, 'placeholder', {}) }; diff --git a/source/use_cases/aws-restaurant-management-demo/lib/lambda/service-staff/create-order/package.json b/source/use_cases/aws-restaurant-management-demo/lib/lambda/service-staff/create-order/package.json index 896b4e821..1327859b7 100644 --- a/source/use_cases/aws-restaurant-management-demo/lib/lambda/service-staff/create-order/package.json +++ b/source/use_cases/aws-restaurant-management-demo/lib/lambda/service-staff/create-order/package.json @@ -10,4 +10,4 @@ "dependencies": { "uuid": "^8.3.2" } -} +} \ No newline at end of file diff --git a/source/use_cases/aws-restaurant-management-demo/package.json b/source/use_cases/aws-restaurant-management-demo/package.json index 85227d39c..d02c74a8d 100644 --- a/source/use_cases/aws-restaurant-management-demo/package.json +++ b/source/use_cases/aws-restaurant-management-demo/package.json @@ -59,4 +59,4 @@ "source-map-support": "^0.5.16", "typescript": "^4.2.4" } -} +} \ No newline at end of file From bff6497ac78b5e3d87667c6633e687d3d767fb94 Mon Sep 17 00:00:00 2001 From: AWS Solutions Constructs Automation Date: Sat, 26 Jun 2021 00:14:49 +0000 Subject: [PATCH 2/6] chore(release): 1.108.0 --- CHANGELOG.md | 2 ++ source/lerna.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4815ebecc..71cc5040a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.108.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.107.0...v1.108.0) (2021-06-26) + ## [1.107.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.106.1...v1.107.0) (2021-06-15) ### Changed diff --git a/source/lerna.json b/source/lerna.json index c37a6cb78..19d9596c4 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -6,5 +6,5 @@ "./patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "1.107.0" + "version": "1.108.0" } From 60e2e00596fec31a9e0570a032429b25b1f8c359 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Fri, 25 Jun 2021 20:20:32 -0400 Subject: [PATCH 3/6] chore(changelog): Updated CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cc5040a..a90920662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. See [standa ## [1.108.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.107.0...v1.108.0) (2021-06-26) +### Changed + +* Upgraded all patterns to CDK v1.108.0 + +### ⚠ BREAKING CHANGES + +* [291](https://github.com/awslabs/aws-solutions-constructs/issues/219) Changed the attribute name in for EventsRuleToSnsProps from topicsProps to topicProps to match other constructs and documentation. Clients using EventsRuleToSns will need to change this attribute name where it appears in their code. + ## [1.107.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.106.1...v1.107.0) (2021-06-15) ### Changed From 066dd1a0e1a96dea65e10f180df77ac8e667a52d Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Fri, 25 Jun 2021 21:48:47 -0400 Subject: [PATCH 4/6] Update lerna.json --- source/lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lerna.json b/source/lerna.json index c37a6cb78..19d9596c4 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -6,5 +6,5 @@ "./patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "1.107.0" + "version": "1.108.0" } From 2d8bc22485870bf77aa8a6777c33cc410165108f Mon Sep 17 00:00:00 2001 From: AWS Solutions Constructs Automation Date: Sat, 26 Jun 2021 01:58:39 +0000 Subject: [PATCH 5/6] chore(release): 1.108.1 --- CHANGELOG.md | 2 ++ source/lerna.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a90920662..04e6a5a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.108.1](https://github.com/awslabs/aws-solutions-constructs/compare/v1.108.0...v1.108.1) (2021-06-26) + ## [1.108.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.107.0...v1.108.0) (2021-06-26) ### Changed diff --git a/source/lerna.json b/source/lerna.json index 19d9596c4..0da1577c2 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -6,5 +6,5 @@ "./patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "1.108.0" + "version": "1.108.1" } From 9335c84f4ace3fdf9a03c98f97047f882654a75a Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Fri, 25 Jun 2021 22:00:51 -0400 Subject: [PATCH 6/6] chore(changelog): Updated CHANGELOG.md --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e6a5a97..675f1c77a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [1.108.1](https://github.com/awslabs/aws-solutions-constructs/compare/v1.108.0...v1.108.1) (2021-06-26) +## [1.108.1](https://github.com/awslabs/aws-solutions-constructs/compare/v1.108.0...v1.108.1) (2021-06-26) + +### Changed + +* Upgraded all patterns to CDK v1.108.1 ## [1.108.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.107.0...v1.108.0) (2021-06-26)