GuideReference
TrainingSupportCommunity
Guide

Activations

akamai_appsec_activations

 Average processing time 5-7 minutes

Activates or deactivates a security configuration.

Security configurations activated on the staging network can be used for testing and fine-tuning; security configurations activated on the production network are used to protect your actual websites.

Note that activation fails if the security configuration includes one or more invalid hostnames. You can find these names in the resulting activation error message. To activate the configuration, remove the invalid hosts and try again.

Note also that the notification_emails attribute is currently ignored when an activation is updated and it is the only modified attribute.

Reference the version number of the security configuration being activated or, if you run terraform destroy, the version being deactivated.

resource "akamai_appsec_activations" "activation" {
  config_id           = data.akamai_appsec_configuration.configuration.config_id
  network             = "STAGING"
  note                = "This configuration was activated for testing purposes only."
  notification_emails = ["user@example.com"]
  version             = data.akamai_appsec_configuration.configuration.latest_version
}

In the preceding example, version is set to latest_version, a security configuration attribute that references the most recent version of the configuration. If you use latest_version (generally recommended) you’ll automatically activate the most recent configuration version. However, you can hard-code a specific version number if you prefer:

version = 5

Note that you do not have to upgrade to version 2.0.0. If you decide not to upgrade, the akamai_appsec_activations resource continues to function the way it has always functioned.

Scopes: Security configuration

Example

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

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

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

resource "akamai_appsec_activations" "activation" {
  config_id           = data.akamai_appsec_configuration.configuration.config_id
  network             = "STAGING"
  note                = "This configuration was activated for testing purposes only."
  notification_emails = ["user@example.com"]
  version             = data.akamai_appsec_configuration.configuration.latest_version
}

Argument reference

The following arguments are supported:

  • config_id (Required). Unique identifier of the security configuration being activated.

  • version (Required). Version of the security configuration to be activated.

  • notification_emails (Required). A list of email addresses that receive activation status notifications. An update of this argument's values without an additional change of version, status, or network does not trigger an activation, deactivation, or change in your state.

  • network (Optional). Network on which activation will occur; if not included, activation takes place on the staging network. Allowed values are:

    • PRODUCTION
    • STAGING
  • note (required). Additional information about your activation. An update of this argument's values without an additional change of version, status, or network does not trigger an activation, deactivation, or change in your state.

  • activate (Optional). Set to true to activate the specified security configuration or set to false to deactivate the configuration. If not included, the security configuration is activated.

Output options

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

  • status. Status of the operation. Valid values are:
    • ACTIVATED
    • DEACTIVATED
    • FAILED