GuideReference
Guide

Rule

akamai_appsec_rule

Modifies a Kona Rule Set rule's action, conditions, and exceptions.

resource "akamai_appsec_rule" "rule" {
  config_id           = 12345
  security_policy_id  = "abcd_1234567"
  rule_id             = 7654321
  rule_action         = "deny"
  condition_exception = file("${path.module}/condition_exception.json")
}

Argument reference

This resource supports the following arguments:

  • config_id (Required). Unique identifier of the security configuration associated with the Kona Rule Set rule being modified.

  • security_policy_id (Required). Unique identifier of the security policy associated with the Kona Rule Set rule being modified.

  • rule_id (Required). Unique identifier of the rule being modified.

  • rule_action - (Required) The action taken when a rule is triggered. If your policy is in ASE_AUTO mode, use condition_exception instead.

    • alert. Record the event.
    • deny. Block the request.
    • denycustom{custom_deny_id}. Take the action specified by the custom deny.
    • none. Take no action. or none to take no action.
  • condition_exception (Optional). Path to a JSON file containing a description of the conditions and exceptions to be associated with a rule.