Skip to content

Commit f0ca83b

Browse files
authored
Add publishToDataplexCatalog action to DiscoveryConfig (#15340)
1 parent afe58e1 commit f0ca83b

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

mmv1/products/dlp/DiscoveryConfig.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ properties:
228228
- 'RESOURCE_NAME'
229229
- name: 'tagResources'
230230
type: NestedObject
231-
description: Publish a message into the Pub/Sub topic.
231+
description: Tag the profiled resources with the specified tag values.
232232
properties:
233233
- name: 'tagConditions'
234234
type: Array
@@ -271,6 +271,14 @@ properties:
271271
- name: 'lowerDataRiskToLow'
272272
type: Boolean
273273
description: Whether applying a tag to a resource should lower the risk of the profile for that resource. For example, in conjunction with an [IAM deny policy](https://cloud.google.com/iam/docs/deny-overview), you can deny all principals a permission if a tag value is present, mitigating the risk of the resource. This also lowers the data risk of resources at the lower levels of the resource hierarchy. For example, reducing the data risk of a table data profile also reduces the data risk of the constituent column data profiles.
274+
- name: 'publishToDataplexCatalog'
275+
type: NestedObject
276+
description: Publish a portion of each profile to Dataplex Universal Catalog with the aspect type Sensitive Data Protection Profile.
277+
send_empty_value: true
278+
allow_empty_object: true
279+
properties:
280+
# Meant to be an empty object with no properties.
281+
[]
274282
- name: 'targets'
275283
type: Array
276284
description: Target to match against for determining what to scan and how frequently

mmv1/templates/terraform/examples/dlp_discovery_config_actions.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ resource "google_data_loss_prevention_discovery_config" "{{$.PrimaryResourceId}}
5656
lower_data_risk_to_low = true
5757
}
5858
}
59+
actions {
60+
publish_to_dataplex_catalog {}
61+
}
5962
inspect_templates = ["projects/%{project}/inspectTemplates/${google_data_loss_prevention_inspect_template.basic.name}"]
6063
}
6164

mmv1/third_party/terraform/services/datalossprevention/resource_data_loss_prevention_discovery_config_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ resource "google_data_loss_prevention_discovery_config" "basic" {
666666
detail_of_message = "TABLE_PROFILE"
667667
}
668668
}
669-
actions {
669+
actions {
670670
tag_resources {
671671
tag_conditions {
672672
tag {
@@ -688,6 +688,9 @@ resource "google_data_loss_prevention_discovery_config" "basic" {
688688
lower_data_risk_to_low = true
689689
}
690690
}
691+
actions {
692+
publish_to_dataplex_catalog {}
693+
}
691694
inspect_templates = ["projects/%{project}/inspectTemplates/${google_data_loss_prevention_inspect_template.basic.name}"]
692695
depends_on = [
693696
google_project_iam_member.tag_role,

0 commit comments

Comments
 (0)