Rapid rules

akamai_appsec_rapid_rules

Get details about all of your rapid rules or details of a single rule by ID.

data "akamai_appsec_rapid_rules" "my_rules" {
  config_id          = 12345
  security_policy_id = "myrr_12345"
  rule_id            = 7654321
}

output "my_conditions" {
  value = data.akamai_appsec_rapid_rules.my_rules
}
my_conditions = {
  config_id              = 12345
  default_action         = "akamai_managed"
  enabled                = true
  id                     = "12345:\"myrr_12345\""
  include_expiry_details = null
  output_text            = <<-EOT
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | RapidRulesWithConditionExceptionDS                                                                                                                                                     |
    +---------+-------------------------------------------------------------+--------+-------+--------------+------------------+------------+---------------------+---------+----------------+
    | ID      | NAME                                                        | ACTION | LOCK  | ATTACK GROUP | GROUP EXCEPTIONS | EXCEPTIONS | ADVANCED EXCEPTIONS | EXPIRED | EXPIRE IN DAYS |
    +---------+-------------------------------------------------------------+--------+-------+--------------+------------------+------------+---------------------+---------+----------------+
    | 7654321 | Citrix NetScaler Memory Disclosure Detected (CVE-2025-5777) | deny   | false | PLATFORM     | False            | False      | False               |         |                |
    +---------+-------------------------------------------------------------+--------+-------+--------------+------------------+------------+---------------------+---------+----------------+
  EOT
  rapid_rules            = [
    {
      action                 = "deny"
      attack_group           = "PLATFORM"
      attack_group_exception = jsonencode({})
      condition_exception    = jsonencode({})
      expire_in_days         = null
      expired                = null
      id                     = 7654321
      lock                   = false
      name                   = "Citrix NetScaler Memory Disclosure Detected (CVE-2025-5777)"
    },
  ]
  rule_id                = 7654321
  security_policy_id     = "myrr_12345"
}

Arguments

Pass both a configuration and security policy ID to get all rule details or provide a rule ID to a single rule's details.

ArgumentRequiredDescription
configuration_id✔️A security configuration ID.
security_policy_id✔️A security policy ID.
rule_idA rapid rule ID.
include_expiry_detailsWhen set to true, it returns expiry details, including the expired and expire_in_days attributes. Defaults to false if not set.

Attributes

Returned to you are high level details about your rapid rules.

Attribute Description
id The data source's ID.
enabled Whether a rule set is in use.
default_action A rule's default action setting.
rapid_rules A list of your rapid rules. Contains:
  • id. The rule's ID.
  • name. The rule's name.
  • action. The rule's action.
  • lock. Whether the rule's action is locked.
  • attack_group. The attack group ID.
  • attack_group_exception. The attack group's exception.
  • condition_exception. The rapid rule's exceptions.
  • expired. Whether the rule has already expired. This field is populated only if the rule has an expiry date set and has already expired.
  • expire_in_days. The number of days remaining before the rule expires. This field is populated only if the rule has an expiry date set and has not yet expired.
output_text A tabular representation of the rule settings.