Google Data loss prevention Inspect Template
This page shows how to write Terraform for Data loss prevention Inspect Template and write them securely.
google_data_loss_prevention_inspect_template (Terraform)
The Inspect Template in Data loss prevention can be configured in Terraform with the resource name google_data_loss_prevention_inspect_template
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
description
optional - string
A description of the inspect template.
-
display_name
optional - string
User set display name of the inspect template.
The resource name of the inspect template. Set by the server.
-
parent
required - string
The parent of the inspect template in any of the following formats: 'projects/[[project]]' 'projects/[[project]]/locations/[[location]]' 'organizations/[[organization_id]]' 'organizations/[[organization_id]]/locations/[[location]]'
-
inspect_config
list block-
content_options
optional - list of string
List of options defining data content to scan. If empty, text, images, and other content will be included. Possible values: ["CONTENT_TEXT", "CONTENT_IMAGE"]
-
exclude_info_types
optional - bool
When true, excludes type information of the findings.
-
include_quote
optional - bool
When true, a contextual quote from the data that triggered a finding is included in the response.
-
min_likelihood
optional - string
Only returns findings equal or above this threshold. See https://cloud.google.com/dlp/docs/likelihood for more info Default value: "POSSIBLE" Possible values: ["VERY_UNLIKELY", "UNLIKELY", "POSSIBLE", "LIKELY", "VERY_LIKELY"]
-
custom_info_types
list block-
exclusion_type
optional - string
If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned. It still can be used for rules matching. Possible values: ["EXCLUSION_TYPE_EXCLUDE"]
-
likelihood
optional - string
Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Default value: "VERY_LIKELY" Possible values: ["VERY_UNLIKELY", "UNLIKELY", "POSSIBLE", "LIKELY", "VERY_LIKELY"]
-
dictionary
list block-
cloud_storage_path
list block-
path
required - string
A url representing a file or path (no wildcards) in Cloud Storage. Example: 'gs://[BUCKET_NAME]/dictionary.txt'
-
-
word_list
list block-
words
required - list of string
Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits.
-
-
-
info_type
list block-
name
required - string
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type.
-
-
regex
list block-
group_indexes
optional - list of number
The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
-
pattern
required - string
Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
-
-
stored_type
list block-
name
required - string
Resource name of the requested StoredInfoType, for example 'organizations/433245324/storedInfoTypes/432452342' or 'projects/project-id/storedInfoTypes/432452342'.
-
-
-
info_types
list block-
name
required - string
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type.
-
-
limits
list block-
max_findings_per_item
required - number
Max number of findings that will be returned for each item scanned. The maximum returned is 2000.
-
max_findings_per_request
required - number
Max number of findings that will be returned per request/job. The maximum returned is 2000.
-
max_findings_per_info_type
list block-
max_findings
required - number
Max findings limit for the given infoType.
-
info_type
list block-
name
required - string
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type.
-
-
-
-
rule_set
list block-
info_types
list block-
name
required - string
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type.
-
-
rules
list block-
exclusion_rule
list block-
matching_type
required - string
How the rule is applied. See the documentation for more information: https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#MatchingType Possible values: ["MATCHING_TYPE_FULL_MATCH", "MATCHING_TYPE_PARTIAL_MATCH", "MATCHING_TYPE_INVERSE_MATCH"]
-
dictionary
list block-
cloud_storage_path
list block-
path
required - string
A url representing a file or path (no wildcards) in Cloud Storage. Example: 'gs://[BUCKET_NAME]/dictionary.txt'
-
-
word_list
list block-
words
required - list of string
Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits.
-
-
-
exclude_info_types
list block-
info_types
list block-
name
required - string
Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type.
-
-
-
regex
list block-
group_indexes
optional - list of number
The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
-
pattern
required - string
Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
-
-
-
hotword_rule
list block-
hotword_regex
list block-
group_indexes
optional - list of number
The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
-
pattern
required - string
Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
-
-
likelihood_adjustment
list block-
fixed_likelihood
optional - string
Set the likelihood of a finding to a fixed value. Either this or relative_likelihood can be set. Possible values: ["VERY_UNLIKELY", "UNLIKELY", "POSSIBLE", "LIKELY", "VERY_LIKELY"]
-
relative_likelihood
optional - number
Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be POSSIBLE without the detection rule and relativeLikelihood is 1, then it is upgraded to LIKELY, while a value of -1 would downgrade it to UNLIKELY. Likelihood may never drop below VERY_UNLIKELY or exceed VERY_LIKELY, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is VERY_LIKELY will result in a final likelihood of LIKELY. Either this or fixed_likelihood can be set.
-
-
proximity
list block-
window_after
optional - number
Number of characters after the finding to consider. Either this or window_before must be specified
-
window_before
optional - number
Number of characters before the finding to consider. Either this or window_after must be specified
-
-
-
-
-
-
timeouts
single block
Explanation in Terraform Registry
An inspect job template. To get more information about InspectTemplate, see:
- API documentation
- How-to Guides