GuideReference
TrainingSupportCommunity
Guide

Configuration

akamai_appsec_configuration

Get information about all security configurations or a given configuration by name.

// Get all
data "akamai_appsec_configuration" "my_configurations" {
}

output "configuration_list" {
  value = data.akamai_appsec_configuration.my_configurations
}

// Get one
data "akamai_appsec_configuration" "my_configuration" {
    name = "my appsec config"
}

output "my_appsec_config" {
  value = data.akamai_appsec_configuration.my_configuration
}
// Get all
Changes to Outputs:
  + configuration_list = {
      + config_id          = null
      + host_names         = null
      + id                 = "12345"
      + latest_version     = 1
      + name               = null
      + output_text        = <<-EOT
            +-------------------------------------------------------------------------------------------------+
            | Configurations                                                                                  |
            +---------+-----------------+--------------+-------------------------+----------------------------+
            |CONFIG_ID|NAME             |LATEST_VERSION|VERSION_ACTIVE_IN_STAGING|VERSION_ACTIVE_IN_PRODUCTION|
            +---------+-----------------+--------------+-------------------------+----------------------------+
            |12345    |my appsec config |11            |1                        |0                           |
            |67890    |my other config  |9             |0                        |0                           |
            +---------+-----------------+--------------+-------------------------+----------------------------+
        EOT
      + production_version = null
      + staging_version    = 1
    }

// Get one
Changes to Outputs:
  + my_appsec_config = {
      + config_id          = 12345
      + id                 = "12345"
      + host_names         = [
          + "my-appsec-configuration-ds.net",
        ]
      + latest_version     = 3
      + name               = "my appsec config"
        EOT
      + production_version = 2
      + staging_version    = 3
    }
variable "config_id" {
  type        = string
  description = "My security configuration ID"
  default     = "12345"
}
// local
config_id = data.akamai_appsec_configuration.my_configurations.configuration_list.config_id

// tvars
config_id = var.config_id

Argument

Leave the data source empty to return all configurations. Pass a name to return a specific configuration.

Attributes

Returned to you is a configurations set with high level details about your configurations.

AttributeDescription
config_idA security configuration's ID.
host_namesThe fully qualified domain name protected by the configuration.
output_textA table containing:

- config_id
- name
- latest_version
- version_active_in_staging
- version_active_in_production
latest_versionMost-recent version number of a given security configuration.
staging_versionVersion number of a given security configuration currently active in staging.
production_versionVersion number of a given security configuration currently active in production.