Skip to content

Commit

Permalink
New Resource: azurerm_dashboard_grafana (#17840)
Browse files Browse the repository at this point in the history
New Resource: `azurerm_dashboard_grafana` (#17840)
  • Loading branch information
ms-zhenhua authored Aug 26, 2022
1 parent dce4255 commit ae65d41
Show file tree
Hide file tree
Showing 34 changed files with 2,168 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 @@ -74,6 +74,9 @@ service/cost-management:
service/custom-resource-provider:
- internal/services/customproviders/**/*

service/dashboard:
- internal/services/dashboard/**/*

service/data-factory:
- internal/services/datafactory/**/*

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 @@ -28,6 +28,7 @@ var services = mapOf(
"costmanagement" to "Cost Management",
"customproviders" to "Custom Providers",
"dns" to "DNS",
"dashboard" to "Dashboard",
"datafactory" to "Data Factory",
"datashare" to "Data Share",
"databricks" to "DataBricks",
Expand Down
3 changes: 3 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
cosmosdb "github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos/client"
costmanagement "github.com/hashicorp/terraform-provider-azurerm/internal/services/costmanagement/client"
customproviders "github.com/hashicorp/terraform-provider-azurerm/internal/services/customproviders/client"
dashboard "github.com/hashicorp/terraform-provider-azurerm/internal/services/dashboard/client"
datamigration "github.com/hashicorp/terraform-provider-azurerm/internal/services/databasemigration/client"
databoxedge "github.com/hashicorp/terraform-provider-azurerm/internal/services/databoxedge/client"
databricks "github.com/hashicorp/terraform-provider-azurerm/internal/services/databricks/client"
Expand Down Expand Up @@ -146,6 +147,7 @@ type Client struct {
Cosmos *cosmosdb.Client
CostManagement *costmanagement.Client
CustomProviders *customproviders.Client
Dashboard *dashboard.Client
DatabaseMigration *datamigration.Client
DataBricks *databricks.Client
DataboxEdge *databoxedge.Client
Expand Down Expand Up @@ -261,6 +263,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.Cosmos = cosmosdb.NewClient(o)
client.CostManagement = costmanagement.NewClient(o)
client.CustomProviders = customproviders.NewClient(o)
client.Dashboard = dashboard.NewClient(o)
client.DatabaseMigration = datamigration.NewClient(o)
client.DataBricks = databricks.NewClient(o)
client.DataboxEdge = databoxedge.NewClient(o)
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/cosmos"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/costmanagement"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/customproviders"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/dashboard"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/databasemigration"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/databoxedge"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/databricks"
Expand Down Expand Up @@ -123,6 +124,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
consumption.Registration{},
containers.Registration{},
costmanagement.Registration{},
dashboard.Registration{},
disks.Registration{},
domainservices.Registration{},
eventhub.Registration{},
Expand Down Expand Up @@ -170,6 +172,7 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration {
consumption.Registration{},
cosmos.Registration{},
customproviders.Registration{},
dashboard.Registration{},
databricks.Registration{},
datadog.Registration{},
datafactory.Registration{},
Expand Down
20 changes: 20 additions & 0 deletions internal/services/dashboard/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package client

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

type Client struct {
GrafanaResourceClient *grafanaresource.GrafanaResourceClient
}

func NewClient(o *common.ClientOptions) *Client {

grafanaResourceClient := grafanaresource.NewGrafanaResourceClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&grafanaResourceClient.Client, o.ResourceManagerAuthorizer)

return &Client{
GrafanaResourceClient: &grafanaResourceClient,
}
}
Loading

0 comments on commit ae65d41

Please sign in to comment.