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_dynatrace_monitor #27432

Merged
merged 35 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1635a79
New resources: azurerm_dynatrace_monitors, azurerm_dynatrace_tag_rules
jiaweitao001 Sep 13, 2022
66c631f
Adding documentation
jiaweitao001 Sep 14, 2022
1c6897a
Add subcategory
jiaweitao001 Sep 14, 2022
aa1919a
Renaming parameters
jiaweitao001 Sep 16, 2022
e29c604
change variable names
jiaweitao001 Oct 8, 2022
bc52244
Fix acc tests
jiaweitao001 Oct 21, 2022
c5455db
Renaming variables
jiaweitao001 Oct 25, 2022
84f445b
fix schema
jiaweitao001 Nov 2, 2022
8d4567a
fix imports
jiaweitao001 Nov 2, 2022
e9f9e06
retrigger teamcity run
jiaweitao001 Dec 1, 2022
42fa5e5
rebase dynatrace
jiaweitao001 May 22, 2023
fed7c15
Update API
jiaweitao001 Oct 23, 2023
70e0c18
New Resource: azurerm_dynatrace_monitors
jiaweitao001 Nov 7, 2023
9a5a1ab
sort imports
jiaweitao001 Nov 7, 2023
d09c64d
Fix imports
jiaweitao001 Nov 7, 2023
4f1df1a
Fix lint
jiaweitao001 Nov 7, 2023
d4f2622
Fix gencheck
jiaweitao001 Nov 7, 2023
8fc8047
Fix gofmt
jiaweitao001 Nov 7, 2023
d08fce5
Remove redundant condition
jiaweitao001 Nov 7, 2023
ab0f662
Address PR comments
jiaweitao001 Dec 1, 2023
e0d4364
Update docs
jiaweitao001 Dec 4, 2023
2221a67
Update expand/flatten identity helper
jiaweitao001 Dec 4, 2023
dca6838
Add prechecks
jiaweitao001 Dec 6, 2023
fa5a7b4
remove effective date, testing
jiaweitao001 Aug 20, 2024
fabb928
modified tests, replace pointers
jiaweitao001 Sep 19, 2024
ad57c54
modified docs
jiaweitao001 Sep 19, 2024
0fa9382
upgrade vendor
jiaweitao001 Sep 19, 2024
5a9bf21
fix go gen
jiaweitao001 Sep 19, 2024
abce79a
skip tests
jiaweitao001 Sep 19, 2024
1b73d35
inclined some functions, changed docs
jiaweitao001 Oct 24, 2024
c31798c
fix imports
jiaweitao001 Oct 24, 2024
eed639b
update vendors
jiaweitao001 Oct 24, 2024
927c7f4
inlined values, add tracking issue
jiaweitao001 Oct 29, 2024
c076a2d
Format code to follow guidance
jiaweitao001 Nov 7, 2024
05005d6
format acc test
jiaweitao001 Nov 7, 2024
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-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ service/dns:
service/domain-services:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_active_directory_domain_service((.|\n)*)###'

service/dynatrace:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_dynatrace_monitor((.|\n)*)###'

service/elastic:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_elastic_cloud_elasticsearch((.|\n)*)###'

Expand Down
5 changes: 5 additions & 0 deletions .github/labeler-pull-request-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ service/domain-services:
- any-glob-to-any-file:
- internal/services/domainservices/**/*

service/dynatrace:
- changed-files:
- any-glob-to-any-file:
- internal/services/dynatrace/**/*

service/elastic:
- changed-files:
- any-glob-to-any-file:
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 @@ -48,6 +48,7 @@ var services = mapOf(
"devtestlabs" to "Dev Test",
"digitaltwins" to "Digital Twins",
"domainservices" to "DomainServices",
"dynatrace" to "Dynatrace",
"elastic" to "Elastic",
"elasticsan" to "ElasticSan",
"eventgrid" to "EventGrid",
Expand Down
5 changes: 5 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import (
digitaltwins "github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins/client"
dns "github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/client"
domainservices "github.com/hashicorp/terraform-provider-azurerm/internal/services/domainservices/client"
dynatrace "github.com/hashicorp/terraform-provider-azurerm/internal/services/dynatrace/client"
elastic "github.com/hashicorp/terraform-provider-azurerm/internal/services/elastic/client"
elasticsan "github.com/hashicorp/terraform-provider-azurerm/internal/services/elasticsan/client"
eventgrid "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid/client"
Expand Down Expand Up @@ -199,6 +200,7 @@ type Client struct {
DigitalTwins *digitaltwins.Client
Dns *dns_v2018_05_01.Client
DomainServices *domainservices.Client
Dynatrace *dynatrace.Client
Elastic *elastic.Client
ElasticSan *elasticsan.Client
EventGrid *eventgrid_v2022_06_15.Client
Expand Down Expand Up @@ -430,6 +432,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.EventGrid, err = eventgrid.NewClient(o); err != nil {
return fmt.Errorf("building clients for EventGrid: %+v", err)
}
if client.Dynatrace, err = dynatrace.NewClient(o); err != nil {
return fmt.Errorf("building clients for Dynatrace: %+v", err)
}
if client.Eventhub, err = eventhub.NewClient(o); err != nil {
return fmt.Errorf("building clients for Eventhub: %+v", err)
}
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/dns"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/domainservices"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/dynatrace"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/elastic"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/elasticsan"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid"
Expand Down Expand Up @@ -165,6 +166,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
digitaltwins.Registration{},
domainservices.Registration{},
elasticsan.Registration{},
dynatrace.Registration{},
eventhub.Registration{},
extendedlocation.Registration{},
fluidrelay.Registration{},
Expand Down
24 changes: 24 additions & 0 deletions internal/services/dynatrace/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package client

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2023-04-27/monitors"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
*monitors.MonitorsClient
}

func NewClient(o *common.ClientOptions) (*Client, error) {
monitorClient, err := monitors.NewMonitorsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Dynatrace Monitor client: %+v", err)
}
o.Configure(monitorClient.Client, o.Authorizers.ResourceManager)

return &Client{
MonitorsClient: monitorClient,
}, nil
}
Loading
Loading