Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IOT Rule Action "errorAction" #7147

Closed
legokichi opened this issue Jan 15, 2019 · 4 comments · Fixed by #11922
Closed

Support for IOT Rule Action "errorAction" #7147

legokichi opened this issue Jan 15, 2019 · 4 comments · Fixed by #11922
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/iot Issues and PRs that pertain to the iot service.
Milestone

Comments

@legokichi
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We have been able to use error action in topic rule since 2017-12.

New or Affected Resource(s)

  • aws_iot_topic_rule

Potential Terraform Configuration

resource "aws_iot_topic_rule" "rule" {
    name = "${local.rule}"
    enabled = true
    sql = "SELECT { \"DeviceId\": topic(2), \"Timestamp\": Timestamp, \"payload\": payload, \"ttl\": cast(round(timestamp() / 1000 + 360) as String), } FROM 'dev/+/log"
    sql_version = "2016-03-23"
    dynamodb {
        role_arn = "${aws_iam_role.main.arn}"
        table_name = "${aws_dynamodb_table.main.name}"
        hash_key_field = "${aws_dynamodb_table.main.hash_key}"
        hash_key_value = "$${DeviceId}"
        range_key_field = "${aws_dynamodb_table.main.range_key}"
        range_key_value = "$${Timestamp}"
        payload_field = "payload"
    }
    error_action {
        dynamodb {
          role_arn = "${aws_iam_role.main.arn}"
          table_name = "${aws_dynamodb_table.main.name}"
          hash_key_field = "${aws_dynamodb_table.main.hash_key}"
          hash_key_value = "${local.rule}.error",
          range_key_field = "${aws_dynamodb_table.main.range_key}"
          range_key_value = "${timestamp()}"
          payload_field = "payload"
        }
    }
}

References

@legokichi legokichi added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 15, 2019
@bflad bflad added the service/iot Issues and PRs that pertain to the iot service. label Jan 15, 2019
bflad added a commit that referenced this issue May 12, 2020
…, and preparation for top level action/error_action configuration blocks

Reference: #7147

Output from acceptance testing:

```
--- PASS: TestAccAWSIoTTopicRule_iot_events (16.31s)
--- PASS: TestAccAWSIoTTopicRule_dynamoDbv2 (16.52s)
--- PASS: TestAccAWSIoTTopicRule_iot_analytics (16.66s)
--- PASS: TestAccAWSIoTTopicRule_basic (17.43s)
--- PASS: TestAccAWSIoTTopicRule_lambda (17.95s)
--- PASS: TestAccAWSIoTTopicRule_cloudwatchmetric (17.98s)
--- PASS: TestAccAWSIoTTopicRule_republish (18.01s)
--- PASS: TestAccAWSIoTTopicRule_firehose (18.06s)
--- PASS: TestAccAWSIoTTopicRule_sns (18.21s)
--- PASS: TestAccAWSIoTTopicRule_kinesis (18.45s)
--- PASS: TestAccAWSIoTTopicRule_s3 (18.54s)
--- PASS: TestAccAWSIoTTopicRule_sqs (18.72s)
--- PASS: TestAccAWSIoTTopicRule_cloudwatchalarm (18.77s)
--- PASS: TestAccAWSIoTTopicRule_elasticsearch (21.96s)
--- PASS: TestAccAWSIoTTopicRule_firehose_separator (28.42s)
--- PASS: TestAccAWSIoTTopicRule_dynamodb (28.75s)
```
@smougenot
Copy link

PR looks dormant for months 🙏 help it

@bflad bflad self-assigned this Jun 23, 2020
@bflad bflad added this to the v2.68.0 milestone Jun 23, 2020
@bflad
Copy link
Contributor

bflad commented Jun 23, 2020

Support for the error_action configuration block (which itself supports any of the various "action" configuration blocks such as dynamodb) has been merged and will release with version 2.68.0 of the Terraform AWS Provider, later this week. Thanks to @kurtmc for the implementation. 👍

@ghost
Copy link

ghost commented Jun 26, 2020

This has been released in version 2.68.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Jul 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/iot Issues and PRs that pertain to the iot service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants