Skip to content

Commit

Permalink
added cryptoHashConfig to deidentifyTemplate (#8084) (#14870)
Browse files Browse the repository at this point in the history
* added cryptoHashConfig to primitiveTransformation in infoTypeTransformations

* removed trailing space line 633

* stash data to remove linting issue and modified tests

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jun 9, 2023
1 parent 86324da commit 7c9671e
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/8084.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
dlp: added `crypto_hash_config` to `google_data_loss_prevention_deidentify_template`
```
66 changes: 66 additions & 0 deletions google/resource_data_loss_prevention_deidentify_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,38 @@ resource "google_data_loss_prevention_deidentify_template" "config" {
}
}
transformations {
info_types {
name = "CRYPTO_HASH_TRANSIENT_EXAMPLE"
}
primitive_transformation {
crypto_hash_config {
crypto_key {
transient {
name = "beep" # Copy-pasting from existing test that uses this field
}
}
}
}
}
transformations {
info_types {
name = "CRYPTO_HASH_UNWRAPPED_EXAMPLE"
}
primitive_transformation {
crypto_hash_config {
crypto_key {
unwrapped {
key = "VVdWVWFGZHRXbkUwZERkM0lYb2xRdz09"
}
}
}
}
}
transformations {
info_types {
name = "REDACT_EXAMPLE"
Expand Down Expand Up @@ -1371,6 +1403,40 @@ resource "google_data_loss_prevention_deidentify_template" "config" {
}
}
transformations {
info_types {
name = "CRYPTO_HASH_TRANSIENT_UPDATED_EXAMPLE"
}
primitive_transformation {
crypto_hash_config {
crypto_key {
transient {
# update value
name = "beepy-beep-updated"
}
}
}
}
}
transformations {
info_types {
name = "CRYPTO_HASH_WRAPPED_EXAMPLE"
}
primitive_transformation {
crypto_hash_config {
crypto_key {
kms_wrapped {
wrapped_key = "B64/WRAPPED/TOKENIZATION/KEY"
crypto_key_name = "%{kms_key_name}"
}
}
}
}
}
# update to remove transformations block using redact_config
}
}
Expand Down
Loading

0 comments on commit 7c9671e

Please sign in to comment.