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

Bug fix update of aws_route53recoverycontrolconfig_safety_rule resource #38097

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sdlevi27
Copy link

Always set name and wait_period_ms on request, fix wrong resource read on return
Fixed acceptance test to test UpdateRoutingControl API

Description

This resolves an issue with renaming a resource with aws_route53recoverycontrolconfig_safety_rule and aws_route53recoverycontrolconfig_routing_control resources when WaitForMs parameter is not included and "Malformed control panel arn" on control panels.

Relations

Closes #37763

References

Per https://docs.aws.amazon.com/recovery-cluster/latest/api/safetyrule.html, WaitPeriodMs is always required on update.

Output from Acceptance Testing

% make testacc TESTS=TestAccRoute53RecoveryControlConfig_serial/RoutingControl PKG=route53recoverycontrolconfig
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/route53recoverycontrolconfig/... -v -count 1 -parallel 20 -run='TestAccRoute53RecoveryControlConfig_serial/RoutingControl'  -timeout 360m
=== RUN   TestAccRoute53RecoveryControlConfig_serial
=== PAUSE TestAccRoute53RecoveryControlConfig_serial
=== CONT  TestAccRoute53RecoveryControlConfig_serial
=== RUN   TestAccRoute53RecoveryControlConfig_serial/RoutingControl
=== RUN   TestAccRoute53RecoveryControlConfig_serial/RoutingControl/basic
=== RUN   TestAccRoute53RecoveryControlConfig_serial/RoutingControl/value1updated
=== RUN   TestAccRoute53RecoveryControlConfig_serial/RoutingControl/disappears
=== RUN   TestAccRoute53RecoveryControlConfig_serial/RoutingControl/nonDefaultControlPane
--- PASS: TestAccRoute53RecoveryControlConfig_serial (343.83s)
    --- PASS: TestAccRoute53RecoveryControlConfig_serial/RoutingControl (343.83s)
        --- PASS: TestAccRoute53RecoveryControlConfig_serial/RoutingControl/basic (80.49s)
        --- PASS: TestAccRoute53RecoveryControlConfig_serial/RoutingControl/value1updated (89.56s)
        --- PASS: TestAccRoute53RecoveryControlConfig_serial/RoutingControl/disappears (74.90s)
        --- PASS: TestAccRoute53RecoveryControlConfig_serial/RoutingControl/nonDefaultControlPane (98.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53recoverycontrolconfig	348.206s

 % make testacc TESTS=TestAccRoute53RecoveryControlConfig_serial/SafetyRule/value1updated PKG=route53recoverycontrolconfig
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/route53recoverycontrolconfig/... -v -count 1 -parallel 20 -run='TestAccRoute53RecoveryControlConfig_serial/SafetyRule/value1updated'  -timeout 360m
=== RUN   TestAccRoute53RecoveryControlConfig_serial
=== PAUSE TestAccRoute53RecoveryControlConfig_serial
=== CONT  TestAccRoute53RecoveryControlConfig_serial
=== RUN   TestAccRoute53RecoveryControlConfig_serial/SafetyRule
=== RUN   TestAccRoute53RecoveryControlConfig_serial/SafetyRule/value1updated
--- PASS: TestAccRoute53RecoveryControlConfig_serial (178.49s)
    --- PASS: TestAccRoute53RecoveryControlConfig_serial/SafetyRule (178.49s)
        --- PASS: TestAccRoute53RecoveryControlConfig_serial/SafetyRule/value1updated (178.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53recoverycontrolconfig	182.670s
...

    Always set name and wait_period_ms on request, fix wrong resource read on return
    Fixed acceptance test to test UpdateRoutingControl API

Signed-off-by: Scott Levi <[email protected]>
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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service. size/M Managed by automation to categorize the size of a PR. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service. labels Jun 24, 2024
Copy link

Hey @sdlevi27 👋 Thank you very much for your contribution! At times, our maintainers need to make direct edits to pull requests in order to help get it ready to be merged. Your current settings do not allow maintainers to make such edits. To help facilitate this, update your pull request to allow such edits as described in GitHub's Allowing changes to a pull request branch created from a fork documentation. (If you're using a fork owned by an organization, your organization may not allow you to change this setting. If that is the case, let us know.)

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 24, 2024
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 @sdlevi27 👋

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! 😃

@sdlevi27 sdlevi27 marked this pull request as ready for review June 24, 2024 14:44
@sdlevi27 sdlevi27 requested a review from a team as a code owner June 24, 2024 14:44
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_route53recoverycontrolconfig_safety_rule Name update does not work without change in wait_period_ms
2 participants