Skip to content

Commit

Permalink
consumption - switch to hashicorp/go-azure-sdk (#18101)
Browse files Browse the repository at this point in the history
* use go-azure-sdk for consumption

* go mod tidy and vendor

* remove setting etag in the data sources
  • Loading branch information
stephybun committed Aug 24, 2022
1 parent 5e306e1 commit ab4094c
Show file tree
Hide file tree
Showing 80 changed files with 1,196 additions and 13,628 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/rickb777/date v1.12.5-0.20200422084442-6300e543c4d9
github.com/sergi/go-diff v1.2.0
github.com/shopspring/decimal v1.2.0
github.com/tombuildsstuff/giovanni v0.20.0
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
6 changes: 3 additions & 3 deletions internal/services/consumption/client/client.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/consumption/mgmt/2019-10-01/consumption"
"github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
BudgetsClient *consumption.BudgetsClient
BudgetsClient *budgets.BudgetsClient
}

func NewClient(o *common.ClientOptions) *Client {
budgetsClient := consumption.NewBudgetsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
budgetsClient := budgets.NewBudgetsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&budgetsClient.Client, o.ResourceManagerAuthorizer)

return &Client{
Expand Down
Loading

0 comments on commit ab4094c

Please sign in to comment.