Skip to content

Commit

Permalink
New Resource: azurerm_lab_service_plan (hashicorp#19312)
Browse files Browse the repository at this point in the history
* New Resource: azurerm_lab_service_lab_plan

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update code

* update tc

* update code

* update code

* update code
  • Loading branch information
neil-yechenwei authored and favoretti committed Jan 12, 2023
1 parent 640e2aa commit bdf0584
Show file tree
Hide file tree
Showing 38 changed files with 2,519 additions and 0 deletions.
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 @@ -87,6 +87,9 @@ var serviceTestConfigurationOverrides = mapOf(
// IoT Hub Device Update is only available in certain locations
"iothub" to testConfiguration(locationOverride = LocationConfiguration("northeurope", "eastus2", "westus2", false), useDevTestSubscription = true),

// 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, useDevTestSubscription = true),

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

0 comments on commit bdf0584

Please sign in to comment.