---
updatedAt: 2026-03-01T17:58:13.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/terraform/llms.txt
---

# JavaScript injection

akamai_botman_javascript_injection

Updates an existing JavaScript injection rule.

## Example

```json Declaration
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")
}
```

## Arguments

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](https://techdocs.akamai.com/bot-manager/reference/api) or [Bot Manager in Akamai Control Center](https://techdocs.akamai.com/bot-manager/docs/welcome) to create a configuration. Then, export your configuration or use the corresponding data source to get the JSON file.

# Sibling pages

* [Bot detection action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-bot-detection-action.md)
* [Bot category action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-bot-category-action.md)
* [Bot category exception](https://techdocs.akamai.com/terraform/docs/bmgr-rc-bot-category-exception.md)
* [Bot management settings](https://techdocs.akamai.com/terraform/docs/bmgr-rc-bot-management-settings.md)
* [Bot sequence](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-bot-category-item-sequence.md)
* [Challenge action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-challenge-action.md)
* [Challenge injection rules](https://techdocs.akamai.com/terraform/docs/bmgr-rc-challenge-injection-rules.md)
* [Conditional action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-conditional-action.md)
* [Content protection JavaScript injection rule](https://techdocs.akamai.com/terraform/docs/cpr-rc-javascript-injection-rule.md)
* [Content protection rule](https://techdocs.akamai.com/terraform/docs/cpr-rc-rule.md)
* [Content protection rule sequence](https://techdocs.akamai.com/terraform/docs/cpr-rc-rule-sequence.md)
* [Client-side security](https://techdocs.akamai.com/terraform/docs/bmgr-rc-client-side-security.md)
* [Custom-bot category](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-bot-category.md)
* [Custom-bot category action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-bot-category-action.md)
* [Custom-bot category sequence](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-bot-category-sequence.md)
* [Custom client](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-client.md)
* [Custom client sequence](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-client-sequence.md)
* [Custom-defined bot](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-defined-bot.md)
* [Custom deny action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-custom-deny-action.md)
* [Recategorized Akamai-defined bot](https://techdocs.akamai.com/terraform/docs/bmgr-rc-recategorized-akamai-defined-bot.md)
* [Serve alternate action](https://techdocs.akamai.com/terraform/docs/bmgr-rc-serve-alternate-action.md)
* [Transactional endpoint](https://techdocs.akamai.com/terraform/docs/bmgr-rc-transactional-endpoint.md)
* [Transactional endpoint protection](https://techdocs.akamai.com/terraform/docs/bmgr-rc-transactional-endpoint-protection.md)