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_dashboard_grafana #17840

Merged
merged 4 commits into from
Aug 26, 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 @@ -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 @@ -32,6 +32,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 @@ -145,6 +146,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 @@ -260,6 +262,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 @@ -169,6 +171,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