hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Support for High Churn on Azure Seite Recovery replicated VM #23343

Open viewegchris opened 12 months ago

viewegchris commented 12 months ago

Is there an existing issue for this?

Community Note

Description

Azure added support for High Churn replication on Azure Site Recovery Vault. This allows to replicate VMs with high data rates as well. The new feature requires the use of Premium_LRS Storage Accounts.

New or Affected Resource(s)/Data Source(s)

azurerm_site_recovery_replicated_vm

Potential Terraform Configuration

resource "azurerm_site_recovery_replicated_vm" "replicated_vm" {
  name                                      = "example-vm"
  recovery_vault_name                       = "recoveryvault01"
  resource_group_name                       = "z-ach-a9999-pr01-01-asr"
  recovery_replication_policy_id            = data.azurerm_site_recovery_replication_policy.policy.id
  source_vm_id                              = module.replicated_vm.virtual_machine_id
  source_recovery_fabric_name               = data.azurerm_site_recovery_fabric.fabric.name
  source_recovery_protection_container_name = data.azurerm_site_recovery_protection_container.primary.name
  target_zone                               = "3"
  target_resource_group_id                  = "/subscriptions/xxx/resourceGroups/z-ach-a9999-pr01-ns1-01-asr"
  target_recovery_fabric_id                 = data.azurerm_site_recovery_fabric.fabric.id
  target_recovery_protection_container_id   = data.azurerm_site_recovery_protection_container.secondary.id
  target_network_id                         = "/subscriptions/xxx/resourceGroups/z-ach-a9999i-pr01-01/providers/Microsoft.Network/virtualNetworks/zacha9999ipr01net01"

  #new configuration
  churn_option                       = "high" # default is "normal"
  #############

  managed_disk {
    disk_id                       = data.azurerm_managed_disk.os_disk.id
    staging_storage_account_id    = azurerm_storage_account.high_churn_test.id
    target_resource_group_id      = "/subscriptions/xxx/resourceGroups/z-ach-a9999-pr01-01-asr"
    target_disk_type              = "Premium_LRS"
    target_replica_disk_type      = "Premium_LRS"
  }

  network_interface {
    source_network_interface_id = "/subscriptions/xxx/resourceGroups/z-ach-a9999-pr01-01/providers/Microsoft.Network/networkInterfaces/examplevmnic01"
    target_subnet_name          = "asr-vms"
    target_static_ip            = "100.114.7.232"
  }

  timeouts {
    create = "8h"
    update = "8h"
    delete = "8h"
  }
}

References

https://learn.microsoft.com/en-us/azure/site-recovery/concepts-azure-to-azure-high-churn-support

rcskosir commented 12 months ago

@viewegchris Thank you for taking the time to open this feature request!

horvatal commented 7 months ago

any news for this feature?

FreddyAyala commented 5 months ago

Hello there, working on a new module to implement this, do you have any news about it?

FreddyAyala commented 3 months ago

@rcskosir any news about it?