Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TemplateSpec Support for Template Deployments #10603

Merged
merged 13 commits into from
Mar 25, 2021
Merged
26 changes: 16 additions & 10 deletions azurerm/internal/services/resource/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ package client

import (
providers "github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources"
"github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2019-06-01-preview/templatespecs"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-09-01/locks"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)

type Client struct {
DeploymentsClient *resources.DeploymentsClient
GroupsClient *resources.GroupsClient
LocksClient *locks.ManagementLocksClient
ProvidersClient *providers.ProvidersClient
ResourcesClient *resources.Client
DeploymentsClient *resources.DeploymentsClient
GroupsClient *resources.GroupsClient
LocksClient *locks.ManagementLocksClient
ProvidersClient *providers.ProvidersClient
ResourcesClient *resources.Client
TemplateSpecsVersionsClient *templatespecs.VersionsClient
}

func NewClient(o *common.ClientOptions) *Client {
Expand All @@ -32,11 +34,15 @@ func NewClient(o *common.ClientOptions) *Client {
resourcesClient := resources.NewClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&resourcesClient.Client, o.ResourceManagerAuthorizer)

templatespecsVersionsClient := templatespecs.NewVersionsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&templatespecsVersionsClient.Client, o.ResourceManagerAuthorizer)

return &Client{
GroupsClient: &groupsClient,
DeploymentsClient: &deploymentsClient,
LocksClient: &locksClient,
ProvidersClient: &providersClient,
ResourcesClient: &resourcesClient,
GroupsClient: &groupsClient,
DeploymentsClient: &deploymentsClient,
LocksClient: &locksClient,
ProvidersClient: &providersClient,
ResourcesClient: &resourcesClient,
TemplateSpecsVersionsClient: &templatespecsVersionsClient,
}
}
Loading