Skip to content

Commit

Permalink
Merge pull request #22815 from hashicorp/dependencies/go-azure-sdk
Browse files Browse the repository at this point in the history
dependencies: updating to `v0.20230804.1110546` of `github.com/hashicorp/go-azure-sdk`
  • Loading branch information
tombuildsstuff authored Aug 4, 2023
2 parents 10ecd75 + c9ef3c6 commit 918a0db
Show file tree
Hide file tree
Showing 115 changed files with 3,659 additions and 4,989 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/hashicorp/go-azure-helpers v0.57.0
github.com/hashicorp/go-azure-sdk v0.20230803.1095722
github.com/hashicorp/go-azure-sdk v0.20230804.1110546
github.com/hashicorp/go-hclog v1.4.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg=
github.com/hashicorp/go-azure-helpers v0.57.0 h1:85CWEUtIjMtx8DaXisFbEb2GCWR4S2UZlYvJpSPYoZ4=
github.com/hashicorp/go-azure-helpers v0.57.0/go.mod h1:BQUQp5udwbJ8pnzl0wByCLVEEyPMAFpJ9vOREiCzObo=
github.com/hashicorp/go-azure-sdk v0.20230803.1095722 h1:7q4DEAriywcH6BsE2XczLzwY8Y3x9vqh65d0RxVnjak=
github.com/hashicorp/go-azure-sdk v0.20230803.1095722/go.mod h1:iZrpp7qJSZxocEkr4SjslzxpDrhuRLmedyVGGcCPbhk=
github.com/hashicorp/go-azure-sdk v0.20230804.1110546 h1:yx4wGSFQdp9mWfFWZVOv9W83VhZa/HzzxKYIuiSNz74=
github.com/hashicorp/go-azure-sdk v0.20230804.1110546/go.mod h1:iZrpp7qJSZxocEkr4SjslzxpDrhuRLmedyVGGcCPbhk=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down
12 changes: 9 additions & 3 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.Blueprints, err = blueprints.NewClient(o); err != nil {
return fmt.Errorf("building clients for BluePrints: %+v", err)
}
client.Bot = bot.NewClient(o)
if client.Bot, err = bot.NewClient(o); err != nil {
return fmt.Errorf("building clients for Bot: %+v", err)
}
client.Cdn = cdn.NewClient(o)
if client.Cognitive, err = cognitiveServices.NewClient(o); err != nil {
return fmt.Errorf("building clients for Cognitive: %+v", err)
Expand Down Expand Up @@ -417,12 +419,16 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.HPCCache, err = hpccache.NewClient(o); err != nil {
return fmt.Errorf("building clients for HPC Cache: %+v", err)
}
client.HSM = hsm.NewClient(o)
if client.HSM, err = hsm.NewClient(o); err != nil {
return fmt.Errorf("building clients for HSM: %+v", err)
}
client.HDInsight = hdinsight.NewClient(o)
if client.HealthCare, err = healthcare.NewClient(o); err != nil {
return fmt.Errorf("building clients for HealthCare: %+v", err)
}
client.HybridCompute = hybridcompute.NewClient(o)
if client.HybridCompute, err = hybridcompute.NewClient(o); err != nil {
return fmt.Errorf("building clients for HybridCompute: %+v", err)
}
if client.IoTCentral, err = iotcentral.NewClient(o); err != nil {
return fmt.Errorf("building clients for IoTCentral: %+v", err)
}
Expand Down
14 changes: 8 additions & 6 deletions internal/services/arckubernetes/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@ type Client struct {
}

func NewClient(o *common.ClientOptions) (*Client, error) {

arcKubernetesClient := connectedclusters.NewConnectedClustersClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&arcKubernetesClient.Client, o.ResourceManagerAuthorizer)
arcKubernetesClient, err := connectedclusters.NewConnectedClustersClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building ConnectedClusters client: %+v", err)
}
o.Configure(arcKubernetesClient.Client, o.Authorizers.ResourceManager)

extensionsClient, err := extensions.NewExtensionsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Extensions Client: %+v", err)
return nil, fmt.Errorf("building Extensions client: %+v", err)
}
o.Configure(extensionsClient.Client, o.Authorizers.ResourceManager)

fluxConfigurationClient, err := fluxconfiguration.NewFluxConfigurationClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Flux Configuration Client: %+v", err)
return nil, fmt.Errorf("building FluxConfiguration client: %+v", err)
}
o.Configure(fluxConfigurationClient.Client, o.Authorizers.ResourceManager)

return &Client{
ArcKubernetesClient: &arcKubernetesClient,
ArcKubernetesClient: arcKubernetesClient,
ExtensionsClient: extensionsClient,
FluxConfigurationClient: fluxConfigurationClient,
}, nil
Expand Down
17 changes: 11 additions & 6 deletions internal/services/bot/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
package client

