Skip to content

Commit

Permalink
docs(synthetics): update and clean cert check, broken links, step mon…
Browse files Browse the repository at this point in the history
…itor(s) docs (#2618)
  • Loading branch information
pranav-new-relic authored Mar 26, 2024
1 parent 62eb058 commit eee0fc9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 41 deletions.
36 changes: 21 additions & 15 deletions website/docs/r/synthetics_broken_links_monitor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ Use this resource to create, update, and delete a Synthetics Broken Links monito
## Example Usage

```hcl
resource "newrelic_synthetics_broken_links_monitor" "monitor" {
name = "broken-links-monitor"
uri = "https://www.one.example.com"
locations_public = ["AP_SOUTH_1"]
period = "EVERY_6_HOURS"
status = "ENABLED"
resource "newrelic_synthetics_broken_links_monitor" "foo" {
name = "Sample Broken Links Monitor"
uri = "https://www.one.example.com"
locations_public = ["AP_SOUTH_1"]
period = "EVERY_6_HOURS"
status = "ENABLED"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "some_key"
values = ["some_value"]
Expand All @@ -29,7 +31,7 @@ See additional [examples](#additional-examples).

## Argument Reference

The following are the common arguments supported for `BROKEN LINKS` monitor:
The following are the arguments supported by this resource.

* `account_id`- (Optional) The account in which the Synthetics monitor will be created.
* `name` - (Required) The name for the monitor.
Expand All @@ -40,6 +42,10 @@ The following are the common arguments supported for `BROKEN LINKS` monitor:
* `status` - (Required) The run state of the monitor. (`ENABLED` or `DISABLED`).

-> **WARNING:** As of February 29, 2024, Synthetic Monitors no longer support the `MUTED` status. Version **3.33.0** of the New Relic Terraform Provider is released to coincide with the `MUTED` status end-of-life. Consequently, the only valid values for `status` for all types of Synthetic Monitors are mentioned above. For additional information on alternatives to the `MUTED` status of Synthetic Monitors that can be managed via Terraform, please refer to [this guide](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/upcoming_synthetics_muted_status_eol_guide).
* `runtime_type` - (Optional) The runtime that the monitor will use to run jobs.
* `runtime_type_version` - (Optional) The specific version of the runtime type selected.

-> **NOTE:** Currently, the values of `runtime_type` and `runtime_type_version` supported by this resource are `NODE_API` and `16.10` respectively. In order to run the monitor in the new runtime, both `runtime_type` and `runtime_type_version` need to be specified; however, specifying neither of these attributes would set this monitor to use the legacy runtime. It may also be noted that the runtime opted for would only be effective with private locations. For public locations, all traffic has been shifted to the new runtime, irrespective of the selection made.
* `tag` - (Optional) The tags that will be associated with the monitor. See [Nested tag blocks](#nested-tag-blocks) below for details

### Nested `tag` blocks
Expand All @@ -58,23 +64,23 @@ The below example shows how you can define a private location and attach it to a
-> **NOTE:** It can take up to 10 minutes for a private location to become available.

```hcl
resource "newrelic_synthetics_private_location" "location" {
description = "Test Description"
name = "private_location"
resource "newrelic_synthetics_private_location" "foo" {
name = "Sample Private Location"
description = "Sample Private Location Description"
verified_script_execution = false
}
resource "newrelic_synthetics_broken_links_monitor" "monitor" {
name = "broken-links-monitor"
resource "newrelic_synthetics_broken_links_monitor" "foo" {
name = "Sample Broken Links Monitor"
uri = "https://www.one.example.com"
locations_private = [newrelic_synthetics_private_location.location.id]
locations_private = [newrelic_synthetics_private_location.foo.id]
period = "EVERY_6_HOURS"
status = "ENABLED"
tag {
key = "some_key"
values = ["some_value"]
}
}
```

## Attributes Reference
Expand All @@ -86,7 +92,7 @@ The following attributes are exported:

## Import

Synthetics broken links monitor scripts can be imported using the `guid`, e.g.
A broken links monitor can be imported using its GUID, using the following command.

```bash
$ terraform import newrelic_synthetics_broken_links_monitor.monitor <guid>
Expand Down
34 changes: 21 additions & 13 deletions website/docs/r/synthetics_cert_check_monitor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ Use this resource to create, update, and delete a Synthetics Certificate Check m
## Example Usage

```hcl
resource "newrelic_synthetics_cert_check_monitor" "cert-check-monitor" {
name = "cert-check-monitor"
resource "newrelic_synthetics_cert_check_monitor" "foo" {
name = "Sample Cert Check Monitor"
domain = "www.example.com"
locations_public = ["AP_SOUTH_1"]
certificate_expiration = "10"
period = "EVERY_6_HOURS"
status = "ENABLED"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "some_key"
values = ["some_value"]
Expand All @@ -30,7 +32,7 @@ See additional [examples](#additional-examples).

## Argument Reference

The following are the common arguments supported for `CERTIFICATE CHECK` monitor:
The following are the arguments supported by this resource.

* `account_id` - (Optional) The account in which the Synthetics monitor will be created.
* `name` - (Required) The name for the monitor.
Expand All @@ -43,6 +45,11 @@ The following are the common arguments supported for `CERTIFICATE CHECK` monitor

-> **WARNING:** As of February 29, 2024, Synthetic Monitors no longer support the `MUTED` status. Version **3.33.0** of the New Relic Terraform Provider is released to coincide with the `MUTED` status end-of-life. Consequently, the only valid values for `status` for all types of Synthetic Monitors are mentioned above. For additional information on alternatives to the `MUTED` status of Synthetic Monitors that can be managed via Terraform, please refer to [this guide](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/upcoming_synthetics_muted_status_eol_guide).

* `runtime_type` - (Optional) The runtime that the monitor will use to run jobs.
* `runtime_type_version` - (Optional) The specific version of the runtime type selected.

-> **NOTE:** Currently, the values of `runtime_type` and `runtime_type_version` supported by this resource are `NODE_API` and `16.10` respectively. In order to run the monitor in the new runtime, both `runtime_type` and `runtime_type_version` need to be specified; however, specifying neither of these attributes would set this monitor to use the legacy runtime. It may also be noted that the runtime opted for would only be effective with private locations. For public locations, all traffic has been shifted to the new runtime, irrespective of the selection made.

* `tag` - (Optional) The tags that will be associated with the monitor. See [Nested tag blocks](#nested-tag-blocks) below for details

### Nested `tag` blocks
Expand All @@ -61,18 +68,19 @@ The below example shows how you can define a private location and attach it to a
-> **NOTE:** It can take up to 10 minutes for a private location to become available.

```hcl
resource "newrelic_synthetics_private_location" "location" {
description = "Test Description"
name = "private_location"
resource "newrelic_synthetics_private_location" "foo" {
name = "Sample Private Location"
description = "Sample Private Location Description"
verified_script_execution = false
}
resource "newrelic_synthetics_cert_check_monitor" "monitor" {
name = "cert_check_monitor"
domain = "https://www.one.example.com"
locations_private = [newrelic_synthetics_private_location.location.id]
period = "EVERY_6_HOURS"
status = "ENABLED"
resource "newrelic_synthetics_cert_check_monitor" "foo" {
name = "Sample Cert Check Monitor"
domain = "www.one.example.com"
locations_private = [newrelic_synthetics_private_location.foo.id]
certificate_expiration = "10"
period = "EVERY_6_HOURS"
status = "ENABLED"
tag {
key = "some_key"
values = ["some_value"]
Expand All @@ -89,7 +97,7 @@ The following attributes are exported:

## Import

Synthetics certificate check monitor scripts can be imported using the `guid`, e.g.
A cert check monitor can be imported using its GUID, using the following command.

```bash
$ terraform import newrelic_synthetics_cert_check_monitor.monitor <guid>
Expand Down
32 changes: 19 additions & 13 deletions website/docs/r/synthetics_step_monitor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ Use this resource to create, update, and delete a Synthetics Step monitor in New
## Example Usage

```hcl
resource "newrelic_synthetics_step_monitor" "monitor" {
name = "step_monitor"
resource "newrelic_synthetics_step_monitor" "foo" {
name = "Sample Step Monitor"
enable_screenshot_on_failure_and_script = true
locations_public = ["US_EAST_1", "US_EAST_2"]
period = "EVERY_6_HOURS"
status = "ENABLED"
runtime_type = "CHROME_BROWSER"
runtime_type_version = "100"
steps {
ordinal = 0
type = "NAVIGATE"
Expand All @@ -38,13 +40,18 @@ The following are the common arguments supported for `STEP` monitor:

* `account_id`- (Optional) The account in which the Synthetics monitor will be created.
* `name` - (Required) The name for the monitor.
* `uri` - (Required) The uri the monitor runs against.
* `locations_public` - (Required) The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the `AWS_` prefix as the provider uses NerdGraph. At least one of either `locations_public` or `location_private` is required.
* `location_private` - (Required) The location the monitor will run from. At least one of `locations_public` or `location_private` is required. See [Nested locations_private blocks](#nested-locations-private-blocks) below for details.
* `period` - (Required) The interval at which this monitor should run. Valid values are EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, or EVERY_DAY.
* `status` - (Required) The run state of the monitor. (`ENABLED` or `DISABLED`).

-> **WARNING:** As of February 29, 2024, Synthetic Monitors no longer support the `MUTED` status. Version **3.33.0** of the New Relic Terraform Provider is released to coincide with the `MUTED` status end-of-life. Consequently, the only valid values for `status` for all types of Synthetic Monitors are mentioned above. For additional information on alternatives to the `MUTED` status of Synthetic Monitors that can be managed via Terraform, please refer to [this guide](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/upcoming_synthetics_muted_status_eol_guide).

* `runtime_type` - (Optional) The runtime that the monitor will use to run jobs.
* `runtime_type_version` - (Optional) The specific version of the runtime type selected.

-> **NOTE:** Currently, the values of `runtime_type` and `runtime_type_version` supported by this resource are `CHROME_BROWSER` and `100` respectively. In order to run the monitor in the new runtime, both `runtime_type` and `runtime_type_version` need to be specified; however, specifying neither of these attributes would set this monitor to use the legacy runtime. It may also be noted that the runtime opted for would only be effective with private locations. For public locations, all traffic has been shifted to the new runtime, irrespective of the selection made.

* `steps` - (Required) The steps that make up the script the monitor will run. See [Nested steps blocks](#nested-steps-blocks) below for details.
* `tag` - (Optional) The tags that will be associated with the monitor. See [Nested tag blocks](#nested-tag-blocks) below for details.

Expand Down Expand Up @@ -79,21 +86,20 @@ The below example shows how you can define a private location and attach it to a
-> **NOTE:** It can take up to 10 minutes for a private location to become available.

```hcl
resource "newrelic_synthetics_private_location" "location" {
description = "Test Description"
name = "private-location"
resource "newrelic_synthetics_private_location" "foo" {
name = "Sample Private Location"
description = "Sample Private Location Description"
verified_script_execution = true
}
resource "newrelic_synthetics_step_monitor" "bar" {
name = "step_monitor"
uri = "https://www.one.example.com"
resource "newrelic_synthetics_step_monitor" "foo" {
name = "Sample Step Monitor"
period = "EVERY_6_HOURS"
status = "ENABLED"
location_private {
guid = newrelic_synthetics_private_location.location.id
guid = newrelic_synthetics_private_location.foo.id
vse_password = "secret"
}
period = "EVERY_6_HOURS"
status = "ENABLED"
steps {
ordinal = 0
type = "NAVIGATE"
Expand All @@ -114,7 +120,7 @@ The following attributes are exported:

## Import

Synthetics step monitor scripts can be imported using the `guid`, e.g.
A step monitor can be imported using its GUID, using the following command.

```bash
$ terraform import newrelic_synthetics_step_monitor.monitor <guid>
Expand Down

0 comments on commit eee0fc9

Please sign in to comment.