Skip to content

Commit

Permalink
NSOF-6948 threat_category: enforce at least one of countries/types
Browse files Browse the repository at this point in the history
  • Loading branch information
hod-alpert committed Dec 11, 2022
1 parent 9dc38eb commit ccf3f7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/provider/threat_category/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func Resource() *schema.Resource {
"Remote Access Service", "Scanner", "Self Signed SSL", "SPAM URLs", "Spyware and Adware",
"Tor", "Undesirable", "Utility", "VPN"),
},
Optional: true,
Optional: true,
AtLeastOneOf: []string{"types", "countries"},
},
"countries": {
Description: countriesDesc,
Expand All @@ -79,7 +80,8 @@ func Resource() *schema.Resource {
"US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM",
"ZW"),
},
Optional: true,
Optional: true,
AtLeastOneOf: []string{"types", "countries"},
},
},
}
Expand Down

0 comments on commit ccf3f7d

Please sign in to comment.