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]: aws_route53recoverycontrolconfig_safety_rule Name update does not work without change in wait_period_ms #37763

Open
sdlevi27 opened this issue May 29, 2024 · 1 comment · May be fixed by #38097
Labels
bug Addresses a defect in current functionality. service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service.

Comments

@sdlevi27
Copy link

sdlevi27 commented May 29, 2024

Terraform Core Version

1.5.5

AWS Provider Version

5.51.1

Affected Resource(s)

aws_route53recoverycontrolconfig_safety_rule

Expected Behavior

Name should be updated when only updating the Name property on an existing Route 53 Recovery Controller Safety Rule

Actual Behavior

Module fails with error
Error: updating Route53 Recovery Control Config Assertion Rule: InvalidParameter: 1 validation error(s) found. missing required field, UpdateSafetyRuleInput.AssertionRuleUpdate.WaitPeriodMs.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_route53recoverycontrolconfig_safety_rule" "safety_rules" {
  asserted_controls = [arn:aws:route53-recovery-control::XXX:controlpanel/XXX/routingcontrol/XXX]
  control_panel_arn = arn:aws:route53-recovery-control::XXX:controlpanel/XXX/routingcontrol/XXX
  name              = my-routing-control
  wait_period_ms    = 5000

  rule_config {
    inverted  = false
    threshold = 1
    type      = "ATLEAST"
  }
}

Steps to Reproduce

Deploy Routing Control using Terraform
Update name from my-routing-control to my-routing-control2.
Do not update any other parameters in the resource.
Run Terraform Apply

Debug Output

No response

Panic Output

No response

Important Factoids

Can work around by modifying wait_period_ms parameter as part of the Update with name parameter, however, that also fails in Terraform with a separate error (but the routing control is successfully updated in AWS!)

Error: updating Route53 Recovery Control Config Assertion Rule: describing Route53 Recovery Control Config Control Panel: ValidationException: Malformed control panel arn Arn(arn:aws:route53-recovery-control::XXX:controlpanel/XXX/safetyrule/XXX)

References

Appears to be issue at https://github.com/hashicorp/terraform-provider-aws/blob/v5.51.1/internal/service/route53recoverycontrolconfig/safety_rule.go#L332

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

Would you like to implement a fix?

Yes

@sdlevi27 sdlevi27 added the bug Addresses a defect in current functionality. label May 29, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/route53recoverycontrolconfig Issues and PRs that pertain to the route53recoverycontrolconfig service. label May 29, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 29, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label 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.
Projects
None yet
2 participants