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

New Resource: azurerm_lab_service_plan #19312

Merged
merged 21 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/labeler-pull-request-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ service/key-vault:
service/kusto:
- internal/services/kusto/**/*

service/labservice:
- internal/services/labservice/**/*

service/lighthouse:
- internal/services/lighthouse/**/*

Expand Down
1 change: 1 addition & 0 deletions .teamcity/components/generated/services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var services = mapOf(
"iothub" to "IoT Hub",
"keyvault" to "KeyVault",
"kusto" to "Kusto",
"labservice" to "Lab Service",
"legacy" to "Legacy",
"lighthouse" to "Lighthouse",
"loadbalancer" to "Load Balancer",
Expand Down
3 changes: 3 additions & 0 deletions .teamcity/components/settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ var serviceTestConfigurationOverrides = mapOf(
// IoT Hub Device Update is only available in certain locations
"iothub" to testConfiguration(locationOverride = LocationConfiguration("northeurope", "eastus2", "westus2", false)),

// Lab Service is only available in certain locations
"labservice" to testConfiguration(locationOverride = LocationConfiguration("westeurope", "eastus", "westus", false)),

// Log Analytics Clusters have a max deployments of 2 - parallelism set to 1 or `importTest` fails
"loganalytics" to testConfiguration(parallelism = 1),

Expand Down
3 changes: 3 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import (
timeseriesinsights "github.com/hashicorp/terraform-provider-azurerm/internal/services/iottimeseriesinsights/client"
keyvault "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/client"
kusto "github.com/hashicorp/terraform-provider-azurerm/internal/services/kusto/client"
labservice "github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice/client"
legacy "github.com/hashicorp/terraform-provider-azurerm/internal/services/legacy/client"
lighthouse "github.com/hashicorp/terraform-provider-azurerm/internal/services/lighthouse/client"
loadbalancers "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer/client"
Expand Down Expand Up @@ -184,6 +185,7 @@ type Client struct {
IoTTimeSeriesInsights *timeseriesinsights.Client
KeyVault *keyvault.Client
Kusto *kusto.Client
LabService *labservice.Client
Legacy *legacy.Client
Lighthouse *lighthouse.Client
LoadBalancers *loadbalancers.Client
Expand Down Expand Up @@ -304,6 +306,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.IoTTimeSeriesInsights = timeseriesinsights.NewClient(o)
client.KeyVault = keyvault.NewClient(o)
client.Kusto = kusto.NewClient(o)
client.LabService = labservice.NewClient(o)
client.Legacy = legacy.NewClient(o)
client.Lighthouse = lighthouse.NewClient(o)
client.LogAnalytics = loganalytics.NewClient(o)
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/iottimeseriesinsights"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/kusto"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/labservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/legacy"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/lighthouse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer"
Expand Down Expand Up @@ -138,6 +139,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
iothub.Registration{},
iotcentral.Registration{},
keyvault.Registration{},
labservice.Registration{},
loadbalancer.Registration{},
loganalytics.Registration{},
monitor.Registration{},
Expand Down
19 changes: 19 additions & 0 deletions internal/services/labservice/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package client

import (
"github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
LabPlanClient *labplan.LabPlanClient
}

func NewClient(o *common.ClientOptions) *Client {
LabPlanClient := labplan.NewLabPlanClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&LabPlanClient.Client, o.ResourceManagerAuthorizer)

return &Client{
LabPlanClient: &LabPlanClient,
}
}
Loading