Skip to content

Commit f86079e

Browse files
Added missing file types in file_types enum and removed broken exactlyOneOf blocks in google_data_loss_prevention_job_trigger resource (#8100) (#14856)
Signed-off-by: Modular Magician <[email protected]>
1 parent 6484c65 commit f86079e

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

.changelog/8100.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
dlp: added missing file types `POWERPOINT` and `EXCEL` in `inspect_job.storage_config.cloud_storage_options.file_types` enum to `google_data_loss_prevention_job_trigger` resource
3+
```

google/resource_data_loss_prevention_job_trigger_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ resource "google_data_loss_prevention_job_trigger" "basic" {
509509
file_set {
510510
url = "gs://mybucket/directory/"
511511
}
512+
file_types = ["POWERPOINT", "EXCEL", "CSV", "TSV"]
512513
}
513514
}
514515
}

google/services/datalossprevention/resource_data_loss_prevention_job_trigger.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ Must be between 0 and 100, inclusively. Both 0 and 100 means no limit.`,
301301
Optional: true,
302302
Description: `List of file type groups to include in the scan. If empty, all files are scanned and available data
303303
format processors are applied. In addition, the binary content of the selected files is always scanned as well.
304-
Images are scanned only as binary if the specified region does not support image inspection and no fileTypes were specified. Possible values: ["BINARY_FILE", "TEXT_FILE", "IMAGE", "WORD", "PDF", "AVRO", "CSV", "TSV"]`,
304+
Images are scanned only as binary if the specified region does not support image inspection and no fileTypes were specified. Possible values: ["BINARY_FILE", "TEXT_FILE", "IMAGE", "WORD", "PDF", "AVRO", "CSV", "TSV", "POWERPOINT", "EXCEL"]`,
305305
Elem: &schema.Schema{
306306
Type: schema.TypeString,
307-
ValidateFunc: verify.ValidateEnum([]string{"BINARY_FILE", "TEXT_FILE", "IMAGE", "WORD", "PDF", "AVRO", "CSV", "TSV"}),
307+
ValidateFunc: verify.ValidateEnum([]string{"BINARY_FILE", "TEXT_FILE", "IMAGE", "WORD", "PDF", "AVRO", "CSV", "TSV", "POWERPOINT", "EXCEL"}),
308308
},
309309
},
310310
"files_limit_percent": {
@@ -596,7 +596,6 @@ is 1,024 characters.`,
596596
},
597597
},
598598
},
599-
ExactlyOneOf: []string{},
600599
},
601600
"job_notification_emails": {
602601
Type: schema.TypeList,
@@ -606,7 +605,6 @@ is 1,024 characters.`,
606605
Elem: &schema.Resource{
607606
Schema: map[string]*schema.Schema{},
608607
},
609-
ExactlyOneOf: []string{},
610608
},
611609
"pub_sub": {
612610
Type: schema.TypeList,
@@ -622,7 +620,6 @@ is 1,024 characters.`,
622620
},
623621
},
624622
},
625-
ExactlyOneOf: []string{},
626623
},
627624
"publish_findings_to_cloud_data_catalog": {
628625
Type: schema.TypeList,
@@ -632,7 +629,6 @@ is 1,024 characters.`,
632629
Elem: &schema.Resource{
633630
Schema: map[string]*schema.Schema{},
634631
},
635-
ExactlyOneOf: []string{},
636632
},
637633
"publish_summary_to_cscc": {
638634
Type: schema.TypeList,
@@ -642,7 +638,6 @@ is 1,024 characters.`,
642638
Elem: &schema.Resource{
643639
Schema: map[string]*schema.Schema{},
644640
},
645-
ExactlyOneOf: []string{},
646641
},
647642
"publish_to_stackdriver": {
648643
Type: schema.TypeList,
@@ -652,7 +647,6 @@ is 1,024 characters.`,
652647
Elem: &schema.Resource{
653648
Schema: map[string]*schema.Schema{},
654649
},
655-
ExactlyOneOf: []string{},
656650
},
657651
"save_findings": {
658652
Type: schema.TypeList,
@@ -712,7 +706,6 @@ Only for use with external storage. Possible values: ["BASIC_COLUMNS", "GCS_COLU
712706
},
713707
},
714708
},
715-
ExactlyOneOf: []string{},
716709
},
717710
},
718711
},

website/docs/r/data_loss_prevention_job_trigger.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ The following arguments are supported:
10471047
List of file type groups to include in the scan. If empty, all files are scanned and available data
10481048
format processors are applied. In addition, the binary content of the selected files is always scanned as well.
10491049
Images are scanned only as binary if the specified region does not support image inspection and no fileTypes were specified.
1050-
Each value may be one of: `BINARY_FILE`, `TEXT_FILE`, `IMAGE`, `WORD`, `PDF`, `AVRO`, `CSV`, `TSV`.
1050+
Each value may be one of: `BINARY_FILE`, `TEXT_FILE`, `IMAGE`, `WORD`, `PDF`, `AVRO`, `CSV`, `TSV`, `POWERPOINT`, `EXCEL`.
10511051

10521052
* `sample_method` -
10531053
(Optional)

0 commit comments

Comments
 (0)