import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Use this resource to create, update, and delete a Simple or Browser Synthetics Monitor in New Relic.
*
* > **IMPORTANT:** The **Synthetics Legacy Runtime** will reach its end-of-life on Aug 18, 2026. As a consequence, using the legacy runtime with Synthetic monitor requests from the New Relic Terraform Provider will result in API errors. Starting with **v3.51.0** of the New Relic Terraform Provider, configurations of Synthetic monitors without runtime attributes or comprising legacy runtime values will be deemed invalid.
*
* If your Synthetic monitors' configuration is not updated already with new runtime values, upgrade as soon as possible to avoid these consequences. For more details and instructions, please see the detailed warning against `runtimeType` and `runtimeTypeVersion` in the **Argument Reference** section.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
*
* const monitor = new newrelic.synthetics.Monitor("monitor", {
* status: "ENABLED",
* name: "monitor",
* period: "EVERY_MINUTE",
* uri: "https://www.one.newrelic.com",
* type: "SIMPLE",
* locationsPublics: ["AP_SOUTH_1"],
* customHeaders: [{
* name: "some_name",
* value: "some_value",
* }],
* treatRedirectAsFailure: true,
* validationString: "success",
* bypassHeadRequest: true,
* verifySsl: true,
* tags: [{
* key: "some_key",
* values: ["some_value"],
* }],
* });
* ```
* ##### Type: `SIMPLE BROWSER`
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
*
* const monitor = new newrelic.synthetics.Monitor("monitor", {
* status: "ENABLED",
* name: "monitor",
* period: "EVERY_MINUTE",
* uri: "https://www.one.newrelic.com",
* type: "BROWSER",
* locationsPublics: ["AP_SOUTH_1"],
* enableScreenshotOnFailureAndScript: true,
* validationString: "success",
* verifySsl: true,
* runtimeType: "CHROME_BROWSER",
* runtimeTypeVersion: "LATEST",
* scriptLanguage: "JAVASCRIPT",
* devices: [
* "DESKTOP",
* "TABLET_LANDSCAPE",
* "MOBILE_PORTRAIT",
* ],
* browsers: ["CHROME"],
* customHeaders: [{
* name: "some_name",
* value: "some_value",
* }],
* tags: [{
* key: "some_key",
* values: ["some_value"],
* }],
* });
* ```
* See additional examples.
*
* ## Additional Examples
*
* ### Create a monitor with a private location
*
* The below example shows how you can define a private location and attach it to a monitor.
*
* > **NOTE:** It can take up to 10 minutes for a private location to become available.
*
* ##### Type: `SIMPLE`
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
*
* const location = new newrelic.synthetics.PrivateLocation("location", {
* description: "Example private location",
* name: "private_location",
* verifiedScriptExecution: false,
* });
* const monitor = new newrelic.synthetics.Monitor("monitor", {
* status: "ENABLED",
* name: "monitor",
* period: "EVERY_MINUTE",
* uri: "https://www.one.newrelic.com",
* type: "SIMPLE",
* locationsPrivates: [location.id],
* customHeaders: [{
* name: "some_name",
* value: "some_value",
* }],
* treatRedirectAsFailure: true,
* validationString: "success",
* bypassHeadRequest: true,
* verifySsl: true,
* tags: [{
* key: "some_key",
* values: ["some_value"],
* }],
* });
* ```
* ##### Type: `BROWSER`
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as newrelic from "@pulumi/newrelic";
*
* const location = new newrelic.synthetics.PrivateLocation("location", {
* description: "Example private location",
* name: "private-location",
* verifiedScriptExecution: false,
* });
* const monitor = new newrelic.synthetics.Monitor("monitor", {
* status: "ENABLED",
* type: "BROWSER",
* uri: "https://www.one.newrelic.com",
* name: "monitor",
* period: "EVERY_MINUTE",
* locationsPrivates: [location.id],
* enableScreenshotOnFailureAndScript: true,
* validationString: "success",
* verifySsl: true,
* runtimeTypeVersion: "LATEST",
* runtimeType: "CHROME_BROWSER",
* scriptLanguage: "JAVASCRIPT",
* devices: [
* "DESKTOP",
* "TABLET_LANDSCAPE",
* "MOBILE_PORTRAIT",
* ],
* browsers: ["CHROME"],
* customHeaders: [{
* name: "some_name",
* value: "some_value",
* }],
* tags: [{
* key: "some_key",
* values: ["some_value"],
* }],
* });
* ```
*
* ## Import
*
* Synthetics monitor can be imported using the `guid`, e.g.
*
* ```sh
* $ pulumi import newrelic:synthetics/monitor:Monitor monitor
* ```
*/
export declare class Monitor extends pulumi.CustomResource {
/**
* Get an existing Monitor resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input, state?: MonitorState, opts?: pulumi.CustomResourceOptions): Monitor;
/**
* Returns true if the given object is an instance of Monitor. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Monitor;
/**
* The account in which the Synthetics monitor will be created.
*/
readonly accountId: pulumi.Output;
/**
* The multiple browsers list on which synthetic monitors will run. Valid values are `CHROME` and `FIREFOX`.
*/
readonly browsers: pulumi.Output;
/**
* Monitor should skip default HEAD request and instead use GET verb in check.
*
* The `BROWSER` monitor type supports the following additional arguments:
*/
readonly bypassHeadRequest: pulumi.Output;
/**
* Custom headers to use in monitor job. See Nested customHeader blocks below for details.
*/
readonly customHeaders: pulumi.Output;
/**
* Device emulation orientation field. Valid values are `LANDSCAPE` and `PORTRAIT`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
readonly deviceOrientation: pulumi.Output;
/**
* Device emulation type field. Valid values are `MOBILE` and `TABLET`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
readonly deviceType: pulumi.Output;
/**
* The multiple devices list on which synthetic monitors will run. Valid values are `DESKTOP`, `MOBILE_LANDSCAPE`, `MOBILE_PORTRAIT`, `TABLET_LANDSCAPE` and `TABLET_PORTRAIT`.
*/
readonly devices: pulumi.Output;
/**
* Capture a screenshot during job execution.
*/
readonly enableScreenshotOnFailureAndScript: pulumi.Output;
/**
* The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either `locationsPublic` or `locationsPrivate` is required.
*/
readonly locationsPrivates: pulumi.Output;
/**
* The location the monitor will run from. Check out [this page](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/) for a list of valid public locations. You don't need the `AWS_` prefix as the provider uses NerdGraph. At least one of either `locationsPublic` or `locationPrivate` is required.
*/
readonly locationsPublics: pulumi.Output;
/**
* The monitor id of the Synthetics monitor (not to be confused with the GUID of the monitor).
*/
readonly monitorId: pulumi.Output;
/**
* The human-readable identifier for the monitor.
*/
readonly name: pulumi.Output;
/**
* 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`.
*/
readonly period: pulumi.Output;
/**
* The interval in minutes at which Synthetic monitor should run.
*/
readonly periodInMinutes: pulumi.Output;
/**
* The runtime that the monitor will use to run jobs (`CHROME_BROWSER`).
*/
readonly runtimeType: pulumi.Output;
/**
* The specific version of the runtime type selected. Use `LATEST` to automatically use the latest Chrome version (currently 146, will be automatically upgraded to Chrome 147 or higher on Aug 18, 2026, updated automatically as new versions are released). **Note:** The Terraform Provider enforces `LATEST` for this non-scripted monitor type in alignment with the New Relic UI — even if a specific version is hard-coded in your configuration, the provider will override it to `LATEST`. We recommend explicitly setting `runtimeTypeVersion = "LATEST"` in your configuration to avoid drift.
*/
readonly runtimeTypeVersion: pulumi.Output;
/**
* The programing language that should execute the script.
*/
readonly scriptLanguage: pulumi.Output;
/**
* The run state of the monitor. (`ENABLED` or `DISABLED`).
*/
readonly status: pulumi.Output;
/**
* The tags that will be associated with the monitor. See Nested tag blocks below for details.
*
* The `SIMPLE` monitor type supports the following additional arguments:
*/
readonly tags: pulumi.Output;
/**
* Categorize redirects during a monitor job as a failure.
*/
readonly treatRedirectAsFailure: pulumi.Output;
/**
* The monitor type. Valid values are `SIMPLE` and `BROWSER`.
*/
readonly type: pulumi.Output;
/**
* The URI the monitor runs against.
*/
readonly uri: pulumi.Output;
/**
* A boolean attribute to be set true by the customer, if they would like to use the unsupported legacy runtime of Synthetic Monitors by means of an exemption given until the October 22, 2024 Legacy Runtime EOL. Setting this attribute to true would allow skipping validation performed by the the New Relic Terraform Provider starting v3.43.0 to disallow using the legacy runtime with new monitors. This would, hence, allow creation of monitors in the legacy runtime until the October 22, 2024 Legacy Runtime EOL, if exempt by the API.
*/
readonly useUnsupportedLegacyRuntime: pulumi.Output;
/**
* Validation text for monitor to search for at given URI.
*/
readonly validationString: pulumi.Output;
/**
* Monitor should validate SSL certificate chain.
*/
readonly verifySsl: pulumi.Output;
/**
* Create a Monitor resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: MonitorArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Monitor resources.
*/
export interface MonitorState {
/**
* The account in which the Synthetics monitor will be created.
*/
accountId?: pulumi.Input;
/**
* The multiple browsers list on which synthetic monitors will run. Valid values are `CHROME` and `FIREFOX`.
*/
browsers?: pulumi.Input[] | undefined>;
/**
* Monitor should skip default HEAD request and instead use GET verb in check.
*
* The `BROWSER` monitor type supports the following additional arguments:
*/
bypassHeadRequest?: pulumi.Input;
/**
* Custom headers to use in monitor job. See Nested customHeader blocks below for details.
*/
customHeaders?: pulumi.Input[] | undefined>;
/**
* Device emulation orientation field. Valid values are `LANDSCAPE` and `PORTRAIT`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
deviceOrientation?: pulumi.Input;
/**
* Device emulation type field. Valid values are `MOBILE` and `TABLET`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
deviceType?: pulumi.Input;
/**
* The multiple devices list on which synthetic monitors will run. Valid values are `DESKTOP`, `MOBILE_LANDSCAPE`, `MOBILE_PORTRAIT`, `TABLET_LANDSCAPE` and `TABLET_PORTRAIT`.
*/
devices?: pulumi.Input[] | undefined>;
/**
* Capture a screenshot during job execution.
*/
enableScreenshotOnFailureAndScript?: pulumi.Input;
/**
* The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either `locationsPublic` or `locationsPrivate` is required.
*/
locationsPrivates?: pulumi.Input[] | undefined>;
/**
* The location the monitor will run from. Check out [this page](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/) for a list of valid public locations. You don't need the `AWS_` prefix as the provider uses NerdGraph. At least one of either `locationsPublic` or `locationPrivate` is required.
*/
locationsPublics?: pulumi.Input[] | undefined>;
/**
* The monitor id of the Synthetics monitor (not to be confused with the GUID of the monitor).
*/
monitorId?: pulumi.Input;
/**
* The human-readable identifier for the monitor.
*/
name?: pulumi.Input;
/**
* 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`.
*/
period?: pulumi.Input;
/**
* The interval in minutes at which Synthetic monitor should run.
*/
periodInMinutes?: pulumi.Input;
/**
* The runtime that the monitor will use to run jobs (`CHROME_BROWSER`).
*/
runtimeType?: pulumi.Input;
/**
* The specific version of the runtime type selected. Use `LATEST` to automatically use the latest Chrome version (currently 146, will be automatically upgraded to Chrome 147 or higher on Aug 18, 2026, updated automatically as new versions are released). **Note:** The Terraform Provider enforces `LATEST` for this non-scripted monitor type in alignment with the New Relic UI — even if a specific version is hard-coded in your configuration, the provider will override it to `LATEST`. We recommend explicitly setting `runtimeTypeVersion = "LATEST"` in your configuration to avoid drift.
*/
runtimeTypeVersion?: pulumi.Input;
/**
* The programing language that should execute the script.
*/
scriptLanguage?: pulumi.Input;
/**
* The run state of the monitor. (`ENABLED` or `DISABLED`).
*/
status?: pulumi.Input;
/**
* The tags that will be associated with the monitor. See Nested tag blocks below for details.
*
* The `SIMPLE` monitor type supports the following additional arguments:
*/
tags?: pulumi.Input[] | undefined>;
/**
* Categorize redirects during a monitor job as a failure.
*/
treatRedirectAsFailure?: pulumi.Input;
/**
* The monitor type. Valid values are `SIMPLE` and `BROWSER`.
*/
type?: pulumi.Input;
/**
* The URI the monitor runs against.
*/
uri?: pulumi.Input;
/**
* A boolean attribute to be set true by the customer, if they would like to use the unsupported legacy runtime of Synthetic Monitors by means of an exemption given until the October 22, 2024 Legacy Runtime EOL. Setting this attribute to true would allow skipping validation performed by the the New Relic Terraform Provider starting v3.43.0 to disallow using the legacy runtime with new monitors. This would, hence, allow creation of monitors in the legacy runtime until the October 22, 2024 Legacy Runtime EOL, if exempt by the API.
*/
useUnsupportedLegacyRuntime?: pulumi.Input;
/**
* Validation text for monitor to search for at given URI.
*/
validationString?: pulumi.Input;
/**
* Monitor should validate SSL certificate chain.
*/
verifySsl?: pulumi.Input;
}
/**
* The set of arguments for constructing a Monitor resource.
*/
export interface MonitorArgs {
/**
* The account in which the Synthetics monitor will be created.
*/
accountId?: pulumi.Input;
/**
* The multiple browsers list on which synthetic monitors will run. Valid values are `CHROME` and `FIREFOX`.
*/
browsers?: pulumi.Input[] | undefined>;
/**
* Monitor should skip default HEAD request and instead use GET verb in check.
*
* The `BROWSER` monitor type supports the following additional arguments:
*/
bypassHeadRequest?: pulumi.Input;
/**
* Custom headers to use in monitor job. See Nested customHeader blocks below for details.
*/
customHeaders?: pulumi.Input[] | undefined>;
/**
* Device emulation orientation field. Valid values are `LANDSCAPE` and `PORTRAIT`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
deviceOrientation?: pulumi.Input;
/**
* Device emulation type field. Valid values are `MOBILE` and `TABLET`.
* * We recommend you to use `devices` field instead of `deviceType`,`deviceOrientation` fields, as it allows you to select multiple combinations of device types and orientations.
*/
deviceType?: pulumi.Input;
/**
* The multiple devices list on which synthetic monitors will run. Valid values are `DESKTOP`, `MOBILE_LANDSCAPE`, `MOBILE_PORTRAIT`, `TABLET_LANDSCAPE` and `TABLET_PORTRAIT`.
*/
devices?: pulumi.Input[] | undefined>;
/**
* Capture a screenshot during job execution.
*/
enableScreenshotOnFailureAndScript?: pulumi.Input;
/**
* The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either `locationsPublic` or `locationsPrivate` is required.
*/
locationsPrivates?: pulumi.Input[] | undefined>;
/**
* The location the monitor will run from. Check out [this page](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/) for a list of valid public locations. You don't need the `AWS_` prefix as the provider uses NerdGraph. At least one of either `locationsPublic` or `locationPrivate` is required.
*/
locationsPublics?: pulumi.Input[] | undefined>;
/**
* The human-readable identifier for the monitor.
*/
name?: pulumi.Input;
/**
* 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`.
*/
period?: pulumi.Input;
/**
* The runtime that the monitor will use to run jobs (`CHROME_BROWSER`).
*/
runtimeType?: pulumi.Input;
/**
* The specific version of the runtime type selected. Use `LATEST` to automatically use the latest Chrome version (currently 146, will be automatically upgraded to Chrome 147 or higher on Aug 18, 2026, updated automatically as new versions are released). **Note:** The Terraform Provider enforces `LATEST` for this non-scripted monitor type in alignment with the New Relic UI — even if a specific version is hard-coded in your configuration, the provider will override it to `LATEST`. We recommend explicitly setting `runtimeTypeVersion = "LATEST"` in your configuration to avoid drift.
*/
runtimeTypeVersion?: pulumi.Input;
/**
* The programing language that should execute the script.
*/
scriptLanguage?: pulumi.Input;
/**
* The run state of the monitor. (`ENABLED` or `DISABLED`).
*/
status: pulumi.Input;
/**
* The tags that will be associated with the monitor. See Nested tag blocks below for details.
*
* The `SIMPLE` monitor type supports the following additional arguments:
*/
tags?: pulumi.Input[] | undefined>;
/**
* Categorize redirects during a monitor job as a failure.
*/
treatRedirectAsFailure?: pulumi.Input;
/**
* The monitor type. Valid values are `SIMPLE` and `BROWSER`.
*/
type: pulumi.Input;
/**
* The URI the monitor runs against.
*/
uri?: pulumi.Input;
/**
* A boolean attribute to be set true by the customer, if they would like to use the unsupported legacy runtime of Synthetic Monitors by means of an exemption given until the October 22, 2024 Legacy Runtime EOL. Setting this attribute to true would allow skipping validation performed by the the New Relic Terraform Provider starting v3.43.0 to disallow using the legacy runtime with new monitors. This would, hence, allow creation of monitors in the legacy runtime until the October 22, 2024 Legacy Runtime EOL, if exempt by the API.
*/
useUnsupportedLegacyRuntime?: pulumi.Input;
/**
* Validation text for monitor to search for at given URI.
*/
validationString?: pulumi.Input;
/**
* Monitor should validate SSL certificate chain.
*/
verifySsl?: pulumi.Input;
}
//# sourceMappingURL=monitor.d.ts.map