Skip to main content

monitoring_terraform_resources

Creates, updates, deletes, gets or lists a monitoring_terraform_resources resource.

Overview

Namemonitoring_terraform_resources
TypeResource
Iddatadog.security.monitoring_terraform_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe resource identifier composed of the Terraform type name and the resource ID separated by |. (example: datadog_security_monitoring_suppression|abc-123)
attributesobjectAttributes of the Terraform export response.
typestringThe JSON:API type. Always format_resource. (example: format_resource)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
export_security_monitoring_terraform_resourceselectresource_type, resource_idExport a security monitoring resource to a Terraform configuration.<br />The resource_type path parameter specifies the type of resource to export<br />and must be one of suppressions, critical_assets, security_filters, or rules.<br />For rules, partner rules cannot be exported and return a 400 error.
convert_security_monitoring_terraform_resourceexecresource_type, dataConvert a security monitoring resource that doesn't (yet) exist from JSON to Terraform.<br />The resource_type path parameter specifies the type of resource to convert<br />and must be one of suppressions, critical_assets, security_filters, or rules.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_idstringThe ID of the security monitoring resource to export.
resource_typestringThe type of security monitoring resource to export.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Export a security monitoring resource to a Terraform configuration.<br />The resource_type path parameter specifies the type of resource to export<br />and must be one of suppressions, critical_assets, security_filters, or rules.<br />For rules, partner rules cannot be exported and return a 400 error.

SELECT
id,
attributes,
type
FROM datadog.security.monitoring_terraform_resources
WHERE resource_type = '{{ resource_type }}' -- required
AND resource_id = '{{ resource_id }}' -- required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Convert a security monitoring resource that doesn't (yet) exist from JSON to Terraform.<br />The resource_type path parameter specifies the type of resource to convert<br />and must be one of suppressions, critical_assets, security_filters, or rules.

EXEC datadog.security.monitoring_terraform_resources.convert_security_monitoring_terraform_resource
@resource_type='{{ resource_type }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;