oci_waas_protection_rule

This resource provides the Protection Rule resource in Oracle Cloud Infrastructure Web Application Acceleration and Security service.

Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see WAF Protection Rules. This operation can update or disable protection rules depending on the structure of the request body. Protection rules can be updated by changing the properties of the protection rule object with the rule’s key specified in the key field.

Example Usage

resource "oci_waas_protection_rule" "test_protection_rule" {
	#Required
	waas_policy_id = oci_waas_waas_policy.test_waas_policy.id
    key            = var.key
    
    #Optional
    action         = "DETECT"
      exclusions = {
        exclusions = ["example.com"]
        target     = "REQUEST_COOKIES"
      }
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Protection Rule * update - (Defaults to 20 minutes), when updating the Protection Rule * delete - (Defaults to 20 minutes), when destroying the Protection Rule

Import

ProtectionRules can be imported using the id, e.g.

$ terraform import oci_waas_protection_rule.test_protection_rule "waasPolicyId/{waasPolicyId}/key/{key}"