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

resource/aws_cloudwatch_event_rule: Ignore UnknownOperationException error on reading tags #8659

Merged
merged 1 commit into from
May 17, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented May 16, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #8654

Release note for CHANGELOG:

* resource/aws_cloudwatch_event_rule: Ignore `UnknownOperationException` error on reading tags

The new ap-east-1 region in AWS Commercial does not support the CloudWatch Event Rule tagging available in the rest of AWS Commercial.

Previous output from ap-east-1 region acceptance testing:

--- FAIL: TestAccAWSCloudWatchEventRule_full (17.82s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: ac4d6cdd-77fc-11e9-86ed-cdca472113e7

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test246660052/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: af588a11-77fc-11e9-8ad8-0792e26dbe7d

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_tags (17.91s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: ac4d1eb2-77fc-11e9-80a8-95f8eb560cb4

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test122506912/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: af6841da-77fc-11e9-96c8-bb13b487ae4c

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_prefix (19.74s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-prefix-20190516170429862800000001: UnknownOperationException:
        	status code: 400, request id: ad6f7ed0-77fc-11e9-86ed-cdca472113e7

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test831543557/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-prefix-20190516170429862800000001: UnknownOperationException:
        	status code: 400, request id: b07fcc05-77fc-11e9-80a8-95f8eb560cb4

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_basic (20.54s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: ae0a86a1-77fc-11e9-97e4-539c846bebae

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test465041618/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: b0f91b41-77fc-11e9-a6ae-13317a02b493

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_importBasic (20.56s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: ae009c0a-77fc-11e9-8ad8-0792e26dbe7d

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test417356671/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: b0fc4f36-77fc-11e9-89ba-8f98f3d46ebe

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_enable (20.65s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-state: UnknownOperationException:
        	status code: 400, request id: ae1f951c-77fc-11e9-a6ae-13317a02b493

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test047282185/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-state: UnknownOperationException:
        	status code: 400, request id: b10aa776-77fc-11e9-97e4-539c846bebae

        State: <nil>

Output from ap-east-1 acceptance testing (failure creating tags expected as tags are not supported in this region):

--- PASS: TestAccAWSCloudWatchEventRule_importBasic (41.96s)
--- FAIL: TestAccAWSCloudWatchEventRule_full (21.75s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: 89571e62-77fd-11e9-acb1-9520865da030

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test386270447/main.tf line 2:
          (source code not available)

--- PASS: TestAccAWSCloudWatchEventRule_enable (96.28s)
--- PASS: TestAccAWSCloudWatchEventRule_prefix (36.77s)
--- FAIL: TestAccAWSCloudWatchEventRule_tags (20.89s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: e5a41de0-77fd-11e9-8481-b3ad1760b794

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test274931831/main.tf line 2:
          (source code not available)

--- PASS: TestAccAWSCloudWatchEventRule_basic (67.65s)

Output from us-west-2 acceptance testing:

--- PASS: TestAccAWSCloudWatchEventRule_importBasic (14.84s)
--- PASS: TestAccAWSCloudWatchEventRule_full (15.14s)
--- PASS: TestAccAWSCloudWatchEventRule_enable (30.45s)
--- PASS: TestAccAWSCloudWatchEventRule_prefix (10.21s)
--- PASS: TestAccAWSCloudWatchEventRule_tags (32.39s)
--- PASS: TestAccAWSCloudWatchEventRule_basic (21.45s)

…error on reading tags

Reference: #8654

Previous output from ap-east-1 region acceptance testing:

```
--- FAIL: TestAccAWSCloudWatchEventRule_full (17.82s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: ac4d6cdd-77fc-11e9-86ed-cdca472113e7

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test246660052/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: af588a11-77fc-11e9-8ad8-0792e26dbe7d

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_tags (17.91s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: ac4d1eb2-77fc-11e9-80a8-95f8eb560cb4

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test122506912/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: af6841da-77fc-11e9-96c8-bb13b487ae4c

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_prefix (19.74s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-prefix-20190516170429862800000001: UnknownOperationException:
        	status code: 400, request id: ad6f7ed0-77fc-11e9-86ed-cdca472113e7

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test831543557/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-prefix-20190516170429862800000001: UnknownOperationException:
        	status code: 400, request id: b07fcc05-77fc-11e9-80a8-95f8eb560cb4

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_basic (20.54s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: ae0a86a1-77fc-11e9-97e4-539c846bebae

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test465041618/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: b0f91b41-77fc-11e9-a6ae-13317a02b493

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_importBasic (20.56s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: ae009c0a-77fc-11e9-8ad8-0792e26dbe7d

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test417356671/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule: UnknownOperationException:
        	status code: 400, request id: b0fc4f36-77fc-11e9-89ba-8f98f3d46ebe

        State: <nil>
--- FAIL: TestAccAWSCloudWatchEventRule_enable (20.65s)
    testing.go:568: Step 0 error: errors during apply:

        Error: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-state: UnknownOperationException:
        	status code: 400, request id: ae1f951c-77fc-11e9-a6ae-13317a02b493

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test047282185/main.tf line 2:
          (source code not available)

    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: error setting tags: Error retreiving tags for arn:aws:events:ap-east-1:--OMITTED--:rule/tf-acc-cw-event-rule-state: UnknownOperationException:
        	status code: 400, request id: b10aa776-77fc-11e9-97e4-539c846bebae

        State: <nil>
```

Output from ap-east-1 acceptance testing (failure creating tags expected as tags are not supported in this region):

```
--- PASS: TestAccAWSCloudWatchEventRule_importBasic (41.96s)
--- FAIL: TestAccAWSCloudWatchEventRule_full (21.75s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-full: UnknownOperationException:
        	status code: 400, request id: 89571e62-77fd-11e9-acb1-9520865da030

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test386270447/main.tf line 2:
          (source code not available)

--- PASS: TestAccAWSCloudWatchEventRule_enable (96.28s)
--- PASS: TestAccAWSCloudWatchEventRule_prefix (36.77s)
--- FAIL: TestAccAWSCloudWatchEventRule_tags (20.89s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating tags for tf-acc-cw-event-rule-tags: UnknownOperationException:
        	status code: 400, request id: e5a41de0-77fd-11e9-8481-b3ad1760b794

          on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test274931831/main.tf line 2:
          (source code not available)

--- PASS: TestAccAWSCloudWatchEventRule_basic (67.65s)
```

Output from us-west-2 acceptance testing:

```
--- PASS: TestAccAWSCloudWatchEventRule_importBasic (14.84s)
--- PASS: TestAccAWSCloudWatchEventRule_full (15.14s)
--- PASS: TestAccAWSCloudWatchEventRule_enable (30.45s)
--- PASS: TestAccAWSCloudWatchEventRule_prefix (10.21s)
--- PASS: TestAccAWSCloudWatchEventRule_tags (32.39s)
--- PASS: TestAccAWSCloudWatchEventRule_basic (21.45s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/cloudwatchevents labels May 16, 2019
@bflad bflad requested a review from a team May 16, 2019 17:26
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label May 16, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

👍🏼👍🏼

@bflad bflad added this to the v2.11.0 milestone May 17, 2019
@bflad bflad merged commit 76204ce into master May 17, 2019
@bflad bflad deleted the b-aws_cloudwatch_event_rule-tags-unsupportedoperation branch May 17, 2019 12:04
bflad added a commit that referenced this pull request May 17, 2019
@bflad
Copy link
Contributor Author

bflad commented May 17, 2019

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

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Cloud Watch Rule in HK region
2 participants