Skip to content
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

Fixed typo in dlp deidentify template field name #5604

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmv1/products/dlp/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ objects:
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'characterToSkip'
name: 'charactersToSkip'
description: |
Characters to not transform when masking.
- !ruby/object:Api::Type::Enum
Expand Down
6 changes: 6 additions & 0 deletions mmv1/products/dlp/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ overrides: !ruby/object:Overrides::ResourceOverrides
primary_resource_id: "basic"
test_env_vars:
project: :PROJECT_NAME
- !ruby/object:Provider::Terraform::Examples
name: "dlp_deidentify_template_skip_characters"
primary_resource_id: "basic"
test_env_vars:
project: :PROJECT_NAME
skip_docs: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
encoder: templates/terraform/encoders/wrap_object.go.erb
custom_import: templates/terraform/custom_import/dlp_import.go.erb
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
resource "google_data_loss_prevention_deidentify_template" "<%= ctx[:primary_resource_id] %>" {
parent = "projects/<%= ctx[:test_env_vars]['project'] %>"
description = "Description"
display_name = "Displayname"

deidentify_config {
info_type_transformations {
transformations {
info_types {
name = "FIRST_NAME"
}

primitive_transformation {
replace_with_info_type_config = true
}
}

transformations {
info_types {
name = "PHONE_NUMBER"
}
info_types {
name = "AGE"
}

primitive_transformation {
replace_config {
new_value {
integer_value = 9
}
}
}
}

transformations {
info_types {
name = "EMAIL_ADDRESS"
}
info_types {
name = "LAST_NAME"
}

primitive_transformation {
character_mask_config {
masking_character = "X"
number_to_mask = 4
reverse_order = true
characters_to_ignore {
characters_to_skip = "@"
}
}
}
}

transformations {
info_types {
name = "DATE_OF_BIRTH"
}

primitive_transformation {
replace_config {
new_value {
date_value {
year = 2020
month = 1
day = 1
}
}
}
}
}

transformations {
info_types {
name = "CREDIT_CARD_NUMBER"
}

primitive_transformation {
crypto_deterministic_config {
context {
name = "sometweak"
}
crypto_key {
transient {
name = "beep"
}
}
surrogate_info_type {
name = "abc"
}
}
}
}
}
}
}