Skip to content

Commit

Permalink
Update to version v1.78.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hnishar committed Dec 23, 2020
1 parent bd96e95 commit 15300ed
Show file tree
Hide file tree
Showing 46 changed files with 1,196 additions and 2,851 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is a workflow to notify Slack of any relevant activities on Github.
name: Slack Notifications Workflow

# Controls when the action will run.
on:
issues:
types: [opened]
issue_comment:
types: [created]
pull_request:
types: [opened]
release:
types: [published]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
slackNotification:
name: Slack Notifications Job
runs-on: ubuntu-latest
steps:
- name: Issue Slack Notification
if: github.event_name == 'issues' || github.event_name == 'issue_comment'
uses: 8398a7/action-slack@v3
with:
status: custom
fields: all
custom_payload: |
{
Type: 'Issue',
Content: `https://github.com/awslabs/aws-solutions-constructs/issues/${{ env.ISSUE_NUMBER }}`
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
- name: PR Slack Notification
if: github.event_name == 'pull_request'
uses: 8398a7/action-slack@v3
with:
status: custom
fields: all
custom_payload: |
{
Type: 'Pull Request',
Content: `https://github.com/awslabs/aws-solutions-constructs/pull/${{ env.PR_NUMBER }}`
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
PR_NUMBER: ${{ github.event.number }}
- name: Set env
if: github.event_name == 'release'
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Release Slack Notification
if: github.event_name == 'release'
uses: 8398a7/action-slack@v3
with:
status: custom
fields: all
custom_payload: |
{
Version: `${{ env.TAG_NAME }}`,
Content: `https://github.com/awslabs/aws-solutions-constructs/releases/tag/${{ env.TAG_NAME }}`
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK }}
TAG_NAME: ${{ env.RELEASE_VERSION }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cdk.context.json
.cdk.staging/
cdk.out/
*.tabl.json
source/patterns/@aws-solutions-constructs/**/cdk-integ.out/

source/patterns/**/tsconfig.json
deployment/dist/*
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

## 1.78.0 (2020-12-22)

### Changed
- Upgraded all patterns to CDK v1.78.0
- Allow for `existingTableObj?` for `aws-apigateway-dynamodb` pattern ([#53](https://github.com/awslabs/aws-solutions-constructs/issues/53))
- Updated `aws-cloudfront-apigateway-*` and `aws-cloudfront-mediastore` patterns due to CDK v1.78.0 breaking change: `cloudfront-origins: Default minimum origin SSL protocol for HttpOrigin and LoadBalancerOrigin changed from SSLv3 to TLSv1.2.`

## 1.77.0 (2020-12-16)

### Added
Expand Down
2 changes: 1 addition & 1 deletion source/lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"./patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
"version": "1.77.0"
"version": "1.78.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as iam from '@aws-cdk/aws-iam';
import * as defaults from '@aws-solutions-constructs/core';
import { Construct } from '@aws-cdk/core';
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import { overrideProps } from '@aws-solutions-constructs/core';
import { getPartitionKeyNameFromTable, overrideProps } from '@aws-solutions-constructs/core';
import { LogGroup } from '@aws-cdk/aws-logs';

/**
Expand All @@ -29,6 +29,12 @@ export interface ApiGatewayToDynamoDBProps {
* @default - Default props are used
*/
readonly dynamoTableProps?: dynamodb.TableProps,
/**
* Existing instance of DynamoDB table object, If this is set then the dynamoTableProps is ignored
*
* @default - None
*/
readonly existingTableObj?: dynamodb.Table,
/**
* Optional user-provided props to override the default props for the API Gateway.
*
Expand Down Expand Up @@ -99,17 +105,26 @@ export class ApiGatewayToDynamoDB extends Construct {
constructor(scope: Construct, id: string, props: ApiGatewayToDynamoDBProps) {
super(scope, id);
let partitionKeyName: string;
let dynamoTableProps: dynamodb.TableProps;

// Set the default props for DynamoDB table
if (props.dynamoTableProps) {
const dynamoTableProps: dynamodb.TableProps = overrideProps(defaults.DefaultTableProps, props.dynamoTableProps);
dynamoTableProps = overrideProps(defaults.DefaultTableProps, props.dynamoTableProps);
partitionKeyName = dynamoTableProps.partitionKey.name;
this.dynamoTable = new dynamodb.Table(this, 'DynamoTable', dynamoTableProps);
} else {
partitionKeyName = defaults.DefaultTableProps.partitionKey.name;
this.dynamoTable = new dynamodb.Table(this, 'DynamoTable', defaults.DefaultTableProps);
dynamoTableProps = defaults.DefaultTableProps;
}

if (props.existingTableObj) {
partitionKeyName = getPartitionKeyNameFromTable(props.existingTableObj);
}

this.dynamoTable = defaults.buildDynamoDBTable(this, {
existingTableObj: props.existingTableObj,
dynamoTableProps,
});

// Setup the API Gateway
[this.apiGateway, this.apiGatewayCloudWatchRole, this.apiGatewayLogGroup] = defaults.GlobalRestApi(this, props.apiGatewayProps);

Expand Down
Loading

0 comments on commit 15300ed

Please sign in to comment.