Skip to content

Commit

Permalink
Merge pull request hashicorp#23788 from hashicorp/dependencies/adding…
Browse files Browse the repository at this point in the history
…-sql-from-go-azure-sdk

dependencies: vendoring the `sql` changes from hashicorp#23721
  • Loading branch information
tombuildsstuff authored Nov 6, 2023
2 parents 94dd767 + c3a1e8a commit 5e95723
Show file tree
Hide file tree
Showing 183 changed files with 9,880 additions and 3 deletions.
4 changes: 3 additions & 1 deletion internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.MobileNetwork, err = mobilenetwork.NewClient(o); err != nil {
return fmt.Errorf("building clients for Mobile Network: %+v", err)
}
client.MSSQL = mssql.NewClient(o)
if client.MSSQL, err = mssql.NewClient(o); err != nil {
return fmt.Errorf("building clients for MSSQL: %+v", err)
}
client.MSSQLManagedInstance = mssqlmanagedinstance.NewClient(o)
if client.MySQL, err = mysql.NewClient(o); err != nil {
return fmt.Errorf("building clients for MySQL: %+v", err)
Expand Down
21 changes: 19 additions & 2 deletions internal/services/mssql/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ import (
"github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups"
"github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"

// @tombuildsstuff: force-importing these packages to vendor them to reduce the size of
// https://github.com/hashicorp/terraform-provider-azurerm/pull/23721, meaning that
// @WodansSon can remove the underscore as these are used to make these regular imports
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies"
_ "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions"
)

type Client struct {
Expand Down Expand Up @@ -45,7 +62,7 @@ type Client struct {
VirtualNetworkRulesClient *sql.VirtualNetworkRulesClient
}

func NewClient(o *common.ClientOptions) *Client {
func NewClient(o *common.ClientOptions) (*Client, error) {
backupShortTermRetentionPoliciesClient := sql.NewBackupShortTermRetentionPoliciesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&backupShortTermRetentionPoliciesClient.Client, o.ResourceManagerAuthorizer)

Expand Down Expand Up @@ -171,5 +188,5 @@ func NewClient(o *common.ClientOptions) *Client {
VirtualMachinesClient: &virtualMachinesClient,
VirtualMachineGroupsClient: &virtualMachineGroupsClient,
VirtualNetworkRulesClient: &virtualNetworkRulesClient,
}
}, 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.

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 5e95723

Please sign in to comment.