Skip to main content
Lists Kosli controls in the organization for use with terraform query (requires Terraform >= 1.14), so existing controls can be discovered and brought under Terraform management without hand-writing one import block per control.
Controls is a beta feature and must be enabled for your organization; API requests return 403 Forbidden otherwise.
The Kosli list endpoint does not return policies_referencing, so when resource data is included in query results that attribute is always reported as an empty list. Archived controls are only returned when archived = true is set.

Example usage

Place list blocks in a .tfquery.hcl file and run terraform query (requires Terraform >= 1.14):
Use terraform query -generate-config-out=generated.tf to generate import blocks and resource configuration for the discovered controls. To manage the resulting controls, see the kosli_control resource.

Schema

Optional

  • archived (Boolean) Include archived controls in the results. Defaults to false.
  • search (String) Case-insensitive substring to match against control names and identifiers.
Last modified on July 13, 2026