Skip to content

Commit

Permalink
Updating the Azure SDK to v40.3.0 / AzureAD to v0.8.0 (#6134)
Browse files Browse the repository at this point in the history
This PR supersedes #6049 as nested go modules and merge conflicts do not spark joy - but fundamentally this:

- updates github.com/Azure/azure-sdk-for-go to v40.3.0
- updates github.com/Azure/go-autorest to our fork containing Azure/go-autorest#512
- updates github.com/terraform-providers/terraform-provider-azuread to v0.8.0
- code changes needed for v40.3.0 of the Azure SDK - including opting into the old count 429's as requests which should be retried without adding to the total failure count

Enables #5769
Enables #5696
  • Loading branch information
tombuildsstuff committed Mar 19, 2020
1 parent cd67290 commit 753fe90
Show file tree
Hide file tree
Showing 1,051 changed files with 22,926 additions and 11,429 deletions.
3 changes: 3 additions & 0 deletions azurerm/internal/clients/client.go
Expand Up @@ -3,6 +3,7 @@ package clients
import (
"context"

"github.com/Azure/go-autorest/autorest"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features"
analysisServices "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/analysisservices/client"
Expand Down Expand Up @@ -147,6 +148,8 @@ type Client struct {
// NOTE: it should be possible for this method to become Private once the top level Client's removed

func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error {
autorest.Count429AsRetry = false

client.Features = o.Features
client.StopContext = ctx

Expand Down
2 changes: 1 addition & 1 deletion azurerm/internal/services/logic/client/client.go
@@ -1,7 +1,7 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2019-05-01/logic"
"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)

Expand Down
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2019-05-01/logic"
"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
Expand Down
2 changes: 1 addition & 1 deletion azurerm/internal/services/logic/logic_apps.go
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2019-05-01/logic"
"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
Expand Down
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/logic/mgmt/2019-05-01/logic"
"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
Expand Down
Expand Up @@ -397,7 +397,7 @@ func expandMonitorMetricAlertAction(input []interface{}) *[]insights.MetricAlert

actions = append(actions, insights.MetricAlertAction{
ActionGroupID: utils.String(agID),
WebhookProperties: props,
WebHookProperties: props,
})
}
}
Expand Down Expand Up @@ -466,7 +466,7 @@ func flattenMonitorMetricAlertAction(input *[]insights.MetricAlertAction) (resul
}

props := make(map[string]string)
for pk, pv := range action.WebhookProperties {
for pk, pv := range action.WebHookProperties {
if pv != nil {
props[pk] = *pv
}
Expand Down
12 changes: 6 additions & 6 deletions go.mod
@@ -1,8 +1,8 @@
module github.com/terraform-providers/terraform-provider-azurerm

require (
github.com/Azure/azure-sdk-for-go v38.1.0+incompatible
github.com/Azure/go-autorest/autorest v0.9.3
github.com/Azure/azure-sdk-for-go v40.3.0+incompatible
github.com/Azure/go-autorest/autorest v0.10.0
github.com/Azure/go-autorest/autorest/date v0.2.0
github.com/btubbs/datetime v0.1.0
github.com/davecgh/go-spew v1.1.1
Expand All @@ -16,17 +16,17 @@ require (
github.com/hashicorp/terraform-plugin-sdk v1.6.0
github.com/satori/go.uuid v1.2.0
github.com/satori/uuid v0.0.0-20160927100844-b061729afc07
github.com/terraform-providers/terraform-provider-azuread v0.6.1-0.20191007035844-361c0a206ad4
github.com/terraform-providers/terraform-provider-azuread v0.8.0
github.com/tombuildsstuff/giovanni v0.9.0
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb
gopkg.in/yaml.v2 v2.2.2
)

replace github.com/Azure/go-autorest => github.com/tombuildsstuff/go-autorest v0.9.3-hashi-auth
replace github.com/Azure/go-autorest => github.com/tombuildsstuff/go-autorest v14.0.1-0.20200317095413-f2d2d0252c3c+incompatible

replace github.com/Azure/go-autorest/autorest => github.com/tombuildsstuff/go-autorest/autorest v0.9.3-hashi-auth
replace github.com/Azure/go-autorest/autorest => github.com/tombuildsstuff/go-autorest/autorest v0.10.1-0.20200317095413-f2d2d0252c3c

replace github.com/Azure/go-autorest/autorest/azure/auth => github.com/tombuildsstuff/go-autorest/autorest/azure/auth v0.9.3-hashi-auth-subm
replace github.com/Azure/go-autorest/autorest/azure/auth => github.com/tombuildsstuff/go-autorest/autorest/azure/auth v0.4.3-0.20200317095413-f2d2d0252c3c

go 1.13

0 comments on commit 753fe90

Please sign in to comment.