Skip to main content
Attaches a Kosli policy to an environment (physical or logical). When this resource is destroyed, the policy is detached from the environment. Both environment_name and policy_name are immutable: changing either attribute will destroy the existing attachment and create a new one.
Both the policy and environment must exist before creating an attachment. Use the kosli_policy resource and kosli_environment resource to manage them.

Example usage

Import

Policy attachments can be imported using the composite ID environment_name/policy_name:

Schema

Required

  • environment_name (String) Name of the environment to attach the policy to. Changing this will force recreation of the resource.
  • policy_name (String) Name of the policy to attach. Changing this will force recreation of the resource.
Last modified on March 23, 2026