Skip to content

feat(iot): allow setting description and enabled of TopicRule#17225

Merged
mergify[bot] merged 6 commits intoaws:masterfrom
yamatatsu:aws-iot-description-and-enabled
Nov 1, 2021
Merged

feat(iot): allow setting description and enabled of TopicRule#17225
mergify[bot] merged 6 commits intoaws:masterfrom
yamatatsu:aws-iot-description-and-enabled

Conversation

@yamatatsu
Copy link
Copy Markdown
Contributor

I'm trying to implement aws-iot L2 Constructs.

This PR is one of steps after following PR:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

1. add properties `description` and `enabled`
2. add tests
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Oct 29, 2021

@github-actions github-actions bot added the @aws-cdk/aws-iot Related to AWS IoT label Oct 29, 2021
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @yamatatsu! One small comment that will make your life easier I'm pretty sure 🙂.

actions: Lazy.any({ produce: () => this.actions }),
awsIotSqlVersion: sqlConfig.awsIotSqlVersion,
description: props.description,
ruleDisabled: !(props.enabled ?? true),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave this as undefined if enabled is undefined (I assume the default in CloudFormation is false for the RuleDisabled property):

Suggested change
ruleDisabled: !(props.enabled ?? true),
ruleDisabled: props.enabled === undefined ? undefined : !props.enabled,

This way, there will be no changes in the existing templates.

@mergify mergify bot dismissed skinny85’s stale review October 30, 2021 01:29

Pull request has been modified.

@yamatatsu yamatatsu requested a review from skinny85 October 30, 2021 07:08
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 1, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 5530922
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit a9aae09 into aws:master Nov 1, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 1, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@yamatatsu yamatatsu deleted the aws-iot-description-and-enabled branch November 5, 2021 01:39
topicRule.addAction(new actions.LambdaFunctionAction(func))
```

If you wanna make the topic rule disable, add property `enabled: false` as following:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If you wanna make the topic rule disable" -> "If you want to make the topic rule disasbled"

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…s#17225)

I'm trying to implement aws-iot L2 Constructs.

This PR is one of steps after following PR: 
- aws#16681 (comment)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/aws-iot Related to AWS IoT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants