Skip to content

Commit

Permalink
bastionhosts - upgrade api version from 2023-11-01 to 2024-01-01
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii committed Sep 5, 2024
1 parent 66ef819 commit 9499a1a
Show file tree
Hide file tree
Showing 39 changed files with 1,947 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/services/network/bastion_host_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/network/bastion_host_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/network/bastion_host_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
11 changes: 10 additions & 1 deletion internal/services/network/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package client
import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkinterfaces"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vmsspublicipaddresses"
network_2023_11_01 "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01"
Expand All @@ -15,13 +16,20 @@ import (

type Client struct {
*network_2023_11_01.Client


BastionHostsClient *bastionhosts.BastionHostsClient
// VMSS Data Source requires the Network Interfaces and VMSSPublicIpAddresses client from `2023-09-01` for the `ListVirtualMachineScaleSetVMNetworkInterfacesComplete` method
NetworkInterfacesClient *networkinterfaces.NetworkInterfacesClient
VMSSPublicIPAddressesClient *vmsspublicipaddresses.VMSSPublicIPAddressesClient
}

func NewClient(o *common.ClientOptions) (*Client, error) {
BastionHostsClient, err := bastionhosts.NewBastionHostsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Bastion Client: %+v", err)
}
o.Configure(BastionHostsClient.Client, o.Authorizers.ResourceManager)

NetworkInterfacesClient, err := networkinterfaces.NewNetworkInterfacesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Network Interfaces Client: %+v", err)
Expand All @@ -42,6 +50,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
}

return &Client{
BastionHostsClient: BastionHostsClient,
NetworkInterfacesClient: NetworkInterfacesClient,
VMSSPublicIPAddressesClient: VMSSPublicIPAddressesClient,
Client: client,
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 9499a1a

Please sign in to comment.