Use Filters to Exclude Resources from Evaluation
You can use resource tags to create filters that include or exclude resources from being evaluated by Cloud Security Management (CSM). The filters must be specified as a comma-separated list of key:value
pairs.
Notes:
- Resource evaluation filters can only be used with hosts that are scanned by cloud integrations.
- Tags must be applied directly to the resource. The filters do not take into account user tags added in Datadog. The only exception is for tags added on the integration tiles for AWS and Google Cloud Platform.
Format | Value |
---|
Allowlist | key:value |
Blocklist | !key:value |
Single character wildcard | ? |
Multiple characters wildcard | * |
The allowlist enables you to specify tags that must be applied to a resource in order for CSM to evaluate it. Allowlist tags are evaluated as OR statements. In other words, at least one of the allowlist tags must be present in order for a resource to be evaluated. In contrast, blocklisted tags are evaluated as AND statements and take precedence over allowlist tags.
Examples:
!env:staging
excludes resources that have the env:staging
tag.datadog:monitored, env:prod*
collects metrics for resources that have at least one of these tags.!env:staging, !testing
excludes resources that have both the env:staging
and testing
tags.datadog:monitored !region:us-east1
collects metrics for resources that have the datadog:monitored
tag, so long as the resource does not have the region:us-east1
tag applied to it.
Exclude resources from evaluation
- On the Cloud Security Management Setup page, click Cloud accounts.
- Expand the AWS section.
- Under Resource Evaluation Filters (Optional), click the Plus (+) icon for the account you want to add the filter to.
- Enter a comma-separated list of
key:value
pairs for the tags you want to allowlist or blocklist. - Click Save.
- On the Cloud Security Management Setup page, click Cloud accounts.
- Expand the Azure section.
- Expand a subscription.
- Under Resource Evaluation Filters (Optional), click the Plus (+) icon.
- Enter a comma-separated list of
key:value
pairs for the tags you want to allowlist or blocklist. - Click Save.
- On the Cloud Security Management Setup page, click Cloud accounts.
- Expand the GCP section.
- Expand a project.
- Under Resource Evaluation Filters (Optional), click the Plus (+) icon.
- Enter a comma-separated list of
key:value
pairs for the tags you want to allowlist or blocklist. - Click Save.
Further Reading
Additional helpful documentation, links, and articles: