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

Update ReadMe.md #400

Merged
merged 3 commits into from
Apr 12, 2020
Merged
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions examples/dlp/cloud_function_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export LOG_EXPORT_TOPIC_NAME=log-export

export DLP_SCRUBBED_TOPIC_NAME=scrubbed-log-export

export LOG_EXPORT_NAME=log-export-destination

export DLP_SCRUBBED_SUBSCRIPTION_NAME=scrubbed-log-export-subscription
```

Expand All @@ -62,7 +64,7 @@ Create the export.
export PROJECT_ID=$(gcloud config get-value project)

gcloud logging sinks create $LOG_EXPORT_NAME \
pubsub.googleapis.com/projects/$PROJECT_ID/topics/$LOG_EXPORT_TOPIC_NAME \
$LOG_EXPORT_TOPIC_NAME pubsub.googleapis.com/projects/$PROJECT_ID/topics/$LOG_EXPORT_TOPIC_NAME \
--log-filter resource.type="global"
```

Expand All @@ -87,7 +89,7 @@ git clone https://github.com/GoogleCloudPlatform/professional-services.git

Deploy the Cloud Function.
```
gcloud functions deploy dlp-log-scrubber
gcloud functions deploy dlp-log-scrubber \
--runtime python37 \
--trigger-topic $LOG_EXPORT_TOPIC_NAME \
--entry-point process_log_entry \
Expand Down Expand Up @@ -125,4 +127,4 @@ The output will show the same log message with the email address, visa card numb

``"jsonPayload": {"message": "user: [EMAIL_ADDRESS], visa: [CREDIT_CARD_NUMBER], DOB: [DATE_OF_BIRTH]"}``

This example demonstrates the identification and replacement of a small number of data types (EMAIL_ADDRESS, CREDIT_CARD_NUMBER, and DATE_OF_BIRTH), however, the DLP API supports many more which can be found [here](https://cloud.google.com/dlp/docs/infotypes-reference)
This example demonstrates the identification and replacement of a small number of data types (EMAIL_ADDRESS, CREDIT_CARD_NUMBER, and DATE_OF_BIRTH), however, the DLP API supports many more which can be found [here](https://cloud.google.com/dlp/docs/infotypes-reference)