Match targets

akamai_appsec_match_targets

Get information about all match targets or a single match target for a security configuration.

Match targets determine which security policy should apply to an API, hostname, or path.

data "akamai_appsec_match_targets" "my-match-target" {
  config_id       = 12345
  match_target_id = 98765
}
output "my-match-target" {
  value = data.akamai_appsec_match_targets.my-match-target
}
my-match-target = {
      config_id       = 12345
      id              = "12345"
      json            = jsonencode(
            {
              matchTargets = {
                  websiteTargets = [
                      {
                          configId            = 12345
                          configVersion       = 2
                          defaultFile         = "NO_MATCH"
                          fileExtensions      = [
                              "exe",
                              "bat",
                              "sfx",
                              "dll",
                              "js",
                              "py",
                              "html",
                              "jar",
                            ]
                          hostnames           = [
                              "example.com",
                            ]
                          isNegativePathMatch = false
                          securityPolicy      = {
                              policyId = "gms1_12345"
                            }
                          targetId            = 98765
                          type                = "website"
                        },
                    ]
                }
            }
        )
      match_target_id = 98765
      output_text     = <<-EOT
            +---------------------------------+
            | websiteMatchTarget              |
            +---------+-------------+---------+
            | ID      | POLICYID    | TYPE    |
            +---------+-------------+---------+
            | 98765   | gms1_12345  | Website |
            +---------+-------------+---------+
        EOT
    }

Arguments

Send a security configuration ID in the body of the declaration to get details of all its match targets. Optionally, add a match target ID to get a single match target.

ArgumentRequiredDescription
config_idYour security configuration's ID.
match_target_idYour match target's ID.

Attributes

Returned to you are the match target details in JSON format.

AttributeDescription
config_idThe security configuration's ID.
idThe data source's ID.
match_target_idThe match target's ID.
output_textThe tabular report with details of the policy for your match targets.
jsonThe JSON-formatted definition of your match targets.