Need help to enable vm replication using azure bicep

129 views Asked by At

Need help to enable vm replication using azure bicep.

My Source vm in norway east.
My source region is norway east.
My target region is norway west.

Can some pls suggest how to enable vm replication from norway east to norway west using azure bicep.

1

There are 1 answers

5
Arko On

As per MS doc -Backup Resource Manager VMs using Recovery Services vault by MS resource Ryan Hill, The bicep uses a flag to determine if to create a new resource or not, already created resources, please use the existing keyword in your code as below-

resource existingSiteRecovery 'Microsoft.SiteRecovery/vaults@2021-03-01' existing = {
  name: 'arkoSiteRecoveryVault'
  scope: resourceGroup('arkoResourceGroup')
}

resource existingVM 'Microsoft.Compute/virtualMachines@2021-03-01' existing = {
  name: 'myinternetVM'
  scope: resourceGroup('arkoResourceGroup')
}

Modify the above code with your resource names . output: enter image description here

enter image description here