Provides a Datadog synthetics global variable resource. This can be used to create and manage Datadog synthetics global variables.
resource "datadog_synthetics_global_variable" "test_variable" {
name = "EXAMPLE_VARIABLE"
description = "Description of the variable"
tags = ["foo:bar", "env:test"]
value = "variable-value"
}
name
(String) Synthetics global variable name.value
(String, Sensitive) The value of the global variable.description
(String) Description of the global variable.options
(Block List, Max: 1) Additional options for the variable, such as a MFA token. (see below for nested schema)parse_test_id
(String) Id of the Synthetics test to use for a variable from test.parse_test_options
(Block List, Max: 1) ID of the Synthetics test to use a source of the global variable value. (see below for nested schema)restricted_roles
(Set of String) A list of role identifiers to associate with the Synthetics global variable.secure
(Boolean) If set to true, the value of the global variable is hidden. Defaults to false
.tags
(List of String) A list of tags to associate with your synthetics global variable.id
(String) The ID of this resource.options
Optional:
totp_parameters
(Block List, Max: 1) Parameters needed for MFA/TOTP. (see below for nested schema)options.totp_parameters
Required:
digits
(Number) Number of digits for the OTP.refresh_interval
(Number) Interval for which to refresh the token (in seconds).parse_test_options
Required:
type
(String) Defines the source to use to extract the value. Valid values are http_body
, http_header
, local_variable
.Optional:
field
(String) Required when type = http_header
. Defines the header to use to extract the valuelocal_variable_name
(String) When type is local_variable
, name of the local variable to use to extract the value.parser
(Block List, Max: 1) (see below for nested schema)parse_test_options.parser
Required:
type
(String) Type of parser to extract the value. Valid values are raw
, json_path
, regex
, x_path
.Optional:
value
(String) Value for the parser to use, required for type json_path
or regex
.Import is supported using the following syntax:
# Synthetics global variables can be imported using their string ID, e.g.
terraform import datadog_synthetics_global_variable.fizz abcde123-fghi-456-jkl-mnopqrstuv