|
| 1 | +--- |
| 2 | +layout: "" |
| 3 | +page_title: dynatrace_declarative_grouping Resource - terraform-provider-dynatrace" |
| 4 | +description: |- |
| 5 | + The resource `dynatrace_declarative_grouping` covers configuration for declarative process grouping |
| 6 | +--- |
| 7 | + |
| 8 | +# dynatrace_declarative_grouping (Resource) |
| 9 | + |
| 10 | +## Dynatrace Documentation |
| 11 | + |
| 12 | +- Declarative process grouping - https://www.dynatrace.com/support/help/shortlink/process-groups#declare |
| 13 | + |
| 14 | +- Settings API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings (schemaId: `builtin:declarativegrouping`) |
| 15 | + |
| 16 | +## Export Example Usage |
| 17 | + |
| 18 | +- `terraform-provider-dynatrace -export dynatrace_declarative_grouping` downloads all existing declarative process grouping configuration |
| 19 | + |
| 20 | +The full documentation of the export feature is available [here](https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/guides/export-v2). |
| 21 | + |
| 22 | +## Resource Example Usage |
| 23 | + |
| 24 | +```terraform |
| 25 | +resource "dynatrace_declarative_grouping" "#name#" { |
| 26 | + name = "#name#" |
| 27 | + enabled = true |
| 28 | + scope = "environment" |
| 29 | + detection { |
| 30 | + process_definition { |
| 31 | + id = "PGIdentifierSample" |
| 32 | + process_group_name = "PGDisplayNameSample" |
| 33 | + report = "always" |
| 34 | + rules { |
| 35 | + rule { |
| 36 | + condition = "$contains(TFExecutableSample)" |
| 37 | + property = "executable" |
| 38 | + } |
| 39 | + rule { |
| 40 | + condition = "$contains(TFCommandSample)" |
| 41 | + property = "commandLine" |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +<!-- schema generated by tfplugindocs --> |
| 50 | +## Schema |
| 51 | + |
| 52 | +### Required |
| 53 | + |
| 54 | +- `detection` (Block List, Min: 1, Max: 1) Enter a descriptive process group display name and a unique identifier that Dynatrace can use to recognize this process group. (see [below for nested schema](#nestedblock--detection)) |
| 55 | +- `enabled` (Boolean) This setting is enabled (`true`) or disabled (`false`) |
| 56 | +- `name` (String) Monitored technology name |
| 57 | + |
| 58 | +### Optional |
| 59 | + |
| 60 | +- `scope` (String) The scope of this setting (HOST, HOST_GROUP). Omit this property if you want to cover the whole environment. |
| 61 | + |
| 62 | +### Read-Only |
| 63 | + |
| 64 | +- `id` (String) The ID of this resource. |
| 65 | + |
| 66 | +<a id="nestedblock--detection"></a> |
| 67 | +### Nested Schema for `detection` |
| 68 | + |
| 69 | +Required: |
| 70 | + |
| 71 | +- `process_definition` (Block List, Min: 1) (see [below for nested schema](#nestedblock--detection--process_definition)) |
| 72 | + |
| 73 | +<a id="nestedblock--detection--process_definition"></a> |
| 74 | +### Nested Schema for `detection.process_definition` |
| 75 | + |
| 76 | +Required: |
| 77 | + |
| 78 | +- `id` (String) Process group identifier |
| 79 | +- `process_group_name` (String) This identifier is used by Dynatrace to recognize this process group. |
| 80 | +- `report` (String) Possible Values: `Never`, `Always`, `HighResourceUsage` |
| 81 | +- `rules` (Block List, Min: 1, Max: 1) Define process detection rules by selecting a process property and a condition. Each process group can have multiple detection rules associated with it. (see [below for nested schema](#nestedblock--detection--process_definition--rules)) |
| 82 | + |
| 83 | +<a id="nestedblock--detection--process_definition--rules"></a> |
| 84 | +### Nested Schema for `detection.process_definition.rules` |
| 85 | + |
| 86 | +Required: |
| 87 | + |
| 88 | +- `rule` (Block List, Min: 1) (see [below for nested schema](#nestedblock--detection--process_definition--rules--rule)) |
| 89 | + |
| 90 | +<a id="nestedblock--detection--process_definition--rules--rule"></a> |
| 91 | +### Nested Schema for `detection.process_definition.rules.rule` |
| 92 | + |
| 93 | +Required: |
| 94 | + |
| 95 | +- `condition` (String) - $contains(svc) – Matches if svc appears anywhere in the process property value. |
| 96 | +- $eq(svc.exe) – Matches if svc.exe matches the process property value exactly. |
| 97 | +- $prefix(svc) – Matches if app matches the prefix of the process property value. |
| 98 | +- $suffix(svc.py) – Matches if svc.py matches the suffix of the process property value. |
| 99 | + |
| 100 | +For example, $suffix(svc.py) would detect processes named loyaltysvc.py and paymentssvc.py. |
| 101 | + |
| 102 | +For more details, see [Declarative process grouping](https://dt-url.net/j142w57). |
| 103 | +- `property` (String) Possible Values: `Executable`, `ExecutablePath`, `CommandLine` |
| 104 | + |
0 commit comments