Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//go:build integration

/*
* @license
* Copyright 2026 Dynatrace LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package pipelinegroups_test

import (
"testing"

"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/testing/api"
)

func TestAccBizeventPipelineGroups(t *testing.T) {
api.TestAcc(t)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
resource "dynatrace_openpipeline_v2_bizevents_pipelines" "example1" {
display_name = "#name#"
custom_id = "example-1#name#"
group_role = "compositionPipeline"
routing = "notRoutable"
processing {
processors {
processor {
type = "drop"
id = "processor_Drop_unnecessary_records_3802"
description = "Drop unnecessary records"
matcher = "not matchesPhrase(record.name, \"Warning\")"
enabled = true
}
processor {
type = "fieldsAdd"
id = "processor_Add_warning_flag_5434"
description = "Add warning flag"
matcher = "matchesPhrase(record.name, \"Warning\")"
sample_data = "{\n \"record.name\": \"Warning record\" \n}"
fields_add {
fields {
field {
name = "is_warning"
value = "true"
}
}
}
enabled = true
}
processor {
type = "fieldsRemove"
id = "processor_Remove_details_field_8539"
description = "Remove details field"
sample_data = "{\n \"record.name\": \"Warning\",\n \"record.details\": \"some record details\"\n}"
matcher = "isNotNull(record.details)"
fields_remove {
fields = ["record.details"]
}
enabled = true
}
processor {
type = "fieldsRename"
id = "processor_Rename_name_to_title_8530"
description = "Rename name to title"
sample_data = "{\n \"record.name\": \"Warning\"\n}"
matcher = "true"
fields_rename {
fields {
field {
from_name = "record.name"
to_name = "record.title"
}
}
}
enabled = true
}
processor {
type = "dql"
id = "processor_Combine_title_and_summary_to_name_8808"
description = "Combine title and summary to name"
sample_data = "{\n \"record.title\": \"Warning\",\n \"record.summary\": \"Request failed\"\n}"
matcher = "true"
dql {
script = "fieldsAdd record.name = concat(record.title, \" - \", record.summary)"
}
enabled = true
}
}
}
metric_extraction {
processors {
processor {
type = "counterMetric"
id = "processor_Count_warning_events_6392"
description = "Count warnings"
matcher = "true"
counter_metric {
metric_key = "warning.count"
dimensions {
dimension {
source_field_name = "dt.cost.costcenter"
}
dimension {
source_field_name = "dt.cost.product"
}
dimension {
source_field_name = "dt.security_context"
}
dimension {
source_field_name = "record.category"
destination_field_name = "warning_category"
}
}
}
enabled = true
}
processor {
type = "valueMetric"
id = "processor_Warning_timeout_1990"
description = "Warning timeout"
matcher = "true"
value_metric {
metric_key = "warning.timeout"
field = "recording.timeout_in_min"
default_value = 60
dimensions {
dimension {
source_field_name = "dt.cost.costcenter"
}
dimension {
source_field_name = "dt.cost.product"
}
dimension {
source_field_name = "dt.security_context"
}
dimension {
source_field_name = "record.category"
destination_field_name = "warning_category"
}
}
}
enabled = true
}
}
}
}


resource "dynatrace_openpipeline_v2_bizevents_pipelines" "example2" {
display_name = "#name#-2"
custom_id = "example-2#name#"
group_role = "memberPipeline"
}

resource "dynatrace_openpipeline_v2_bizevents_pipelinegroups" "example" {
display_name = "#name#"
composition {
pipeline_group_composition {
is_pipeline_placeholder = true
}
pipeline_group_composition {
is_pipeline_placeholder = false
stages {
type = "include"
include = ["processing", "metricExtraction"]
}
pipeline_id = dynatrace_openpipeline_v2_bizevents_pipelines.example1.id
}
}
member_stages {
include = ["processing", "metricExtraction"]
type = "include"
}
member_pipelines = [dynatrace_openpipeline_v2_bizevents_pipelines.example2.id]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//go:build integration

/*
* @license
* Copyright 2026 Dynatrace LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package pipelinegroups_test

import (
"testing"

"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/testing/api"
)

func TestAccDavisEventsPipelineGroups(t *testing.T) {
api.TestAcc(t)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
resource "dynatrace_openpipeline_v2_davis_events_pipelines" "example1" {
display_name = "#name#"
custom_id = "#name#"
group_role = "compositionPipeline"
routing = "notRoutable"
processing {
processors {
processor {
type = "drop"
id = "processor_Drop_unnecessary_records_3802"
description = "Drop unnecessary records"
matcher = "not matchesPhrase(record.name, \"Warning\")"
enabled = true
}
processor {
type = "fieldsAdd"
id = "processor_Add_warning_flag_5434"
description = "Add warning flag"
matcher = "matchesPhrase(record.name, \"Warning\")"
sample_data = "{\n \"record.name\": \"Warning record\" \n}"
fields_add {
fields {
field {
name = "is_warning"
value = "true"
}
}
}
enabled = true
}
processor {
type = "fieldsRemove"
id = "processor_Remove_details_field_8539"
description = "Remove details field"
sample_data = "{\n \"record.name\": \"Warning\",\n \"record.details\": \"some record details\"\n}"
matcher = "isNotNull(record.details)"
fields_remove {
fields = ["record.details"]
}
enabled = true
}
processor {
type = "fieldsRename"
id = "processor_Rename_name_to_title_8530"
description = "Rename name to title"
sample_data = "{\n \"record.name\": \"Warning\"\n}"
matcher = "true"
fields_rename {
fields {
field {
from_name = "record.name"
to_name = "record.title"
}
}
}
enabled = true
}
processor {
type = "dql"
id = "processor_Combine_title_and_summary_to_name_8808"
description = "Combine title and summary to name"
sample_data = "{\n \"record.title\": \"Warning\",\n \"record.summary\": \"Request failed\"\n}"
matcher = "true"
dql {
script = "fieldsAdd record.name = concat(record.title, \" - \", record.summary)"
}
enabled = true
}
}
}
security_context {
processors {
processor {
type = "securityContext"
id = "processor_Use_dt.security_context_if_set_1080"
description = "Use dt.security_context if set"
matcher = "isNotNull(dt.security_context)"
security_context {
value {
type = "field"
field {
source_field_name = "dt.security_context"
}
}
}
enabled = true
}
processor {
type = "securityContext"
id = "processor_Assign_warnings_to_ACME_teams_if_no_context_set_5465"
description = "Assign warnings to ACME teams if no context set"
matcher = "isNull(dt.security_context)"
security_context {
value {
type = "multiValueConstant"
multi_value_constant = ["ACME1", "ACME2"]
}
}
enabled = true
}
}
}
}


resource "dynatrace_openpipeline_v2_davis_events_pipelines" "example2" {
display_name = "#name#-2"
custom_id = "#name#-2"
group_role = "memberPipeline"
}

resource "dynatrace_openpipeline_v2_davis_events_pipelinegroups" "example" {
display_name = "#name#"
composition {
pipeline_group_composition {
is_pipeline_placeholder = true
}
pipeline_group_composition {
is_pipeline_placeholder = false
stages {
type = "include"
include = ["processing", "securityContext"]
}
pipeline_id = dynatrace_openpipeline_v2_davis_events_pipelines.example1.id
}
}
member_stages {
include = ["processing", "securityContext"]
type = "include"
}
member_pipelines = [dynatrace_openpipeline_v2_davis_events_pipelines.example2.id]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//go:build integration

/*
* @license
* Copyright 2026 Dynatrace LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package pipelinegroups_test

import (
"testing"

"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/testing/api"
)

func TestAccDavisProblemsPipelineGroups(t *testing.T) {
api.TestAcc(t)
}
Loading
Loading