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_recovery_services_vault cross_region_restore_enabled = true -> false not working #20373

Closed
1 task done
Klaas- opened this issue Feb 8, 2023 · 3 comments · Fixed by #20406
Closed
1 task done

Comments

@Klaas-
Copy link
Contributor

Klaas- commented Feb 8, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.3.7

AzureRM Provider Version

3.42.0

Affected Resource(s)/Data Source(s)

azurerm_recovery_services_vault

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "tfex-recovery_vault"
  location = "West Europe"
}

resource "azurerm_recovery_services_vault" "backup_vault" {
  name                         = "example-recovery-vault"
  location                     = azurerm_resource_group.example.location
  resource_group_name          = azurerm_resource_group.example.name
  sku                          = "Standard"
  cross_region_restore_enabled = true ## change to false on 2nd run

  soft_delete_enabled = false
}

Debug Output/Panic Output

Creation works, update to cross_region_restore_enabled = false does not work
The update never finishes, so I am guessing the API does not respond properly :) In portal I can see "Cross Region Restore is currently non-reversible storage property." so I am guessing this means it's a property where true -> false means recreation, false -> true should work (haven't tested that though)

Expected Behaviour


  # azurerm_recovery_services_vault.backup_vault will be recreated
  ~ resource "azurerm_recovery_services_vault" "backup_vault" {
      ~ cross_region_restore_enabled  = true -> false

Actual Behaviour

  # azurerm_recovery_services_vault.backup_vault will be updated in-place
  ~ resource "azurerm_recovery_services_vault" "backup_vault" {
      ~ cross_region_restore_enabled  = true -> false

Steps to Reproduce

  • terraform apply
  • change cross_region_restore_enabled to false
  • terraform apply [does not finish]

Important Factoids

No response

References

No response

@ziyeqf
Copy link
Contributor

ziyeqf commented Feb 10, 2023

Hi @Klaas- ,thanks for reporting.

You are right, once cross_region_restore_enabled is set to true, it does not allowed to set it to false again. Have submitted a PR( #20406 ) to limit this. When this PR merged & released, it will be fixed.

And please note: after this fix, changing cross_region_restore_enabled from true to false will force a new azurerm_recovery_services_vault to be created.

For any furthur questions please leave comments.
Thanks!

@github-actions github-actions bot added this to the v3.44.0 milestone Feb 14, 2023
@github-actions
Copy link

This functionality has been released in v3.44.0 of the Terraform 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

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 have found a problem that seems similar to this, 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 Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants