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

Fix: Resolve issues with aws_iot_thing_type and aws_cloudwatch_event_bus_policy disappearing resources #33203

Merged
merged 12 commits into from
Aug 31, 2023

Conversation

JTaylor-myenergi
Copy link
Contributor

@JTaylor-myenergi JTaylor-myenergi commented Aug 28, 2023

Description

  • Fix an error while refreshing state if aws_iot_thing_type is manually deleted in AWS
  • Fix an error while refreshing state for aws_cloudwatch_event_bus_policy if the associated aws_cloudwatch_event_bus is manually deleted in AWS.

Relations

Closes #31634

References

This is my first contribution, so please double check and let me know if I have missed anything.

Output from Acceptance Testing

% make testacc TESTS=TestAccIoTThingType PKG=iot
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run='TestAccIoTThingType'  -timeout 180m
=== RUN   TestAccIoTThingType_basic
=== PAUSE TestAccIoTThingType_basic
=== RUN   TestAccIoTThingType_full
=== PAUSE TestAccIoTThingType_full
=== RUN   TestAccIoTThingType_tags
=== PAUSE TestAccIoTThingType_tags
=== RUN   TestAccIoTThingType_disappears
=== PAUSE TestAccIoTThingType_disappears
=== CONT  TestAccIoTThingType_basic
=== CONT  TestAccIoTThingType_tags
=== CONT  TestAccIoTThingType_full
=== CONT  TestAccIoTThingType_disappears
--- PASS: TestAccIoTThingType_disappears (343.43s)
--- PASS: TestAccIoTThingType_basic (353.06s)
--- PASS: TestAccIoTThingType_full (381.52s)
--- PASS: TestAccIoTThingType_tags (414.56s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iot        417.383s

% make testacc TESTS=TestAccEventsBusPolicy PKG=events
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsBusPolicy'  -timeout 180m
=== RUN   TestAccEventsBusPolicy_basic
=== PAUSE TestAccEventsBusPolicy_basic
=== RUN   TestAccEventsBusPolicy_ignoreEquivalent
=== PAUSE TestAccEventsBusPolicy_ignoreEquivalent
=== RUN   TestAccEventsBusPolicy_disappears
=== PAUSE TestAccEventsBusPolicy_disappears
=== RUN   TestAccEventsBusPolicy_disappears_EventBus
=== PAUSE TestAccEventsBusPolicy_disappears_EventBus
=== CONT  TestAccEventsBusPolicy_basic
=== CONT  TestAccEventsBusPolicy_disappears
=== CONT  TestAccEventsBusPolicy_ignoreEquivalent
=== CONT  TestAccEventsBusPolicy_disappears_EventBus
--- PASS: TestAccEventsBusPolicy_disappears_EventBus (36.38s)
--- PASS: TestAccEventsBusPolicy_ignoreEquivalent (71.66s)
--- PASS: TestAccEventsBusPolicy_basic (84.53s)
--- PASS: TestAccEventsBusPolicy_disappears (164.01s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/events     166.863s
...

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added the size/M Managed by automation to categorize the size of a PR. label Aug 28, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 28, 2023
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iot Issues and PRs that pertain to the iot service. service/events Issues and PRs that pertain to the events service. labels Aug 28, 2023
@JTaylor-myenergi JTaylor-myenergi marked this pull request as ready for review August 28, 2023 12:14
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @JTaylor-myenergi 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 30, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEventsBusPolicy_' PKG=events             
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 20  -run=TestAccEventsBusPolicy_ -timeout 180m
=== RUN   TestAccEventsBusPolicy_basic
=== PAUSE TestAccEventsBusPolicy_basic
=== RUN   TestAccEventsBusPolicy_ignoreEquivalent
=== PAUSE TestAccEventsBusPolicy_ignoreEquivalent
=== RUN   TestAccEventsBusPolicy_disappears
=== PAUSE TestAccEventsBusPolicy_disappears
=== RUN   TestAccEventsBusPolicy_disappears_EventBus
=== PAUSE TestAccEventsBusPolicy_disappears_EventBus
=== CONT  TestAccEventsBusPolicy_basic
=== CONT  TestAccEventsBusPolicy_disappears
=== CONT  TestAccEventsBusPolicy_disappears_EventBus
=== CONT  TestAccEventsBusPolicy_ignoreEquivalent
--- PASS: TestAccEventsBusPolicy_disappears_EventBus (41.95s)
--- PASS: TestAccEventsBusPolicy_disappears (48.35s)
--- PASS: TestAccEventsBusPolicy_ignoreEquivalent (68.04s)
--- PASS: TestAccEventsBusPolicy_basic (83.54s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	89.615s
% make testacc TESTARGS='-run=TestAccIoTThingType_' PKG=iot ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 2  -run=TestAccIoTThingType_ -timeout 180m
=== RUN   TestAccIoTThingType_basic
=== PAUSE TestAccIoTThingType_basic
=== RUN   TestAccIoTThingType_disappears
=== PAUSE TestAccIoTThingType_disappears
=== RUN   TestAccIoTThingType_full
=== PAUSE TestAccIoTThingType_full
=== RUN   TestAccIoTThingType_tags
=== PAUSE TestAccIoTThingType_tags
=== CONT  TestAccIoTThingType_basic
=== CONT  TestAccIoTThingType_full
--- PASS: TestAccIoTThingType_basic (352.25s)
=== CONT  TestAccIoTThingType_tags
--- PASS: TestAccIoTThingType_full (383.64s)
=== CONT  TestAccIoTThingType_disappears
--- PASS: TestAccIoTThingType_disappears (344.53s)
--- PASS: TestAccIoTThingType_tags (412.64s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	752.730s

@ewbankkit
Copy link
Contributor

@JTaylor-myenergi Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9fd9b30 into hashicorp:main Aug 31, 2023
34 checks passed
@github-actions github-actions bot added this to the v5.15.0 milestone Aug 31, 2023
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

This functionality has been released in v5.15.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. Thank you!

@github-actions
Copy link

github-actions bot commented Oct 1, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2023
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. service/events Issues and PRs that pertain to the events service. service/iot Issues and PRs that pertain to the iot service. size/M 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.

[Bug]: Eventbridge event bus reports "ResourceNotFoundException" once aws resource is deleted
3 participants