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_datadog_monitor #16131

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .teamcity/components/generated/services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var services = mapOf(
"dataprotection" to "DataProtection",
"databasemigration" to "Database Migration",
"databoxedge" to "Databox Edge",
"datadog" to "Datadog",
"desktopvirtualization" to "Desktop Virtualization",
"devtestlabs" to "Dev Test",
"digitaltwins" to "Digital Twins",
Expand Down
3 changes: 3 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
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"
datadog "github.com/hashicorp/terraform-provider-azurerm/internal/services/datadog/client"
datafactory "github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/client"
dataprotection "github.com/hashicorp/terraform-provider-azurerm/internal/services/dataprotection/client"
datashare "github.com/hashicorp/terraform-provider-azurerm/internal/services/datashare/client"
Expand Down Expand Up @@ -143,6 +144,7 @@ type Client struct {
DatabaseMigration *datamigration.Client
DataBricks *databricks.Client
DataboxEdge *databoxedge.Client
Datadog *datadog.Client
DataFactory *datafactory.Client
DataProtection *dataprotection.Client
DataShare *datashare.Client
Expand Down Expand Up @@ -254,6 +256,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.DatabaseMigration = datamigration.NewClient(o)
client.DataBricks = databricks.NewClient(o)
client.DataboxEdge = databoxedge.NewClient(o)
client.Datadog = datadog.NewClient(o)
client.DataFactory = datafactory.NewClient(o)
client.DataProtection = dataprotection.NewClient(o)
client.DataShare = datashare.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 @@ -30,6 +30,7 @@ import (
"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"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/datadog"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/dataprotection"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/datashare"
Expand Down Expand Up @@ -159,6 +160,7 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration {
cosmos.Registration{},
customproviders.Registration{},
databricks.Registration{},
datadog.Registration{},
datafactory.Registration{},
databasemigration.Registration{},
databoxedge.Registration{},
Expand Down
19 changes: 19 additions & 0 deletions internal/services/datadog/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/datadog/mgmt/2021-03-01/datadog"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
MonitorsClient *datadog.MonitorsClient
}

func NewClient(o *common.ClientOptions) *Client {
monitorsClient := datadog.NewMonitorsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&monitorsClient.Client, o.ResourceManagerAuthorizer)

return &Client{
MonitorsClient: &monitorsClient,
}
}
Loading