Skip to content

Commit

Permalink
NSOF-8150 url_filtering_rule: modify ufr ISOLATION action to ISOLATE
Browse files Browse the repository at this point in the history
  • Loading branch information
fsafran-meta committed Nov 12, 2023
1 parent e9c1ba8 commit 7057bc3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/url_filtering_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ output "catalog_app" {

### Read-Only

- `action` (String) Enum: `ISOLATION`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.
- `action` (String) Enum: `ISOLATE`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.
This action determines what must be done according to this URL filtering rule if a user tries to reach a restricted URL.
- `advanced_threat_protection` (Boolean) Enables the first-rate security engine based on up-to-date web threat intelligence gathered from two decades of protecting the world's largest organizations from email-borne attacks.
- `apply_to_org` (Boolean) indicates whether this URL filtering rule applies to the org.
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/url_filtering_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ resource "pfptmeta_content_category" "web_mail_category" {
resource "pfptmeta_url_filtering_rule" "isolate_web_mails" {
name = "Isolate Web Mails"
apply_to_org = true
action = "ISOLATION"
action = "ISOLATE"
advanced_threat_protection = false
forbidden_content_categories = [pfptmeta_content_category.web_mail_category.id]
priority = 92
Expand Down Expand Up @@ -219,7 +219,7 @@ resource "pfptmeta_url_filtering_rule" "work_time" {

### Required

- `action` (String) Enum: `ISOLATION`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.
- `action` (String) Enum: `ISOLATE`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.
This action determines what must be done according to this URL filtering rule if a user tries to reach a restricted URL.
- `name` (String)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "pfptmeta_content_category" "web_mail_category" {
resource "pfptmeta_url_filtering_rule" "isolate_web_mails" {
name = "Isolate Web Mails"
apply_to_org = true
action = "ISOLATION"
action = "ISOLATE"
advanced_threat_protection = false
forbidden_content_categories = [pfptmeta_content_category.web_mail_category.id]
priority = 92
Expand Down
12 changes: 6 additions & 6 deletions internal/provider/acc_tests/url_filtering_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "pfptmeta_url_filtering_rule" "default_rule" {
name = "ufr 1"
description = "ufr desc 1"
sources = [pfptmeta_user.user.id]
action = "ISOLATION"
action = "ISOLATE"
advanced_threat_protection = false
forbidden_content_categories = [pfptmeta_content_category.cc.id]
priority = 50
Expand All @@ -100,7 +100,7 @@ resource "pfptmeta_url_filtering_rule" "default_rule" {
resource "pfptmeta_url_filtering_rule" "high_risk" {
name = "ufr 2 2"
sources = [pfptmeta_user.user.id]
action = "ISOLATION"
action = "ISOLATE"
cloud_apps = [pfptmeta_cloud_app.salesforce.id]
priority = 51
warn_ttl = 15
Expand All @@ -117,7 +117,7 @@ resource "pfptmeta_url_filtering_rule" "default_rule" {
name = "data source ufr"
description = "data source ufr desc"
apply_to_org = true
action = "ISOLATION"
action = "ISOLATE"
advanced_threat_protection = false
forbidden_content_categories = [pfptmeta_content_category.cc.id]
priority = 50
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestAccResourceURLFilteringRule(t *testing.T) {
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.default_rule", "apply_to_org", "false"),
resource.TestCheckResourceAttrPair("pfptmeta_url_filtering_rule.default_rule", "sources.0",
"pfptmeta_user.user", "id"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.default_rule", "action", "ISOLATION"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.default_rule", "action", "ISOLATE"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.default_rule", "threat_categories.#", "0"),
resource.TestCheckResourceAttrPair("pfptmeta_url_filtering_rule.default_rule", "forbidden_content_categories.0",
"pfptmeta_content_category.cc", "id"),
Expand All @@ -189,7 +189,7 @@ func TestAccResourceURLFilteringRule(t *testing.T) {
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.high_risk", "apply_to_org", "false"),
resource.TestCheckResourceAttrPair("pfptmeta_url_filtering_rule.high_risk", "sources.0",
"pfptmeta_user.user", "id"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.high_risk", "action", "ISOLATION"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.high_risk", "action", "ISOLATE"),
resource.TestCheckResourceAttrPair("pfptmeta_url_filtering_rule.high_risk", "cloud_apps.0",
"pfptmeta_cloud_app.salesforce", "id"),
resource.TestCheckResourceAttr("pfptmeta_url_filtering_rule.high_risk", "priority", "51"),
Expand Down Expand Up @@ -241,7 +241,7 @@ func TestAccDataSourceURLFilteringRule(t *testing.T) {
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "name", "data source ufr"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "description", "data source ufr desc"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "apply_to_org", "true"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "action", "ISOLATION"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "action", "ISOLATE"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "advanced_threat_protection", "false"),
resource.TestCheckResourceAttr("data.pfptmeta_url_filtering_rule.ufr", "threat_categories.#", "0"),
resource.TestCheckResourceAttrPair("data.pfptmeta_url_filtering_rule.ufr", "forbidden_content_categories.0",
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/url_filtering_rule/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
description = `The Proofpoint Web Security solution protects against web-based security threats by defining URL filtering rules
which include various content and threat categories, as well as cloud-based applications and tenant restrictions.
With these measures, you can enforce company security policies and filter malicious internet traffic in real time.`
actionDesc = "Enum: `ISOLATION`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.\n" +
actionDesc = "Enum: `ISOLATE`, `BLOCK`, `LOG`, `RESTRICT`, `WARN`.\n" +
"This action determines what must be done according to this URL filtering rule if a user tries to reach a restricted URL."
applyToOrgDesc = "indicates whether this URL filtering rule applies to the org."
sourcesDesc = "Users and groups on which the URL filtering rule should be applied."
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/url_filtering_rule/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Resource() *schema.Resource {
Description: actionDesc,
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: common.ValidateStringENUM("ISOLATION", "BLOCK", "LOG", "RESTRICT", "WARN"),
ValidateDiagFunc: common.ValidateStringENUM("ISOLATE", "BLOCK", "LOG", "RESTRICT", "WARN"),
},
"apply_to_org": {
Description: applyToOrgDesc,
Expand Down

0 comments on commit 7057bc3

Please sign in to comment.