Skip to content

Commit 4a24c2d

Browse files
authored
feat: prettier in READMEs (cloudposse/terraform-aws-components#998)
1 parent 57c6212 commit 4a24c2d

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

src/CHANGELOG.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
### API Schema accepted
44

5-
Test can now be defined using the Datadog API schema, meaning that the test definition
6-
returned by
5+
Test can now be defined using the Datadog API schema, meaning that the test definition returned by
6+
77
- `https://api.datadoghq.com/api/v1/synthetics/tests/api/{public_id}`
88
- `https://api.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}`
99

1010
can be directly used a map value (you still need to supply a key, though).
1111

12-
You can mix tests using the API schema with tests using the old Terraform schema.
13-
You could probably get away with mixing them in the same test, but it is not recommended.
12+
You can mix tests using the API schema with tests using the old Terraform schema. You could probably get away with
13+
mixing them in the same test, but it is not recommended.
1414

1515
### Default locations
1616

17-
Previously, the default locations for Synthetics tests were "all" public locations.
18-
Now the default is no locations, in favor of locations being specified in each test configuration,
19-
which is more flexible. Also, since the tests are expensive, it is better to err on the side of
20-
too few test locations than too many.
17+
Previously, the default locations for Synthetics tests were "all" public locations. Now the default is no locations, in
18+
favor of locations being specified in each test configuration, which is more flexible. Also, since the tests are
19+
expensive, it is better to err on the side of too few test locations than too many.

src/README.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Component: `datadog-synthetics`
22

3-
This component provides the ability to implement [Datadog synthetic tests](https://docs.datadoghq.com/synthetics/guide/).
3+
This component provides the ability to implement
4+
[Datadog synthetic tests](https://docs.datadoghq.com/synthetics/guide/).
45

5-
Synthetic tests allow you to observe how your systems and applications are performing using simulated requests and actions
6-
from the AWS managed locations around the globe, and to monitor internal endpoints
7-
from [Private Locations](https://docs.datadoghq.com/synthetics/private_locations).
6+
Synthetic tests allow you to observe how your systems and applications are performing using simulated requests and
7+
actions from the AWS managed locations around the globe, and to monitor internal endpoints from
8+
[Private Locations](https://docs.datadoghq.com/synthetics/private_locations).
89

910
## Usage
1011

@@ -39,13 +40,14 @@ components:
3940
4041
Below are examples of Datadog browser and API synthetic tests.
4142
42-
The synthetic tests are defined in YAML using either the [Datadog Terraform provider](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/synthetics_test) schema
43-
or the [Datadog Synthetics API](https://docs.datadoghq.com/api/latest/synthetics) schema.
44-
See the `terraform-datadog-platform` Terraform module [README](https://github.com/cloudposse/terraform-datadog-platform/blob/main/modules/synthetics/README.md) for more details.
45-
We recommend using the API schema so you can more create and edit tests using the Datadog
46-
web API and then import them into this module by downloading the test using
47-
the Datadog REST API. (See the Datadog API documentation for the appropriate
48-
`curl` commands to use.)
43+
The synthetic tests are defined in YAML using either the
44+
[Datadog Terraform provider](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/synthetics_test)
45+
schema or the [Datadog Synthetics API](https://docs.datadoghq.com/api/latest/synthetics) schema. See the
46+
`terraform-datadog-platform` Terraform module
47+
[README](https://github.com/cloudposse/terraform-datadog-platform/blob/main/modules/synthetics/README.md) for more
48+
details. We recommend using the API schema so you can more create and edit tests using the Datadog web API and then
49+
import them into this module by downloading the test using the Datadog REST API. (See the Datadog API documentation for
50+
the appropriate `curl` commands to use.)
4951

5052
```yaml
5153
# API schema
@@ -124,24 +126,31 @@ my-api-test:
124126
jsonpath: foo.bar
125127
```
126128

127-
These configuration examples are defined in the YAML files in the [catalog/synthetics/examples](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/datadog-synthetics/catalog/synthetics/examples) folder.
129+
These configuration examples are defined in the YAML files in the
130+
[catalog/synthetics/examples](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/datadog-synthetics/catalog/synthetics/examples)
131+
folder.
128132

129-
You can use different subfolders for your use-case.
130-
For example, you can have `dev` and `prod` subfolders to define different synthetic tests for the `dev` and `prod` environments.
133+
You can use different subfolders for your use-case. For example, you can have `dev` and `prod` subfolders to define
134+
different synthetic tests for the `dev` and `prod` environments.
131135

132136
Then use the `synthetic_paths` variable to point the component to the synthetic test configuration files.
133137

134138
The configuration files are processed and transformed in the following order:
135139

136-
- The `datadog-synthetics` component loads the YAML configuration files from the filesystem paths specified by the `synthetics_paths` variable
140+
- The `datadog-synthetics` component loads the YAML configuration files from the filesystem paths specified by the
141+
`synthetics_paths` variable
137142

138-
- Then, in the [synthetics](https://github.com/cloudposse/terraform-datadog-platform/blob/master/modules/synthetics/main.tf) module,
139-
the YAML configuration files are merged and transformed from YAML into
140-
the [Datadog Terraform provider](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/synthetics_test) schema
143+
- Then, in the
144+
[synthetics](https://github.com/cloudposse/terraform-datadog-platform/blob/master/modules/synthetics/main.tf) module,
145+
the YAML configuration files are merged and transformed from YAML into the
146+
[Datadog Terraform provider](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/synthetics_test)
147+
schema
141148

142149
- And finally, the Datadog Terraform provider uses the
143-
[Datadog Synthetics API](https://docs.datadoghq.com/api/latest/synthetics) specifications to call the Datadog API and provision the synthetic tests
150+
[Datadog Synthetics API](https://docs.datadoghq.com/api/latest/synthetics) specifications to call the Datadog API and
151+
provision the synthetic tests
144152

153+
<!-- prettier-ignore-start -->
145154
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
146155
## Requirements
147156

@@ -214,6 +223,7 @@ No resources.
214223
| <a name="output_datadog_synthetics_test_monitor_ids"></a> [datadog\_synthetics\_test\_monitor\_ids](#output\_datadog\_synthetics\_test\_monitor\_ids) | IDs of the monitors associated with the Datadog synthetics tests |
215224
| <a name="output_datadog_synthetics_test_names"></a> [datadog\_synthetics\_test\_names](#output\_datadog\_synthetics\_test\_names) | Names of the created Datadog synthetic tests |
216225
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
226+
<!-- prettier-ignore-end -->
217227

218228
## References
219229

0 commit comments

Comments
 (0)