@@ -435,6 +435,50 @@ func TestAccDataLossPreventionJobTrigger_dlpJobTriggerActionsOptionalExample(t *
435
435
})
436
436
}
437
437
438
+ func TestAccDataLossPreventionJobTrigger_dlpJobTriggerInspectOptionalExample (t * testing.T ) {
439
+ t .Parallel ()
440
+
441
+ context := map [string ]interface {}{
442
+ "project" : acctest .GetTestProjectFromEnv (),
443
+ "random_suffix" : RandString (t , 10 ),
444
+ }
445
+
446
+ VcrTest (t , resource.TestCase {
447
+ PreCheck : func () { acctest .AccTestPreCheck (t ) },
448
+ ProtoV5ProviderFactories : ProtoV5ProviderFactories (t ),
449
+ CheckDestroy : testAccCheckDataLossPreventionJobTriggerDestroyProducer (t ),
450
+ Steps : []resource.TestStep {
451
+ {
452
+ Config : testAccDataLossPreventionJobTrigger_dlpJobTriggerInspectOptionalBasic (context ),
453
+ },
454
+ {
455
+ ResourceName : "google_data_loss_prevention_job_trigger.basic" ,
456
+ ImportState : true ,
457
+ ImportStateVerify : true ,
458
+ ImportStateVerifyIgnore : []string {"parent" },
459
+ },
460
+ {
461
+ Config : testAccDataLossPreventionJobTrigger_dlpJobTriggerBasic (context ),
462
+ },
463
+ {
464
+ ResourceName : "google_data_loss_prevention_job_trigger.basic" ,
465
+ ImportState : true ,
466
+ ImportStateVerify : true ,
467
+ ImportStateVerifyIgnore : []string {"parent" },
468
+ },
469
+ {
470
+ Config : testAccDataLossPreventionJobTrigger_dlpJobTriggerInspectOptionalBasic (context ),
471
+ },
472
+ {
473
+ ResourceName : "google_data_loss_prevention_job_trigger.basic" ,
474
+ ImportState : true ,
475
+ ImportStateVerify : true ,
476
+ ImportStateVerifyIgnore : []string {"parent" },
477
+ },
478
+ },
479
+ })
480
+ }
481
+
438
482
func testAccDataLossPreventionJobTrigger_dlpJobTriggerBasic (context map [string ]interface {}) string {
439
483
return Nprintf (`
440
484
resource "google_data_loss_prevention_job_trigger" "basic" {
@@ -2273,3 +2317,39 @@ resource "google_data_loss_prevention_job_trigger" "basic" {
2273
2317
}
2274
2318
` , context )
2275
2319
}
2320
+
2321
+ func testAccDataLossPreventionJobTrigger_dlpJobTriggerInspectOptionalBasic (context map [string ]interface {}) string {
2322
+ return Nprintf (`
2323
+ resource "google_data_loss_prevention_job_trigger" "basic" {
2324
+ parent = "projects/%{project}"
2325
+ description = "Starting description"
2326
+ display_name = "display"
2327
+
2328
+ triggers {
2329
+ schedule {
2330
+ recurrence_period_duration = "86400s"
2331
+ }
2332
+ }
2333
+
2334
+ inspect_job {
2335
+ actions {
2336
+ save_findings {
2337
+ output_config {
2338
+ table {
2339
+ project_id = "project"
2340
+ dataset_id = "dataset123"
2341
+ }
2342
+ }
2343
+ }
2344
+ }
2345
+ storage_config {
2346
+ cloud_storage_options {
2347
+ file_set {
2348
+ url = "gs://mybucket/directory/"
2349
+ }
2350
+ }
2351
+ }
2352
+ }
2353
+ }
2354
+ ` , context )
2355
+ }
0 commit comments