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

azurerm_site_recovery_replication_recovery_plan: fix update for boot_recovery_group,failover_recovery_group and shutdown_recovery_group #22687

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

ziyeqf
Copy link
Contributor

@ziyeqf ziyeqf commented Jul 26, 2023

fix #22649
Screenshot 2023-07-26 at 18 49 53

Signed-off-by: ziyeqf <[email protected]>
@@ -517,14 +517,26 @@ func (r SiteRecoveryReplicationRecoveryPlanResource) Update() sdk.ResourceFunc {
return fmt.Errorf("parse Site reocvery replication plan id: %+v", err)
}

recoveryPlanGroup, err := expandRecoveryGroup(model.RecoveryGroup)
if err != nil {

Choose a reason for hiding this comment

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

Move this below the new code and remove the duplicate extra error return code in the if-else structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

code updated, thanks

ziyeqf added 2 commits July 26, 2023 15:38
Signed-off-by: ziyeqf <[email protected]>
Signed-off-by: ziyeqf <[email protected]>
@ziyeqf ziyeqf marked this pull request as ready for review July 26, 2023 10:50
Copy link
Member

@catriona-m catriona-m left a comment

Choose a reason for hiding this comment

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

HI @ziyeqf, just left one minor comment here but once that is addressed we can take another look. Thanks!

Comment on lines 520 to 522
if err != nil {
return fmt.Errorf("when expanding recovery group: %s", err)
}
Copy link
Member

Choose a reason for hiding this comment

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

this can be removed here now too since we aren't expanding the group here anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, sorry for that..

Signed-off-by: ziyeqf <[email protected]>
Copy link
Member

@catriona-m catriona-m left a comment

Choose a reason for hiding this comment

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

Thanks @ziyeqf LGTM! :octocat:

@catriona-m catriona-m merged commit 26fdc34 into hashicorp:main Jul 28, 2023
@github-actions github-actions bot added this to the v3.68.0 milestone Jul 28, 2023
catriona-m added a commit that referenced this pull request Jul 28, 2023
@ziyeqf ziyeqf deleted the tengzh/issue/recoveryplan_update branch July 28, 2023 13:50
Copy link

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 contributions.
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 May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update azurerm_site_recovery_replication_recovery_plan does correctly update recovery groups
3 participants