From a493e310af5ba905f26d521a3a69618a1921ca86 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Mon, 13 Feb 2023 11:05:03 -0500 Subject: [PATCH 1/5] Update README.md --- .../@aws-solutions-constructs/aws-apigateway-dynamodb/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/README.md b/source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/README.md index 7fed5cc7d..7d6dbefe4 100755 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/README.md +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/README.md @@ -93,7 +93,7 @@ new ApiGatewayToDynamoDB(this, "test-api-gateway-dynamodb-default", new ApiGatew |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.| |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.| -# API Gateway Request/Response Template Properties Overview +## API Gateway Request/Response Template Properties Overview This construct allows you to implement four DynamoDB API operations, CREATE/READ/UPDATE/DELETE (corresponding the HTTP POST/GET/PUT/DELETE requests respectively). They are completely independent and each follows the same pattern: * Setting `allowCreateOperation` to true will implement the `application/json` content-type with default request and response templates * The request template for `application/json` requests can be customized using the `createRequestTemplate` prop value From 8a6cc12d83387454b1072a2d266ab9aa902a5b2e Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Mon, 13 Feb 2023 11:05:30 -0500 Subject: [PATCH 2/5] Update README.md --- .../@aws-solutions-constructs/aws-apigateway-sqs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md index ac7778663..b6224d2e7 100755 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/README.md @@ -98,7 +98,7 @@ new ApiGatewayToSqs(this, "ApiGatewayToSqsPattern", new ApiGatewayToSqsProps.Bui |POST|`/`| `{ "data": "Hello World!" }` |`sqs::SendMessage`|Delivers a message to the queue.| |DELETE|`/message?receiptHandle=[value]`||`sqs::DeleteMessage`|Deletes a specified message from the queue| -# API Gateway Request/Response Template Properties Overview +## API Gateway Request/Response Template Properties Overview This construct allows you to implement four DynamoDB API operations, CREATE/READ/DELETE (corresponding the HTTP POST/GET/DELETE requests respectively). They are completely independent and each follows the same pattern: * Setting `allowCreateOperation` to true will implement the `application/json` content-type with default request and response templates * The request template for `application/json` requests can be customized using the `createRequestTemplate` prop value @@ -127,4 +127,4 @@ Out of the box implementation of the Construct without any override will set the ![Architecture Diagram](architecture.png) *** -© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. \ No newline at end of file +© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. From dd19d9363fa6c33b0c616a1a5392c26369bc02b2 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Tue, 14 Feb 2023 07:50:31 -0500 Subject: [PATCH 3/5] feat(aws-wafwebacl-agigateway): enable govcloud (#900) * Remove hardcoded partition * Use partition where mistakenly pasted Region * Use same pattern for region * Update integration tests --- .../aws-wafwebacl-apigateway/lib/index.ts | 4 ++-- ...g.existing-waf-to-multiple-gateways.expected.json | 12 ++++++++++-- .../test/integ.no-arguments.expected.json | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/lib/index.ts index 7e5711df2..a492fc189 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/lib/index.ts @@ -17,7 +17,7 @@ import * as api from 'aws-cdk-lib/aws-apigateway'; import * as waf from 'aws-cdk-lib/aws-wafv2'; import * as defaults from '@aws-solutions-constructs/core'; // Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate -import { Stack } from 'aws-cdk-lib'; +import { Aws } from 'aws-cdk-lib'; /** * @summary The properties for the WafwebaclToApiGateway class. @@ -62,7 +62,7 @@ export class WafwebaclToApiGateway extends Construct { webaclProps: props.webaclProps, }); - const resourceArn = `arn:aws:apigateway:${Stack.of(scope).region}::/restapis/${props.existingApiGatewayInterface.restApiId}/stages/${props.existingApiGatewayInterface.deploymentStage.stageName}`; + const resourceArn = `arn:${Aws.PARTITION}:apigateway:${Aws.REGION}::/restapis/${props.existingApiGatewayInterface.restApiId}/stages/${props.existingApiGatewayInterface.deploymentStage.stageName}`; // Setup the Web ACL Association new waf.CfnWebACLAssociation(scope, `${id}-WebACLAssociation`, { diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.existing-waf-to-multiple-gateways.expected.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.existing-waf-to-multiple-gateways.expected.json index 135eaf134..3e2bc356b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.existing-waf-to-multiple-gateways.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.existing-waf-to-multiple-gateways.expected.json @@ -1055,7 +1055,11 @@ "Fn::Join": [ "", [ - "arn:aws:apigateway:", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", { "Ref": "AWS::Region" }, @@ -1085,7 +1089,11 @@ "Fn::Join": [ "", [ - "arn:aws:apigateway:", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", { "Ref": "AWS::Region" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.no-arguments.expected.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.no-arguments.expected.json index 7fb608c8c..db86b0553 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.no-arguments.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.no-arguments.expected.json @@ -602,7 +602,11 @@ "Fn::Join": [ "", [ - "arn:aws:apigateway:", + "arn:", + { + "Ref": "AWS::Partition" + }, + ":apigateway:", { "Ref": "AWS::Region" }, From 81acfc8b5a1f69660434227bd81b292a3a3a41d8 Mon Sep 17 00:00:00 2001 From: AWS Solutions Constructs Automation Date: Tue, 14 Feb 2023 13:44:05 +0000 Subject: [PATCH 4/5] chore(release): 2.32.0 --- CHANGELOG.md | 7 +++++++ source/lerna.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b055552a5..c74173a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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. +## [2.32.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.31.0...v2.32.0) (2023-02-14) + + +### Features + +* **aws-wafwebacl-agigateway:** enable govcloud ([#900](https://github.com/awslabs/aws-solutions-constructs/issues/900)) ([dd19d93](https://github.com/awslabs/aws-solutions-constructs/commit/dd19d9363fa6c33b0c616a1a5392c26369bc02b2)) + ## [2.31.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.30.0...v2.31.0) (2023-02-09) Build on CDK 2.64.0 diff --git a/source/lerna.json b/source/lerna.json index 18d4c70eb..abd04f057 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -6,5 +6,5 @@ "./patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "2.31.0" + "version": "2.32.0" } From acc4da837977e7afc77b3ca70fbe7bb9c33277c8 Mon Sep 17 00:00:00 2001 From: biffgaut Date: Tue, 14 Feb 2023 08:47:48 -0500 Subject: [PATCH 5/5] chore(changelog): Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c74173a0f..0f792f7b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. See [standa ## [2.32.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.31.0...v2.32.0) (2023-02-14) +Build on CDK 2.64.0 ### Features