GuideReference
TrainingSupportCommunity

JavaScript injection

akamai_botman_javascript_injection

Updates an existing JavaScript injection rule.

Example

data "akamai_appsec_configuration" "configuration" {
  name = "Documentation"
}

resource "akamai_botman_javascript_injection" "javascript_injection" {
  config_id            = data.akamai_appsec_configuration.configuration.config_id
  security_policy_id   = "gms1_134637"
  javascript_injection = file("${path.module}/javascript_injection.json")
}

Argument reference

This resource supports the following arguments:

  • config_id (Required). Unique identifier of the security configuration associated with the JavaScript injection rule.
  • security_policy_id (Required). Unique identifier of the security policy associated with the JavaScript injection rule.
  • javascript_injection (Required). JSON-formatted collection of JavaScript injection settings and setting values. In the preceding sample code, the syntax file("${path.module}/javascript_injection.json") points to the location of a JSON file containing the JavaScript injection settings and values. Use the Bot Manager API or Bot Manager in Akamai Control Center to create a configuration. Then, export your configuration or use the corresponding data source to get the JSON file.