Skip to content

Commit

Permalink
New Resource: azurerm_cosmosdb_postgresql_cluster (#21090)
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei authored Apr 26, 2023
1 parent 48f8add commit f966ed0
Show file tree
Hide file tree
Showing 31 changed files with 2,338 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/services/cosmos/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import (
"github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2021-10-15/documentdb" // nolint: staticcheck
"github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/managedcassandras"
"github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway"
"github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
CassandraClient *documentdb.CassandraResourcesClient
CassandraClustersClient *managedcassandras.ManagedCassandrasClient
CassandraDatacentersClient *documentdb.CassandraDataCentersClient
ClustersClient *clusters.ClustersClient
DatabaseClient *documentdb.DatabaseAccountsClient
GremlinClient *documentdb.GremlinResourcesClient
MongoDbClient *documentdb.MongoDBResourcesClient
Expand All @@ -32,6 +34,9 @@ func NewClient(o *common.ClientOptions) *Client {
cassandraDatacentersClient := documentdb.NewCassandraDataCentersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&cassandraDatacentersClient.Client, o.ResourceManagerAuthorizer)

clustersClient := clusters.NewClustersClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&clustersClient.Client, o.ResourceManagerAuthorizer)

databaseClient := documentdb.NewDatabaseAccountsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&databaseClient.Client, o.ResourceManagerAuthorizer)

Expand Down Expand Up @@ -63,6 +68,7 @@ func NewClient(o *common.ClientOptions) *Client {
CassandraClient: &cassandraClient,
CassandraClustersClient: &cassandraClustersClient,
CassandraDatacentersClient: &cassandraDatacentersClient,
ClustersClient: &clustersClient,
DatabaseClient: &databaseClient,
GremlinClient: &gremlinClient,
MongoDbClient: &mongoDbClient,
Expand Down
Loading

0 comments on commit f966ed0

Please sign in to comment.