General settings

akamai_apr_general_settings

📘

Hello. Just a note to let you know the underlying API on which this resource is built is general release and has been vetted, but because this is a new feature for our Terraform provider, we've given it beta label.

This status just means we've paused for a bit to get your feedback to make sure this resource works like you need and expect.

Create and update general protection settings for your API operations.

resource "akamai_apr_general_settings" "my_apr_settings" {
  config_id          = 12345
  security_policy_id = "abcd_123456"
  general_settings   = jsonencode(
    {
      "accountProtection": true,
      "originSignalHeader": true,
      "originUserIdInRequestHeader": true,
      "usernameInRequestHeader": true
    }
  )
}
my_apr_settings = {
  config_id          = 12345
  id                 = "12345:abcd_123456"
  json               = jsonencode(
    {
      accountProtection  = false
      metadata           = {
        configId         = 12345
        configVersion    = 1
        securityPolicyId = "abcd_123456"
      }
      originSignalHeader = true
    }
  )
  security_policy_id = "abcd_123456"
}

Arguments

Pass all arguments to set protections on an API operation.

ArgumentRequiredDescription
config_id✔️Your security configuration's ID.
security_policy_id✔️Your security policy's ID.
general_settings✔️The API operation's protection settings. Possible settings are:
  • account_protection. Whether to enable account protection on the operation.
  • origin_signal_header. Whether to enable the origin signal header.
  • origin_user_id_in_request_header. Whether to enable the origin user ID in the Akamai request header.
  • username_in_request_header. Whether to enable the username in the Akamai request header.

Attributes

There is no standard output for this resource as the changes are reflected in your state file.

Note: There is an id attribute returned as well. It is an ID for the run of the resource and is not needed downstream anywhere.

AttributeDescription
account_protectionWhether account protector is enabled.
metadataData about your security configuration. Contains:
  • config_id. Your security configuration's ID.
  • config_version. The security configuration's version.
  • security_policy_id. Your security policy's ID.
origin_signal_headerWhether the origin signal header is enabled.
origin_user_id_in_request_headerWhether the origin user ID in the Akamai request header is enabled.
username_in_request_headerWhether the username in the Akamai request header is enabled.