Skip to content

Commit 2d7f2aa

Browse files
generated documentation prior to 1.15.0 release
1 parent a62244e commit 2d7f2aa

22 files changed

+462
-55
lines changed

docs/data-sources/application.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ resource "dynatrace_application_detection_rule" "#name#" {
3737

3838
- `name` (String)
3939

40-
### Optional
41-
42-
- `tags` (Set of String) Required tags of the application to find
43-
4440
### Read-Only
4541

4642
- `id` (String) The ID of this resource.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dynatrace_calculated_service_metric Data Source - terraform-provider-dynatrace"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# dynatrace_calculated_service_metric (Data Source)
10+
11+
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `name` (String)
21+
22+
### Read-Only
23+
24+
- `id` (String) The ID of this resource.
25+
26+

docs/data-sources/management_zone.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ resource "dynatrace_calculated_service_metric" "#name#" {
5252

5353
### Read-Only
5454

55-
- `id` (String) The ID of this resource.
55+
- `id` (String) The ID of this resource.
56+
- `settings_20_id` (String)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dynatrace_request_attribute Data Source - terraform-provider-dynatrace"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# dynatrace_request_attribute (Data Source)
10+
11+
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `name` (String)
21+
22+
### Read-Only
23+
24+
- `id` (String) The ID of this resource.
25+
26+

docs/data-sources/synthetic_location.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ resource "dynatrace_http_monitor" "#name#" {
6363
- `cloud_platform` (String) The cloud provider where the location is hosted.
6464

6565
Only applicable to `PUBLIC` locations
66-
- `id` (String) The unique ID of the location
66+
- `entity_id` (String) The unique ID of the location
6767
- `ips` (List of String) The list of IP addresses assigned to the location.
6868

6969
Only applicable to `PUBLIC` locations
@@ -74,4 +74,8 @@ resource "dynatrace_http_monitor" "#name#" {
7474
* `ENABLED`: The location is displayed as active in the UI. You can assign monitors to the location.
7575
* `DISABLED`: The location is displayed as inactive in the UI. You can't assign monitors to the location. Monitors already assigned to the location will stay there and will be executed from the location.
7676
* `HIDDEN`: The location is not displayed in the UI. You can't assign monitors to the location. You can only set location as `HIDDEN` when no monitor is assigned to it
77-
- `type` (String) The type of the location. Supported values are `PUBLIC`, `PRIVATE` and `CLUSTER`
77+
- `type` (String) The type of the location. Supported values are `PUBLIC`, `PRIVATE` and `CLUSTER`
78+
79+
### Read-Only
80+
81+
- `id` (String) The ID of this resource.

docs/data-sources/synthetic_locations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Optional:
8080
- `cloud_platform` (String) The cloud provider where the location is hosted.
8181

8282
Only applicable to `PUBLIC` locations
83-
- `id` (String) The unique ID of the location
83+
- `entity_id` (String) The unique ID of the location
8484
- `ips` (List of String) The list of IP addresses assigned to the location.
8585

8686
Only applicable to `PUBLIC` locations

docs/guides/export-v1.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: ""
3+
page_title: "Export Utility (Legacy method)"
4+
description: |-
5+
The export utility queries the Dynatrace Environment specified and fetches all currently supported configuration
6+
---
7+
8+
## Export Utility (Legacy method)
9+
10+
### Command Line Syntax
11+
Invoking the export functionality requires
12+
* The environment variable `DYNATRACE_ENV_URL` as the URL of your Dynatrace environment
13+
* The environment variable `DYNATRACE_API_TOKEN` as the API Token of your Dynatrace environment
14+
* Optionally the environment variable `DYNATRACE_TARGET_FOLDER`. If it's not set, the output folder `./configuration` is assumed
15+
16+
Windows: `terraform-provider-dynatrace.exe exportv1 *[<resourcename>[=<id>]]`
17+
18+
Linux: `./terraform-provider-dynatrace exportv1 *[<resourcename>[=<id>]]`
19+
20+
### Usage Examples
21+
* `./terraform-provider-dynatrace exportv1` downloads all available configuration settings
22+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard` downloads all available dashboards
23+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard dynatrace_slo` downloads all available dashboards and all available SLOs
24+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0` downloads only the dashboard with the id `4f5942d4-3450-40a8-818f-c5faeb3563d0`
25+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5325`
26+
* `./terraform-provider-dynatrace exportv1 dynatrace_slo dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads all available SLOs and only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5

docs/guides/export-v2.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: ""
3+
page_title: "Export Utility"
4+
description: |-
5+
The export utility queries the Dynatrace Environment specified and fetches all currently supported configuration
6+
---
7+
8+
## Export Utility
9+
10+
### Command Line Syntax
11+
Invoking the export functionality requires
12+
* The environment variable `DYNATRACE_ENV_URL` as the URL of your Dynatrace environment
13+
* The environment variable `DYNATRACE_API_TOKEN` as the API Token of your Dynatrace environment
14+
* Optionally the environment variable `DYNATRACE_TARGET_FOLDER`. If it's not set, the output folder `./configuration` is assumed
15+
16+
Windows: `terraform-provider-dynatrace.exe -export [-v] [-ref] [-id] [-migrate] [-exclude] [<resourcename>[=<id>]]`
17+
18+
Linux: `./terraform-provider-dynatrace -export [-v] [-ref] [-id] [-migrate] [-exclude] [<resourcename>[=<id>]]`
19+
### Options
20+
* `-v` Enable verbose logging
21+
* `-ref` Enable resources with data sources and dependencies
22+
* `-id` Enable commented id output in resource files
23+
* `-migrate` Enable output specific to environment migration
24+
- Removes node IDs from private synthetic locations
25+
* `-exclude` Exclude specified resource(s) from export
26+
27+
**NOTE:** Dashboards (because there could be thousands of them) are currently excluded from the export unless the resource is directly specified in the command line arguments.
28+
29+
### Usage Examples
30+
* `./terraform-provider-dynatrace -export` downloads all available configuration settings without data sources and dependency references (export similar to previous version)
31+
* `./terraform-provider-dynatrace -export -ref -id` downloads all available configuration settings with data sources / dependency references and adds commented ids in resource output
32+
* `./terraform-provider-dynatrace -export -ref dynatrace_dashboard dynatrace_web_application` downloads all available dashboards, web applications and resource dependencies with references
33+
* `./terraform-provider-dynatrace -export -ref dynatrace_alerting=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_alerting=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads the alerting profiles with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5325`, includes all resource dependencies with references
34+
* `./terraform-provider-dynatrace -export -ref dynatrace_calculated_service_metric dynatrace_alerting=4f5942d4-3450-40a8-818f-c5faeb3563d0` downloads all available calculated service metrics and also the alerting profile with the id `4f5942d4-3450-40a8-818f-c5faeb3563d0`, includes all resource dependencies with references
35+
* `./terraform-provider-dynatrace -export -ref -exclude dynatrace_calculated_service_metric dynatrace_alerting` download all available configuration settings except `dynatrace_calculated_service_metric` and `dynatrace_alerting`, includes all resource dependencies with references
36+
37+
### Additional Information
38+
* There may be instances where the exported configuration is deprecated and/or is unable to be used for a create/update. In these instances, the files will be moved into `.flawed` of the output folder and the explanation will be available as a commented output in the resource file.
39+
- E.g. A dashboard with no tiles can be created and can be retrieved via the export, but the subsequent `terraform apply` would fail without any tiles.
40+
* There are instances where the returned configuration does not contain all of the required information to run an `terraform apply` due to sensitive data or instances where the files require additional attention. The files that apply to this scenario will be automatically moved to `.requires_attention`, the explanation will be available as a commented output in the resource file.
41+
- E.g. `dynatrace_credentials` confidential strings are not available via the API.

docs/index.md

Lines changed: 72 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
layout: ""
33
page_title: "Provider: Dynatrace"
44
description: |-
5-
The Dynatrace Terraform Provider provides resources to interact with the Dynatrace Config REST API.
5+
The Dynatrace Terraform Provider provides resources to interact with the Dynatrace REST API.
66
---
77

88
# Dynatrace Terraform Provider
99

10-
The Dynatrace Terraform Provider is used to interact with the resources supported by the Dynatrace Config REST API. The provider needs to be configured with the proper credentials before it can be used.
10+
The Dynatrace Terraform Provider is used to interact with the resources supported by the Dynatrace REST API. The provider needs to be configured with the proper credentials before it can be used.
1111

12-
Use the links to the left to learn about the available resources.
12+
Use the links to the left to learn about the available resources and data sources.
1313

1414
## Example
1515

@@ -18,7 +18,7 @@ Use the links to the left to learn about the available resources.
1818
terraform {
1919
required_providers {
2020
dynatrace = {
21-
version = "1.14.1"
21+
version = "1.15.0"
2222
source = "dynatrace-oss/dynatrace"
2323
}
2424
}
@@ -31,32 +31,78 @@ provider "dynatrace" {
3131
dt_api_token = "################"
3232
}
3333
```
34-
where `dt_env_url` represents the URL of your Dynatrace Environment and `dt_api_token` needs to be an API Token with the permissions `Read configuration` and `Capture request data`.
34+
where `dt_env_url` represents the URL of your Dynatrace Environment and `dt_api_token` needs to be an API Token with the following permissions:
35+
* `Read configuration`
36+
* `Capture request data`
37+
* `Read SLO`
38+
* `Read settings`
39+
* `Read synthetic monitors, locations, and nodes`
3540

3641
## Exporting existing configuration from a Dynatrace Environment
37-
In addition to acting as a Terraform Provider Plugin the executable `terraform-provider-dynatrace` (`terraform-provider-dynatrace.exe` on Windows) can also get directly invoked.
38-
The utility then reaches out to the Dynatrace Environment specified by the command line arguments and fetches all currently supported configuration items. These results will then automatically get transformed into HCL (the configuration language to be used for `.tf` files) and places each configuration item into its own `.tf` file).
42+
In addition to acting as a Terraform Provider Plugin, the executable `terraform-provider-dynatrace` (`terraform-provider-dynatrace.exe` on Windows) can be directly invoked.
43+
The utility reaches out to the Dynatrace Environment specified by the command line arguments and fetches all currently supported configuration items. These results will then automatically get transformed into HCL (the configuration language to be used for `.tf` files) and places each configuration item into its own `.tf` file.
44+
45+
With release 1.15.0, a new and improved version of the export utility is now available with various improvements (outlined below).
46+
* Data source references automatically generated in resources
47+
* Data source blocks created for dependencies in data_source.tf file(s)
48+
* Creation of all resources required based off of dependencies
49+
* Resources organized in modules with preconfigured main.tf based on output
50+
* Pre-populated providers.tf file in the parent folder and all modules
51+
* Option to include ID as a commented line in generated resources
52+
* Option to include/exclude specific resource IDs from export
53+
* Ability to convert from HCL to JSON formatted files
54+
55+
Please provide any feedback of the export utility via [GitHub Issues](https://github.com/dynatrace-oss/terraform-provider-dynatrace/issues). Details on the execution of the export utility is provided below.
56+
3957
### Command Line Syntax
4058
Invoking the export functionality requires
41-
* The environment varibale `DYNATRACE_ENV_URL` as the URL of your Dynatrace Environment
42-
* The environment variable `DYNATRACE_API_TOKEN` as the API Token with the following permissions:
43-
- `Read configuration`
44-
- `Capture request data`
45-
- `Read SLO`
46-
- `Read settings`
47-
- `Read synthetic monitors, locations, and nodes`
48-
* Optinonally the environment variable `DYNATRACE_TARGET_FOLDER`. If it's not set, the output folder `./configuration` is assumed
49-
#### Windows
50-
`terraform-provider-dynatrace.exe export *[<resourcename>[=<id>]]`
51-
#### Linux
52-
`./terraform-provider-dynatrace export *[<resourcename>[=<id>]]`
53-
#### Usage Examples
54-
* `./terraform-provider-dynatrace export` downloads all available configuration settings
55-
* `./terraform-provider-dynatrace export dynatrace_dashboard` downloads all available dashboards
56-
* `./terraform-provider-dynatrace export dynatrace_dashboard dynatrace_slo` downloads all available dashboards and all available SLOs
57-
* `./terraform-provider-dynatrace export dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0` downloads only the dashboard with the id `4f5942d4-3450-40a8-818f-c5faeb3563d0`
58-
* `./terraform-provider-dynatrace export dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5325`
59-
* `./terraform-provider-dynatrace export dynatrace_slo dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads all available SLOs and only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5
59+
* The environment variable `DYNATRACE_ENV_URL` as the URL of your Dynatrace environment
60+
* The environment variable `DYNATRACE_API_TOKEN` as the API Token of your Dynatrace environment
61+
* Optionally the environment variable `DYNATRACE_TARGET_FOLDER`. If it's not set, the output folder `./configuration` is assumed
62+
63+
## Export Utility
64+
Windows: `terraform-provider-dynatrace.exe -exportv2 [-v] [-ref] [-id] [-migrate] [-exclude] [<resourcename>[=<id>]]`
65+
66+
Linux: `./terraform-provider-dynatrace -exportv2 [-v] [-ref] [-id] [-migrate] [-exclude] [<resourcename>[=<id>]]`
67+
### Options
68+
* `-v` Enable verbose logging
69+
* `-ref` Enable resources with data sources and dependencies
70+
* `-id` Enable commented id output in resource files
71+
* `-migrate` Enable output specific to environment migration
72+
- Removes node IDs from private synthetic locations
73+
* `-exclude` Exclude specified resource(s) from export
74+
75+
**NOTE:** Dashboards (because there could be thousands of them) are currently excluded from the export unless the resource is directly specified in the command line arguments.
76+
77+
### Usage Examples
78+
* `./terraform-provider-dynatrace -export` downloads all available configuration settings without data sources and dependency references (export similar to previous version)
79+
* `./terraform-provider-dynatrace -export -ref -id` downloads all available configuration settings with data sources / dependency references and adds commented ids in resource output
80+
* `./terraform-provider-dynatrace -export -ref dynatrace_dashboard dynatrace_web_application` downloads all available dashboards, web applications and resource dependencies with references
81+
* `./terraform-provider-dynatrace -export -ref dynatrace_alerting=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_alerting=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads the alerting profiles with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5325`, includes all resource dependencies with references
82+
* `./terraform-provider-dynatrace -export -ref dynatrace_calculated_service_metric dynatrace_alerting=4f5942d4-3450-40a8-818f-c5faeb3563d0` downloads all available calculated service metrics and also the alerting profile with the id `4f5942d4-3450-40a8-818f-c5faeb3563d0`, includes all resource dependencies with references
83+
* `./terraform-provider-dynatrace -export -ref -exclude dynatrace_calculated_service_metric dynatrace_alerting` download all available configuration settings except `dynatrace_calculated_service_metric` and `dynatrace_alerting`, includes all resource dependencies with references
84+
85+
### Additional Information
86+
* There may be instances where the exported configuration is deprecated and/or is unable to be used for a create/update. In these instances, the files will be moved into `.flawed` of the output folder and the explanation will be available as a commented output in the resource file.
87+
- E.g. A dashboard with no tiles can be created and can be retrieved via the export, but the subsequent `terraform apply` would fail without any tiles.
88+
* There are instances where the returned configuration does not contain all of the required information to run an `terraform apply` due to sensitive data or instances where the files require additional attention. The files that apply to this scenario will be automatically moved to `.requires_attention`, the explanation will be available as a commented output in the resource file.
89+
- E.g. `dynatrace_credentials` confidential strings are not available via the API.
90+
91+
### Known Issues
92+
* Due to the complexity of dashboards, there may be cases where the `terraform apply` fails after an export. Dashboard validation will be improved in a future release.
93+
94+
## Export Utility (Legacy method)
95+
Windows: `terraform-provider-dynatrace.exe export *[<resourcename>[=<id>]]`
96+
97+
Linux: `./terraform-provider-dynatrace export *[<resourcename>[=<id>]]`
98+
99+
### Usage Examples
100+
* `./terraform-provider-dynatrace exportv1` downloads all available configuration settings
101+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard` downloads all available dashboards
102+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard dynatrace_slo` downloads all available dashboards and all available SLOs
103+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0` downloads only the dashboard with the id `4f5942d4-3450-40a8-818f-c5faeb3563d0`
104+
* `./terraform-provider-dynatrace exportv1 dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5325`
105+
* `./terraform-provider-dynatrace exportv1 dynatrace_slo dynatrace_dashboard=4f5942d4-3450-40a8-818f-c5faeb3563d0 dynatrace_dashboard=9c4b75f1-9a64-4b44-a8e4-149154fd5325` downloads all available SLOs and only the dashboards with the ids `4f5942d4-3450-40a8-818f-c5faeb3563d0` and `9c4b75f1-9a64-4b44-a8e4-149154fd5
60106

61107
<!-- schema generated by tfplugindocs -->
62108
## Schema

docs/resources/browser_monitor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "dynatrace_browser_monitor" "#name#" {
2626
name = "#name#"
2727
frequency = 15
2828
locations = ["GEOLOCATION-B4B9167CAAA88F6A","GEOLOCATION-03E96F97A389F96A"]
29-
manually_assigned_apps = ["APPLICATION-62B3F4F16786DE50"]
29+
manually_assigned_apps = ["APPLICATION-EA7C4B59F27D43EB"]
3030
anomaly_detection {
3131
loading_time_thresholds {
3232
enabled = true

0 commit comments

Comments
 (0)