Security policy

akamai_appsec_security_policy

Create a new, blank security policy, a new policy pre-configured with default settings, or clone an existing one.

// Create new with default settings
resource "akamai_appsec_security_policy" "my-security-policy" {
  config_id              = 12345
  default_settings       = true
  security_policy_name   = "my-policy"
  security_policy_prefix = "abc1"
}

// Copy an existing policy
resource "akamai_appsec_security_policy" "my-security-policy" {
  config_id                      = 12345
  create_from_security_policy_id = "gms1_98765"
  security_policy_name           = "my-policy"
  security_policy_prefix         = "abc1"
}

Arguments

Pass your configuration ID and policy details to create or update your resource.

ArgumentRequiredDescription
config_idYour security configuration's ID.
security_policy_nameA descriptive name for your security policy
security_policy_prefixA four-character, alphanumeric value of your choice that's added to your security policy's ID upon creation.

Use a prefix that can help you identify the security policy within your larger security configuration.

It must be unique and not in use.
default_settingsWhen set to true, this assigns default setting values to the new policy. When false, this creates a blank security policy. Defaults to true if not set.
create_from_security_policy_idThe ID of an existing security policy from which the new policy will be cloned.

Attributes

There is no default standard output. Upon creation, the last line of the process log contains a success message with your resource's id.

Adding an output block returns the security_policy_id along with the policy details you provided upon create.