Skip to content

Commit

Permalink
fix(wrapped constructs): shorten wrapped ID names in deprecated const…
Browse files Browse the repository at this point in the history
…ructs (#371)

* shorten wrapper class id name

* updated tests to support new wrapper id name

* added comments to explain new wrapped construct name

* deleted trailing whitespace

* delete trailing whitespace

* deleted trailing whitespace

* fixed id name in dynamodb-stream-lambda and updated tests name

Co-authored-by: root <[email protected]>
  • Loading branch information
mickychetta and root committed Sep 15, 2021
1 parent 2ed5355 commit 30737ae
Show file tree
Hide file tree
Showing 59 changed files with 1,703 additions and 1,653 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ export class DynamoDBStreamToLambdaToElasticSearchAndKibana extends Construct {
constructor(scope: Construct, id: string, props: DynamoDBStreamToLambdaToElasticSearchAndKibanaProps) {
super(scope, id);
const convertedProps: DynamoDBStreamToLambdaToElasticSearchAndKibanaProps = { ...props };

// W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide
// If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate
// it in place of the older named version. They are functionally identical, aside from the types no other changes
// will be required. (eg - new DynamoDBStreamsToLambdaToElasticSearchAndKibana instead of DynamoDBStreamToLambdaToElasticSearchAndKibana)
const wrappedConstruct: DynamoDBStreamToLambdaToElasticSearchAndKibana = new DynamoDBStreamsToLambdaToElasticSearchAndKibana(
this, `${id}-wrapped`, convertedProps);
this, `${id}W`, convertedProps);

this.lambdaFunction = wrappedConstruct.lambdaFunction;
this.dynamoTable = wrappedConstruct.dynamoTable;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test('check domain names', () => {
expect(stack).toHaveResource('AWS::Cognito::UserPoolDomain', {
Domain: "test-domain",
UserPoolId: {
Ref: "teststackteststackwrappedLambdaToElasticSearchCognitoUserPoolBA16EA97"
Ref: "teststackteststackWLambdaToElasticSearchCognitoUserPool788087A8"
}
});

Expand Down
Loading

0 comments on commit 30737ae

Please sign in to comment.