GuideReference
TrainingSupportCommunity
Guide

Malware policy

akamai_appsec_malware_policy

Creates, modifies, or deletes malware policies. Malware polices help you control what happens when a request is made to upload files of various types. These policies help you control how your website is protected from malicious uploads.

Scopes: Security configuration; malware protection

Example

terraform {
  required_providers {
    akamai = {
      source = "akamai/akamai"
    }
  }
}

provider "akamai" {
  edgerc = "~/.edgerc"
}

// USE CASE: User wants to create a malware policy for a security configuration by using a JSON-formatted rule definition.

data "akamai_appsec_configuration" "configuration" {
  name = "Documentation"
}
resource "akamai_appsec_malware_policy" "malware_policy" {
  config_id      = data.akamai_appsec_configuration.configuration.config_id
  malware_policy = file("${path.module}/malware_policy.json")
}
output "malware_policy_id" {
  value = akamai_appsec_malware_policy.malware_policy.malware_policy_id
}

Argument reference

This resource supports the following arguments:

  • config_id (Required). Unique identifier of the security configuration associated with the malware policy being modified.
  • malware_policy (Required). Path to a JSON file containing a malware policy definition.

Output options

The following option can be used to determine the information returned, and how that returned information is formatted:

  • malware_policy_id. Unique identifier of the modified or newly-created malware policy.