Skip to content

Commit

Permalink
Bump API version to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Hendrik Boll committed Jun 4, 2018
1 parent d74d58f commit a70de22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azurerm/resource_arm_monitor_diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2017-05-01-preview/insights"
"github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2018-03-01/insights"
"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
Expand Down Expand Up @@ -123,15 +123,15 @@ func resourceArmMonitorDiagnosticsCreate(d *schema.ResourceData, meta interface{
},
name)
if err != nil {
return err
return fmt.Errorf("Error creating Diagnostics Setting %q (Resource ID %q): %+v", name, targetResourceId, err)
}

read, err := client.Get(ctx, targetResourceId, name)
if err != nil {
return err
}
if read.ID == nil {
return fmt.Errorf("Cannot read Diagnostic Settings")
return fmt.Errorf("Cannot read ID for Monitor Diagnostics %q", name)
}

d.SetId(*read.ID)
Expand Down

0 comments on commit a70de22

Please sign in to comment.