Skip to content

Commit

Permalink
Found the correct way to get the location in the sdk-response. (hashi…
Browse files Browse the repository at this point in the history
  • Loading branch information
martenbohlin committed Aug 14, 2019
1 parent 4f6b9fc commit 130c96b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azurerm/resource_arm_recovery_services_fabric.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ func resourceArmRecoveryServicesFabricRead(d *schema.ResourceData, meta interfac
d.Set("name", resp.Name)
d.Set("resource_group_name", resGroup)
if props := resp.Properties; props != nil {
d.Set("location", props.FriendlyName) // Crazy? yes. But the location comes back in the friendly name
if azureDetails, isAzureDetails := props.CustomDetails.AsAzureFabricSpecificDetails(); isAzureDetails {
d.Set("location", azureDetails.Location)
}
}
d.Set("recovery_vault_name", vaultName)
return nil
Expand Down

0 comments on commit 130c96b

Please sign in to comment.