-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add two outputs for dlp job trigger: outputting to SCC and DataCatalog #6855
Merged
shuyama1
merged 6 commits into
GoogleCloudPlatform:main
from
Wallace99:dlp-more-outputs
Jan 24, 2023
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c46b52b
Add two outputs for dlp job trigger: outputting to SCC and DataCatalog
Wallace99 1d2f89f
Add extra fields to allow empty nested object for SCC and Data Catalo…
Wallace99 3dbd952
Make fields in test snake case
Wallace99 18cd4a3
Add back in exactly_one_of to dlp outputs
Wallace99 a777a12
Fix spaces
Wallace99 646208b
Add tests to terraform.yaml
Wallace99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
mmv1/templates/terraform/examples/dlp_job_trigger_data_catalog_output.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
resource "google_data_loss_prevention_job_trigger" "<%= ctx[:primary_resource_id] %>" { | ||
parent = "projects/<%= ctx[:test_env_vars]['project'] %>" | ||
description = "Description" | ||
display_name = "Displayname" | ||
|
||
triggers { | ||
schedule { | ||
recurrence_period_duration = "86400s" | ||
} | ||
} | ||
|
||
inspect_job { | ||
inspect_template_name = "fake" | ||
actions { | ||
publish_findings_to_cloud_data_catalog { | ||
} | ||
} | ||
storage_config { | ||
big_query_options { | ||
table_reference { | ||
project_id = "project" | ||
dataset_id = "dataset" | ||
table_id = "table_to_scan" | ||
} | ||
|
||
rows_limit_percent = 50 | ||
sample_method = "RANDOM_START" | ||
} | ||
} | ||
} | ||
} | ||
31 changes: 31 additions & 0 deletions
31
mmv1/templates/terraform/examples/dlp_job_trigger_scc_output.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
resource "google_data_loss_prevention_job_trigger" "<%= ctx[:primary_resource_id] %>" { | ||
parent = "projects/<%= ctx[:test_env_vars]['project'] %>" | ||
description = "Description" | ||
display_name = "Displayname" | ||
|
||
triggers { | ||
schedule { | ||
recurrence_period_duration = "86400s" | ||
} | ||
} | ||
|
||
inspect_job { | ||
inspect_template_name = "fake" | ||
actions { | ||
publish_summary_to_cscc { | ||
} | ||
} | ||
storage_config { | ||
big_query_options { | ||
table_reference { | ||
project_id = "project" | ||
dataset_id = "dataset" | ||
table_id = "table_to_scan" | ||
} | ||
|
||
rows_limit_percent = 50 | ||
sample_method = "RANDOM_START" | ||
} | ||
} | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: spacing here |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing is a bit off here - we use spaces instead of tabs for resource configuration for tests