diff --git a/azurerm/resource_arm_recovery_services_protected_vm.go b/azurerm/resource_arm_recovery_services_protected_vm.go index dbeaad0c479f6..aaf1d2e557242 100644 --- a/azurerm/resource_arm_recovery_services_protected_vm.go +++ b/azurerm/resource_arm_recovery_services_protected_vm.go @@ -30,8 +30,6 @@ func resourceArmRecoveryServicesProtectedVm() *schema.Resource { Schema: map[string]*schema.Schema{ - // "location": locationSchema(), - "resource_group_name": resourceGroupNameSchema(), "recovery_vault_name": { @@ -74,14 +72,12 @@ func resourceArmRecoveryServicesProtectedVmCreateUpdate(d *schema.ResourceData, client := meta.(*ArmClient).recoveryServicesProtectedItemsClient ctx := meta.(*ArmClient).StopContext - //location := d.Get("location").(string) resourceGroup := d.Get("resource_group_name").(string) tags := d.Get("tags").(map[string]interface{}) vaultName := d.Get("recovery_vault_name").(string) vmId := d.Get("source_vm_id").(string) vmName := d.Get("source_vm_name").(string) - policyName := d.Get("backup_policy_name").(string) protectedItemName := fmt.Sprintf("VM;iaasvmcontainerv2;%s;%s", resourceGroup, vmName) @@ -93,7 +89,6 @@ func resourceArmRecoveryServicesProtectedVmCreateUpdate(d *schema.ResourceData, backupPolicyId := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.RecoveryServices/vaults/%s/backupPolicies/%s", client.SubscriptionID, resourceGroup, vaultName, policyName) item := backup.ProtectedItemResource{ - //Location: utils.String(location), Tags: expandTags(tags), Properties: &backup.AzureIaaSComputeVMProtectedItem{ PolicyID: &backupPolicyId, @@ -146,9 +141,6 @@ func resourceArmRecoveryServicesProtectedVmRead(d *schema.ResourceData, meta int } d.Set("resource_group_name", resourceGroup) - if location := resp.Location; location != nil { - d.Set("location", azureRMNormalizeLocation(*location)) - } d.Set("recovery_vault_name", vaultName) if properties := resp.Properties; properties != nil { diff --git a/azurerm/resource_arm_recovery_services_protected_vm_test.go b/azurerm/resource_arm_recovery_services_protected_vm_test.go index 84b13f0c59694..b993b95a23202 100644 --- a/azurerm/resource_arm_recovery_services_protected_vm_test.go +++ b/azurerm/resource_arm_recovery_services_protected_vm_test.go @@ -32,7 +32,7 @@ func TestAccAzureRMRecoveryServicesProtectedVm_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, - { //vault cannot be deleted unless we stop backing up to it + { //vault cannot be deleted unless we unregister all backups Config: testAccAzureRMRecoveryServicesProtectedVm_base(ri, testLocation()), Check: resource.ComposeTestCheckFunc(), }, diff --git a/website/docs/r/recovery_services_protected_vm.markdown b/website/docs/r/recovery_services_protected_vm.markdown index ca953ab6f80b2..2fcfe4bfd0905 100644 --- a/website/docs/r/recovery_services_protected_vm.markdown +++ b/website/docs/r/recovery_services_protected_vm.markdown @@ -1,7 +1,7 @@ --- layout: "azurerm" page_title: "Azure Resource Manager: azurerm_recovery_services_protected_vm" -sidebar_current: "docs-azurerm-resource-recovery-services-protected_vm" +sidebar_current: "docs-azurerm-resource-recovery-services-protected-vm" description: |- Manages an Recovery Services Protected VM. ---