forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
24 lines (19 loc) · 816 Bytes
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package client
import (
"github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
"github.com/kevinklinger/terraform-provider-azurerm/v2/internal/common"
)
type Client struct {
GroupsClient *managementgroups.Client
SubscriptionClient *managementgroups.SubscriptionsClient
}
func NewClient(o *common.ClientOptions) *Client {
GroupsClient := managementgroups.NewClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&GroupsClient.Client, o.ResourceManagerAuthorizer)
SubscriptionClient := managementgroups.NewSubscriptionsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&SubscriptionClient.Client, o.ResourceManagerAuthorizer)
return &Client{
GroupsClient: &GroupsClient,
SubscriptionClient: &SubscriptionClient,
}
}