Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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