monitoring_terraform_resources
Creates, updates, deletes, gets or lists a monitoring_terraform_resources resource.
Overview
| Name | monitoring_terraform_resources |
| Type | Resource |
| Id | datadog.security.monitoring_terraform_resources |
Fields
The following fields are returned by SELECT queries:
- export_security_monitoring_terraform_resource
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier composed of the Terraform type name and the resource ID separated by |. (example: datadog_security_monitoring_suppression|abc-123) |
attributes | object | Attributes of the Terraform export response. |
type | string | The JSON:API type. Always format_resource. (example: format_resource) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
export_security_monitoring_terraform_resource | select | resource_type, resource_id | 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. | |
convert_security_monitoring_terraform_resource | exec | resource_type, data | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
resource_id | string | The ID of the security monitoring resource to export. |
resource_type | string | The type of security monitoring resource to export. |
site | string | The 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_security_monitoring_terraform_resource
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_security_monitoring_terraform_resource
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 }}"
}'
;