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

Feature/fix removed resource error handling for aws cloudwatch event permission resource #9044

Conversation

teraken0509
Copy link
Contributor

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 #9025

Release note for CHANGELOG:

Bug Fix
- resource/aws_cloudwatch_event_permission: fix error handling when resource already removed.

Output from acceptance testing:

$ make testacc TESTARGS="-run=TestAccAWSCloudWatchEventPermission_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCloudWatchEventPermission_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSCloudWatchEventPermission_Basic
=== PAUSE TestAccAWSCloudWatchEventPermission_Basic
=== RUN   TestAccAWSCloudWatchEventPermission_Action
=== PAUSE TestAccAWSCloudWatchEventPermission_Action
=== RUN   TestAccAWSCloudWatchEventPermission_Condition
=== PAUSE TestAccAWSCloudWatchEventPermission_Condition
=== RUN   TestAccAWSCloudWatchEventPermission_Multiple
=== PAUSE TestAccAWSCloudWatchEventPermission_Multiple
=== RUN   TestAccAWSCloudWatchEventPermission_Disappears
=== PAUSE TestAccAWSCloudWatchEventPermission_Disappears
=== CONT  TestAccAWSCloudWatchEventPermission_Basic
=== CONT  TestAccAWSCloudWatchEventPermission_Multiple
=== CONT  TestAccAWSCloudWatchEventPermission_Disappears
=== CONT  TestAccAWSCloudWatchEventPermission_Action
=== CONT  TestAccAWSCloudWatchEventPermission_Condition
--- PASS: TestAccAWSCloudWatchEventPermission_Action (35.66s)
--- PASS: TestAccAWSCloudWatchEventPermission_Multiple (50.37s)
--- PASS: TestAccAWSCloudWatchEventPermission_Condition (53.14s)
--- PASS: TestAccAWSCloudWatchEventPermission_Basic (55.14s)
--- PASS: TestAccAWSCloudWatchEventPermission_Disappears (86.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	86.216s

@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/cloudwatchevents tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 19, 2019
@teraken0509 teraken0509 force-pushed the feature/fix-removed-resource-error-handling-for-aws_cloudwatch_event_permission-resource branch from 4fb8072 to 18cbb6b Compare June 19, 2019 03:35
@bflad
Copy link
Contributor

bflad commented Jun 19, 2019

Whoops I'll fix this. 😅

aws/resource_aws_ses_identity_policy_test.go:98:6: `testAccCheckAwsSESIdentityPolicyDestroy` is unused (deadcode)
func testAccCheckAwsSESIdentityPolicyDestroy(s *terraform.State) error {
     ^

@bflad bflad added the bug Addresses a defect in current functionality. label Jun 19, 2019
@bflad bflad added this to the v2.16.0 milestone Jun 19, 2019
Copy link
Contributor

@bflad bflad 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, thanks so much, @kterada0509 🚀

--- PASS: TestAccAWSCloudWatchEventPermission_Action (12.12s)
--- PASS: TestAccAWSCloudWatchEventPermission_Basic (18.01s)
--- PASS: TestAccAWSCloudWatchEventPermission_Multiple (18.19s)
--- PASS: TestAccAWSCloudWatchEventPermission_Condition (18.29s)
--- PASS: TestAccAWSCloudWatchEventPermission_Disappears (70.26s)

@bflad bflad merged commit 16d93c0 into hashicorp:master Jun 19, 2019
bflad added a commit that referenced this pull request Jun 19, 2019
bflad added a commit that referenced this pull request Jun 19, 2019
@teraken0509 teraken0509 deleted the feature/fix-removed-resource-error-handling-for-aws_cloudwatch_event_permission-resource branch June 19, 2019 04:30
@bflad
Copy link
Contributor

bflad commented Jun 20, 2019

This has been released in version 2.16.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 Nov 3, 2019

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 Nov 3, 2019
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/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_cloudwatch_event_permission: Does not properly remove resource when removed from AWS
2 participants