GuideReference
TrainingSupportCommunity

Selected hostnames

akamai_appsec_selected_hostnames

ūüöß

Deprecated

Hello. Just a note to let you know this resource is deprecated with a scheduled end-of-life in v7.0.0 of our provider.

We've made this change because the APPEND mode of the underlying API doesn't work well with Terraform's declarative nature and using it causes security configuration drift.

To protect your infrastructure from unintended changes or unexpected behavior, use the akamai_appsec_configuration resource instead.

Modifies the list of hostnames protected under by a security configuration.

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_selected_hostnames" "appsecselectedhostnames" {
  config_id = data.akamai_appsec_configuration.configuration.config_id
  hostnames = ["example.com"]
  mode      = "APPEND"
}

Argument reference

This resource supports the following arguments:

  • config_id (Required). Unique identifier of the security configuration associated with the hostnames.

  • hostnames (Required). JSON array of hostnames to be added or removed from the protected hosts list.

  • mode (Required). Indicates how the hostnames array is to be applied. Allowed values are:

    • APPEND. Hosts listed in the hostnames array are added to the current list of selected hostnames.
    • REPLACE. Hosts listed in the hostnames array overwrite the current list of selected hostnames: the ‚Äúold‚ÄĚ hostnames are replaced by the specified set of hostnames.
    • REMOVE, Hosts listed in the hostnames array are removed from the current list of select hostnames.