Skip to content

Commit

Permalink
Added missing file types in file_types enum and removed broken exactl…
Browse files Browse the repository at this point in the history
…yOneOf blocks in google_data_loss_prevention_job_trigger resource (GoogleCloudPlatform#8100)
  • Loading branch information
abheda-crest authored and ericayyliu committed Jul 26, 2023
1 parent 8588285 commit 5a6f569
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 56 deletions.
121 changes: 65 additions & 56 deletions mmv1/products/dlp/JobTrigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ properties:
- :AVRO
- :CSV
- :TSV
- :POWERPOINT
- :EXCEL
- !ruby/object:Api::Type::Enum
name: 'sampleMethod'
description: |
Expand Down Expand Up @@ -911,14 +913,15 @@ properties:
properties:
- !ruby/object:Api::Type::NestedObject
name: 'saveFindings'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
description: |
If set, the detailed findings will be persisted to the specified OutputStorageConfig. Only a single instance of this action can be specified. Compatible with: Inspect, Risk
properties:
Expand Down Expand Up @@ -968,14 +971,15 @@ properties:
- :ALL_COLUMNS
- !ruby/object:Api::Type::NestedObject
name: 'pubSub'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
description: |
Publish a message into a given Pub/Sub topic when the job completes.
properties:
Expand All @@ -986,59 +990,63 @@ properties:
Cloud Pub/Sub topic to send notifications to.
- !ruby/object:Api::Type::NestedObject
name: 'publishSummaryToCscc'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
allow_empty_object: true
send_empty_value: true
properties: []
description: |
Publish the result summary of a DlpJob to the Cloud Security Command Center.
- !ruby/object:Api::Type::NestedObject
name: 'publishFindingsToCloudDataCatalog'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
allow_empty_object: true
send_empty_value: true
properties: []
description: |
Publish findings of a DlpJob to Data Catalog.
- !ruby/object:Api::Type::NestedObject
name: 'jobNotificationEmails'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
allow_empty_object: true
send_empty_value: true
properties: []
description: |
Sends an email when the job completes. The email goes to IAM project owners and technical Essential Contacts.
- !ruby/object:Api::Type::NestedObject
name: 'deidentify'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
description: |
Create a de-identified copy of the requested table or files.
properties:
Expand Down Expand Up @@ -1119,14 +1127,15 @@ properties:
is 1,024 characters.
- !ruby/object:Api::Type::NestedObject
name: 'publishToStackdriver'
exactly_one_of:
- save_findings
- pub_sub
- publish_findings_to_cloud_data_catalog
- publish_summary_to_cscc
- job_notification_emails
- deidentify
- publish_to_stackdriver
# TODO: uncomment here once they are supported(github.com/hashicorp/terraform-plugin-sdk/issues/470)
# exactly_one_of:
# - save_findings
# - pub_sub
# - publish_findings_to_cloud_data_catalog
# - publish_summary_to_cscc
# - job_notification_emails
# - deidentify
# - publish_to_stackdriver
allow_empty_object: true
send_empty_value: true
properties: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ resource "google_data_loss_prevention_job_trigger" "basic" {
file_set {
url = "gs://mybucket/directory/"
}
file_types = ["POWERPOINT", "EXCEL", "CSV", "TSV"]
}
}
}
Expand Down

0 comments on commit 5a6f569

Please sign in to comment.