import (
"github.com/Azure/go-autorest/autorest"
"fmt"

healthbot_2022_08_08 "github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08"
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
"github.com/tombuildsstuff/kermit/sdk/botservice/2021-05-01-preview/botservice"
)
Expand All @@ -17,7 +19,7 @@ type Client struct {
HealthBotClient *healthbot_2022_08_08.Client
}

func NewClient(o *common.ClientOptions) *Client {
func NewClient(o *common.ClientOptions) (*Client, error) {
botClient := botservice.NewBotsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&botClient.Client, o.ResourceManagerAuthorizer)

Expand All @@ -27,14 +29,17 @@ func NewClient(o *common.ClientOptions) *Client {
channelClient := botservice.NewChannelsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&channelClient.Client, o.ResourceManagerAuthorizer)

healthBotsClient := healthbot_2022_08_08.NewClientWithBaseURI(o.ResourceManagerEndpoint, func(c *autorest.Client) {
o.ConfigureClient(c, o.ResourceManagerAuthorizer)
healthBotsClient, err := healthbot_2022_08_08.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) {
o.Configure(c, o.Authorizers.ResourceManager)
})
if err != nil {
return nil, fmt.Errorf("building HealthBots client: %+v", err)
}

return &Client{
BotClient: &botClient,
ChannelClient: &channelClient,
ConnectionClient: &connectionClient,
HealthBotClient: &healthBotsClient,
}
HealthBotClient: healthBotsClient,
}, nil
}
15 changes: 10 additions & 5 deletions internal/services/hsm/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package client

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)
Expand All @@ -12,11 +14,14 @@ type Client struct {
DedicatedHsmClient *dedicatedhsms.DedicatedHsmsClient
}

func NewClient(o *common.ClientOptions) *Client {
dedicatedHsmClient := dedicatedhsms.NewDedicatedHsmsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&dedicatedHsmClient.Client, o.ResourceManagerAuthorizer)
func NewClient(o *common.ClientOptions) (*Client, error) {
dedicatedHsmClient, err := dedicatedhsms.NewDedicatedHsmsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building DedicatedHsms client: %+v", err)
}
o.Configure(dedicatedHsmClient.Client, o.Authorizers.ResourceManager)

return &Client{
DedicatedHsmClient: &dedicatedHsmClient,
}
DedicatedHsmClient: dedicatedHsmClient,
}, nil
}
43 changes: 28 additions & 15 deletions internal/services/hybridcompute/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package client

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions"
"github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines"
"github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections"
Expand All @@ -18,24 +20,35 @@ type Client struct {
PrivateLinkScopesClient *privatelinkscopes.PrivateLinkScopesClient
}

func NewClient(o *common.ClientOptions) *Client {

machineExtensionsClient := machineextensions.NewMachineExtensionsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&machineExtensionsClient.Client, o.ResourceManagerAuthorizer)
func NewClient(o *common.ClientOptions) (*Client, error) {
machineExtensionsClient, err := machineextensions.NewMachineExtensionsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building MachineExtensions client: %+v", err)
}
o.Configure(machineExtensionsClient.Client, o.Authorizers.ResourceManager)

machinesClient := machines.NewMachinesClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&machinesClient.Client, o.ResourceManagerAuthorizer)
machinesClient, err := machines.NewMachinesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Machines client: %+v", err)
}
o.Configure(machinesClient.Client, o.Authorizers.ResourceManager)

privateEndpointConnectionsClient := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&privateEndpointConnectionsClient.Client, o.ResourceManagerAuthorizer)
privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err)
}
o.Configure(privateEndpointConnectionsClient.Client, o.Authorizers.ResourceManager)

privateLinkScopesClient := privatelinkscopes.NewPrivateLinkScopesClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&privateLinkScopesClient.Client, o.ResourceManagerAuthorizer)
privateLinkScopesClient, err := privatelinkscopes.NewPrivateLinkScopesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building PrivateLinkScopes client: %+v", err)
}
o.Configure(privateLinkScopesClient.Client, o.Authorizers.ResourceManager)

return &Client{
MachineExtensionsClient: &machineExtensionsClient,
MachinesClient: &machinesClient,
PrivateEndpointConnectionsClient: &privateEndpointConnectionsClient,
PrivateLinkScopesClient: &privateLinkScopesClient,
}
MachineExtensionsClient: machineExtensionsClient,
MachinesClient: machinesClient,
PrivateEndpointConnectionsClient: privateEndpointConnectionsClient,
PrivateLinkScopesClient: privateLinkScopesClient,
}, nil
}

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.

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

Loading

0 comments on commit 918a0db

Please sign in to comment.