Skip to content

Commit

Permalink
NSOF-8280 provider: remove deprecated ufr catalog_app_risk field
Browse files Browse the repository at this point in the history
  • Loading branch information
fsafran-meta committed Dec 18, 2023
1 parent f8eefb1 commit ff2a3d0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 18 deletions.
1 change: 0 additions & 1 deletion docs/data-sources/url_filtering_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ This action determines what must be done according to this URL filtering rule if
- `apply_to_org` (Boolean) indicates whether this URL filtering rule applies to the org.
- `catalog_app_categories` (List of String) ENUM: `Instant Messaging`, `eCommerce`, `Content Management`, `Software Development`, `Project Management`, `Marketing`, `CRM`, `Telecommunications`, `Social and Communication`, `Productivity`, `Collaboration`, `Business and Finance`, `Utilities`, `IT Service Management`, `Social Networking`, `Office Document and Productivity`, `Cloud File Sharing`, `Web Meetings`, `Identity and Access Management`, `IT Services and Hosting`, `Webmail`, `Website Builder`, `Human Capital Management`, `Sales and CRM`, `E-commerce and Accounting`, `Streaming Media`, `Cloud Storage`, `Operations Management`, `Online Meeting`, `Supply Chain`, `Security and Compliance`, `Entertainment and Lifestyle`, `System and Network`, `Retail and Consumer Services`, `Health and Benefits`, `Data and Analytics`, `Education and References`, `Personal instant messaging`, `Legal`, `Other`, `Hosting Services`, `News and Media`, `Sales`, `Enterprise Resource Planning`, `Advertising`, `Travel and Transportation`, `Property Management`, `Government Services`, `Games`, `Code Hosting`.
List of catalog app categories that the URL filtering rule must restrict.
- `catalog_app_risk` (Number) Risk threshold to be used to restrict all catalog apps which has that risk or higher.
- `cloud_apps` (List of String) List of [cloud app](https://registry.terraform.io/providers/nsofnetworks/pfptmeta/latest/docs/resources/cloud_app) IDs which the URL filtering rule should restrict.
- `countries` (List of String) A list of countries in which this rule should be applied. Each country should be represented by a Alpha-2 code (ISO-3166). Enum: `AD`,`AE`,`AF`,`AG`,`AI`,`AL`,`AM`,`AO`,`AQ`,`AR`,`AS`,`AT`,`AU`,`AW`,`AX`,`AZ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TH`,`TJ`,`TK`,`TL`,`TM`,`TN`,`TO`,`TR`,`TT`,`TV`,`TW`,`TZ`,`UA`,`UG`,`UM`,`US`,`UY`,`UZ`,`VA`,`VC`,`VE`,`VG`,`VI`,`VN`,`VU`,`WF`,`WS`,`YE`,`YT`,`ZA`,`ZM`,`ZW`
- `description` (String)
Expand Down
1 change: 0 additions & 1 deletion docs/resources/url_filtering_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ This action determines what must be done according to this URL filtering rule if
- `apply_to_org` (Boolean) indicates whether this URL filtering rule applies to the org.
- `catalog_app_categories` (List of String) ENUM: `Instant Messaging`, `eCommerce`, `Content Management`, `Software Development`, `Project Management`, `Marketing`, `CRM`, `Telecommunications`, `Social and Communication`, `Productivity`, `Collaboration`, `Business and Finance`, `Utilities`, `IT Service Management`, `Social Networking`, `Office Document and Productivity`, `Cloud File Sharing`, `Web Meetings`, `Identity and Access Management`, `IT Services and Hosting`, `Webmail`, `Website Builder`, `Human Capital Management`, `Sales and CRM`, `E-commerce and Accounting`, `Streaming Media`, `Cloud Storage`, `Operations Management`, `Online Meeting`, `Supply Chain`, `Security and Compliance`, `Entertainment and Lifestyle`, `System and Network`, `Retail and Consumer Services`, `Health and Benefits`, `Data and Analytics`, `Education and References`, `Personal instant messaging`, `Legal`, `Other`, `Hosting Services`, `News and Media`, `Sales`, `Enterprise Resource Planning`, `Advertising`, `Travel and Transportation`, `Property Management`, `Government Services`, `Games`, `Code Hosting`.
List of catalog app categories that the URL filtering rule must restrict.
- `catalog_app_risk` (Number) Risk threshold to be used to restrict all catalog apps which has that risk or higher.
- `cloud_apps` (List of String) List of [cloud app](https://registry.terraform.io/providers/nsofnetworks/pfptmeta/latest/docs/resources/cloud_app) IDs which the URL filtering rule should restrict.
- `countries` (List of String) A list of countries in which this rule should be applied. Each country should be represented by a Alpha-2 code (ISO-3166). Enum: `AD`,`AE`,`AF`,`AG`,`AI`,`AL`,`AM`,`AO`,`AQ`,`AR`,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,`SZ`,`TC`,`TD`,`TF`,`TG`,`TH`,`TJ`,`TK`,`TL`,`TM`,`TN`,`TO`,`TR`,`TT`,`TV`,`TW`,`TZ`,`UA`,`UG`,`UM`,`US`,`UY`,`UZ`,`VA`,`VC`,`VE`,`VG`,`VI`,`VN`,`VU`,`WF`,`WS`,`YE`,`YT`,`ZA`,`ZM`,`ZW`
- `description` (String)
Expand Down
2 changes: 0 additions & 2 deletions internal/client/url_filtering_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type UrlFilteringRule struct {
ExemptSources []string `json:"exempt_sources,omitempty"`
AdvancedThreatProtection bool `json:"advanced_threat_protection"`
CatalogAppCategories []string `json:"catalog_app_categories"`
CatalogAppRisk int `json:"catalog_app_risk,omitempty"`
CloudApps []string `json:"cloud_apps"`
Countries []string `json:"countries,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
Expand All @@ -48,7 +47,6 @@ func NewUrlFilteringRule(d *schema.ResourceData) *UrlFilteringRule {
res.ExemptSources = ConfigToStringSlice("exempt_sources", d)
res.AdvancedThreatProtection = d.Get("advanced_threat_protection").(bool)
res.CatalogAppCategories = ConfigToStringSlice("catalog_app_categories", d)
res.CatalogAppRisk = d.Get("catalog_app_risk").(int)
res.CloudApps = ConfigToStringSlice("cloud_apps", d)
res.Countries = ConfigToStringSlice("countries", d)
res.ExpiresAt = d.Get("expires_at").(string)
Expand Down
5 changes: 2 additions & 3 deletions internal/provider/url_filtering_rule/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ With these measures, you can enforce company security policies and filter malici
"`News and Media`, `Sales`, `Enterprise Resource Planning`, `Advertising`, `Travel and Transportation`, " +
"`Property Management`, `Government Services`, `Games`, `Code Hosting`.\n" +
"List of catalog app categories that the URL filtering rule must restrict."
catalogAppRiskDesc = "Risk threshold to be used to restrict all catalog apps which has that risk or higher."
cloudAppsDesc = "List of [cloud app](https://registry.terraform.io/providers/nsofnetworks/pfptmeta/latest/docs/resources/cloud_app) IDs which the URL filtering rule should restrict. "
countriesDesc = "A list of countries in which this rule should be applied. Each country should be represented by a Alpha-2 code (ISO-3166). " +
cloudAppsDesc = "List of [cloud app](https://registry.terraform.io/providers/nsofnetworks/pfptmeta/latest/docs/resources/cloud_app) IDs which the URL filtering rule should restrict. "
countriesDesc = "A list of countries in which this rule should be applied. Each country should be represented by a Alpha-2 code (ISO-3166). " +
"Enum: " + common.CountriesDoc
expiresAtDesc = "Defines the rule expiration time. " +
"This can be useful when creating exceptions for users who need them for a limited period of time as an alternative for full disconnection from the proxy. " +
Expand Down
5 changes: 0 additions & 5 deletions internal/provider/url_filtering_rule/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ func DataSource() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
"catalog_app_risk": {
Description: catalogAppRiskDesc,
Type: schema.TypeInt,
Computed: true,
},
"cloud_apps": {
Description: cloudAppsDesc,
Type: schema.TypeList,
Expand Down
6 changes: 0 additions & 6 deletions internal/provider/url_filtering_rule/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ func Resource() *schema.Resource {
},
Optional: true,
},
"catalog_app_risk": {
Description: catalogAppRiskDesc,
Type: schema.TypeInt,
ValidateDiagFunc: common.ValidateIntRange(1, 8),
Optional: true,
},
"cloud_apps": {
Description: cloudAppsDesc,
Type: schema.TypeList,
Expand Down

0 comments on commit ff2a3d0

Please sign in to comment.