Skip to content

Commit

Permalink
Updating to v18.0.0 of Azure/azure-sdk-for-go / v10.12.0 of Azure/go…
Browse files Browse the repository at this point in the history
…-autorest (#1487)

*  Updating to v18.0.0 of Azure/azure-sdk-for-go / v10.12.0 of Azure/go-autorest

* Fixing the build
  • Loading branch information
tombuildsstuff authored Jul 4, 2018
1 parent 4c9353e commit 2f03253
Show file tree
Hide file tree
Showing 88 changed files with 16,462 additions and 10,087 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_application_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func resourceArmApplicationGateway() *schema.Resource {
Required: true,
DiffSuppressFunc: ignoreCaseDiffSuppressFunc,
ValidateFunc: validation.StringInSlice([]string{
string(network.Standard),
string(network.WAF),
string(network.ApplicationGatewayTierStandard),
string(network.ApplicationGatewayTierWAF),
}, true),
},

Expand Down
4 changes: 2 additions & 2 deletions azurerm/resource_arm_express_route_circuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func resourceArmExpressRouteCircuit() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(network.ExpressRouteCircuitSkuTierStandard),
string(network.ExpressRouteCircuitSkuTierPremium),
string(network.Standard),
string(network.Premium),
}, true),
DiffSuppressFunc: ignoreCaseDiffSuppressFunc,
},
Expand Down
26 changes: 19 additions & 7 deletions azurerm/resource_arm_log_analytics_solution.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"

"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)

Expand Down Expand Up @@ -104,14 +105,21 @@ func resourceArmLogAnalyticsSolutionCreateUpdate(d *schema.ResourceData, meta in
res, err := client.CreateOrUpdate(ctx, resGroup, name, parameters)
//Currently this is required to work around successful creation resulting in an error
// being returned
if err != nil && res.StatusCode != 201 {
return err
if err != nil && res.Response().StatusCode != 201 {
if resp := res.Response(); resp != nil {
if resp.StatusCode != 201 {
return err
}
}
}

solution, _ := client.Get(ctx, resGroup, name)
solution, err := client.Get(ctx, resGroup, name)
if err != nil {
return fmt.Errorf("Error retrieving Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err)
}

if solution.ID == nil {
return fmt.Errorf("Cannot read Log Analytics Solution '%s' (resource group %s) ID", name, resGroup)
return fmt.Errorf("Cannot read Log Analytics Solution %q (Resource Group %q) ID", name, resGroup)
}

d.SetId(*solution.ID)
Expand Down Expand Up @@ -182,14 +190,18 @@ func resourceArmLogAnalyticsSolutionDelete(d *schema.ResourceData, meta interfac
resGroup := id.ResourceGroup
name := id.Path["solutions"]

resp, err := client.Delete(ctx, resGroup, name)
future, err := client.Delete(ctx, resGroup, name)
if err != nil {
return fmt.Errorf("Error deleting Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err)
}

err = future.WaitForCompletionRef(ctx, client.Client)
if err != nil {
if utils.ResponseWasNotFound(resp) {
if response.WasNotFound(future.Response()) {
return nil
}

return fmt.Errorf("Error issuing AzureRM delete request for Log Analytics Solution '%s': %+v", name, err)
return fmt.Errorf("Error waiting for deletion of Log Analytics Solution %q (Resource Group %q): %+v", name, resGroup, err)
}

return nil
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f03253

Please sign in to comment.