Skip to content

Commit

Permalink
DLP-1474: Predefined profiles must be imported for use
Browse files Browse the repository at this point in the history
  • Loading branch information
jongiddy committed Nov 22, 2023
1 parent 3b75169 commit 7c57758
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
33 changes: 27 additions & 6 deletions docs/resources/dlp_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,41 @@ They are referenced in Zero Trust Gateway rules.

```terraform
# Predefined profile
resource "cloudflare_dlp_profile" "example_predefined" {
import {
to = cloudflare_dlp_profile.creds
id = "0da42c8d2132a9ddaf714f9e7c920711/c8932cc4-3312-4152-8041-f3f257122dc4"
}
resource "cloudflare_dlp_profile" "creds" {
account_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "Example Predefined Profile"
name = "Credentials and Secrets"
type = "predefined"
allowed_match_count = 0
allowed_match_count = 3
entry {
name = "Mastercard Card Number"
enabled = true
name = "Amazon AWS Access Key ID"
id = "d8fcfc9c-773c-405e-8426-21ecbb67ba93"
}
entry {
name = "Union Pay Card Number"
enabled = false
id = "2c0e33e1-71da-40c8-aad3-32e674ad3d96"
name = "Amazon AWS Secret Access Key"
}
entry {
enabled = true
id = "4e92c006-3802-4dff-bbe1-8e1513b1c92a"
name = "Microsoft Azure Client Secret"
}
entry {
enabled = false
id = "5c713294-2375-4904-abcf-e4a15be4d592"
name = "SSH Private Key"
}
entry {
enabled = true
id = "6c6579e4-d832-42d5-905c-8e53340930f2"
name = "Google GCP API Key"
}
}
Expand Down
33 changes: 27 additions & 6 deletions examples/resources/cloudflare_dlp_profile/resource.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# Predefined profile
resource "cloudflare_dlp_profile" "example_predefined" {
import {
to = cloudflare_dlp_profile.creds
id = "0da42c8d2132a9ddaf714f9e7c920711/c8932cc4-3312-4152-8041-f3f257122dc4"
}

resource "cloudflare_dlp_profile" "creds" {
account_id = "0da42c8d2132a9ddaf714f9e7c920711"
name = "Example Predefined Profile"
name = "Credentials and Secrets"
type = "predefined"
allowed_match_count = 0
allowed_match_count = 3

entry {
name = "Mastercard Card Number"
enabled = true
name = "Amazon AWS Access Key ID"
id = "d8fcfc9c-773c-405e-8426-21ecbb67ba93"
}

entry {
name = "Union Pay Card Number"
enabled = false
id = "2c0e33e1-71da-40c8-aad3-32e674ad3d96"
name = "Amazon AWS Secret Access Key"
}
entry {
enabled = true
id = "4e92c006-3802-4dff-bbe1-8e1513b1c92a"
name = "Microsoft Azure Client Secret"
}
entry {
enabled = false
id = "5c713294-2375-4904-abcf-e4a15be4d592"
name = "SSH Private Key"
}
entry {
enabled = true
id = "6c6579e4-d832-42d5-905c-8e53340930f2"
name = "Google GCP API Key"
}
}

Expand Down

0 comments on commit 7c57758

Please sign in to comment.