@@ -150,6 +150,35 @@ resource "google_network_security_security_profile" "default" {
150150 }
151151}
152152```
153+ ## Example Usage - Network Security Security Profile Url Filtering
154+
155+
156+ ``` hcl
157+ resource "google_network_security_security_profile" "default" {
158+ provider = google-beta
159+ name = "my-security-profile"
160+ parent = "organizations/123456789"
161+ description = "my description"
162+ type = "URL_FILTERING"
163+
164+ url_filtering_profile {
165+ url_filters {
166+ priority = 1
167+ filtering_action = "ALLOW"
168+ urls = ["*example.com", "*about.example.com", "*help.example.com"]
169+ }
170+ url_filters {
171+ priority = 2
172+ filtering_action = "DENY"
173+ urls = ["*restricted.example.com"]
174+ }
175+ }
176+
177+ labels = {
178+ foo = "bar"
179+ }
180+ }
181+ ```
153182
154183## Argument Reference
155184
@@ -159,7 +188,7 @@ The following arguments are supported:
159188* ` type ` -
160189 (Required)
161190 The type of security profile.
162- Possible values are: ` THREAT_PREVENTION ` , ` CUSTOM_MIRRORING ` , ` CUSTOM_INTERCEPT ` .
191+ Possible values are: ` THREAT_PREVENTION ` , ` URL_FILTERING ` , ` CUSTOM_MIRRORING ` , ` CUSTOM_INTERCEPT ` .
163192
164193* ` name ` -
165194 (Required)
@@ -182,6 +211,11 @@ The following arguments are supported:
182211 The threat prevention configuration for the security profile.
183212 Structure is [ documented below] ( #nested_threat_prevention_profile ) .
184213
214+ * ` url_filtering_profile ` -
215+ (Optional, [ Beta] ( https://terraform.io/docs/providers/google/guides/provider_versions.html ) )
216+ The url filtering configuration for the security profile.
217+ Structure is [ documented below] ( #nested_url_filtering_profile ) .
218+
185219* ` custom_mirroring_profile ` -
186220 (Optional)
187221 The configuration for defining the Mirroring Endpoint Group used to
@@ -265,6 +299,34 @@ The following arguments are supported:
265299 Threat action override. For some threat types, only a subset of actions applies.
266300 Possible values are: ` ALERT ` , ` ALLOW ` , ` DEFAULT_ACTION ` , ` DENY ` .
267301
302+ <a name =" nested_url_filtering_profile " ></a >The ` url_filtering_profile ` block supports:
303+
304+ * ` url_filters ` -
305+ (Optional)
306+ The configuration for action to take based on domain name match.
307+ A domain name would be checked for matching filters through the list in order of highest to lowest priority,
308+ and the first filter that a domain name matches with is the one whose actions gets applied.
309+ Structure is [ documented below] ( #nested_url_filtering_profile_url_filters ) .
310+
311+
312+ <a name =" nested_url_filtering_profile_url_filters " ></a >The ` url_filters ` block supports:
313+
314+ * ` filtering_action ` -
315+ (Required)
316+ The action to take when the filter is applied.
317+ Possible values are: ` ALLOW ` , ` DENY ` .
318+
319+ * ` urls ` -
320+ (Optional)
321+ A list of domain matcher strings that a domain name gets compared with to determine if the filter is applicable.
322+ A domain name must match with at least one of the strings in the list for a filter to be applicable.
323+
324+ * ` priority ` -
325+ (Required)
326+ The priority of the filter within the URL filtering profile.
327+ Must be an integer from 0 and 2147483647, inclusive. Lower integers indicate higher priorities.
328+ The priority of a filter must be unique within a URL filtering profile.
329+
268330<a name =" nested_custom_mirroring_profile " ></a >The ` custom_mirroring_profile ` block supports:
269331
270332* ` mirroring_endpoint_group ` -
0 commit comments