Skip to content

Commit

Permalink
azurerm_recovery_serivces_protection_policy_vm: fixed ID error (#3108)
Browse files Browse the repository at this point in the history
Fixes #3063
  • Loading branch information
mcharriere authored and katbyte committed Mar 25, 2019
1 parent 4e4ac55 commit ed0fd61
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"log"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
Expand Down Expand Up @@ -51,7 +52,8 @@ func dataSourceArmRecoveryServicesProtectionPolicyVmRead(d *schema.ResourceData,
return fmt.Errorf("Error making Read request on Recovery Service Protection Policy %q (Resource Group %q): %+v", name, resourceGroup, err)
}

d.SetId(*protectionPolicy.ID)
id := strings.Replace(*protectionPolicy.ID, "Subscriptions", "subscriptions", 1)
d.SetId(id)

flattenAndSetTags(d, protectionPolicy.Tags)
return nil
Expand Down

0 comments on commit ed0fd61

Please sign in to comment.