This terraform module is used to create Dynatrace environment specific resources.
By default, services defined in the default_metrics.yaml will be monitored on all the aws connections specified in the input (from the terragrunt repo).
This set of services can be topped up or completely replaced by including/altering relavant sections as specified in the https://github.com/UKHomeOffice/core-cloud-dynatrace-terragrunt documentation.
Management Zones are maintained by the dynatrace_management_zones module in the core-cloud-dynatrace-environment-terraform repo. Zones can be created per-Dynatrace instance by adding a block to the corresponding environment section of the config.yaml file. For example, in order to configure a Management Zone for the "Core Cloud Test" Dynatrace:
corecloud_dynatracetest:
management_zones:
YourZoneName:
rules:
some_rule_name:
type: "ME"
enabled: true
attribute_rule:
entity_type: "AWS_ACCOUNT"
attribute_conditions:
condition:
key: "AWS_ACCOUNT_ID"
operator: "NOT_EQUALS"
string_value: "992382599151"
case_sensitive: true
In the example above, the first entry "YourZoneName" will be used as the literal name for the Zone within the Dynatrace UI. Inside the 'rules' block, descriptive rule names are recommended for readability of the config file (to explain the intended purpose of the underlying rule). The rule name provided (in this case "some_rule_name") will not actually be used/visible in the actual Dynatrace Console Further parameters, such as the type of rule (in this case 'attribute_rule') and the relevant conditions, will map to the possible dropdown/field inputs in the Dynatrace UI.
Similarly to the above attribute_rule example, a dimension rule can be created by setting a "dimension_rule" block inside a rule definition. The dimension-specific parameters are then entered (such as whether it applies to logs, metrics or both) and the conditions (structured similarly to the attribute rule):
corecloud_dynatracetest:
management_zones:
YourZoneName:
rules:
additional_rule:
type: "DIMENSION"
enabled: true
dimension_rule:
applies_to: "METRIC"
dimension_conditions:
condition:
condition_type: "METRIC_KEY"
rule_matcher: "BEGINS_WITH"
value: "cloud.gcp."
Setting any 'Rules' for a Management Zone is entirely optional, but opening a "Rules" block will require at least one contained rule to be created, or else the pipeline will fail.
For information on further options and attributes for the Zone and the Rules (whether 'attribute' or 'dimension') contained therein, please refer to the Dynatrace Documentation and the base Terraform for the v2 resource to clarify required/optional arguments.
Name | Version |
---|---|
dynatrace | ~> 1.0 |
Name | Version |
---|---|
dynatrace | ~> 1.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_connections | A map of AWS Connections to create. The key is the name of the connection. | map(object({ |
{} |
no (Both the the optional_services_top_up and optional_exclusive_services can either be empty or completely omitted.) |
No outputs.