Policy development reference
Find the file, logic, and command references used when developing custom policies.
Policy Files and Schemas
The policy repository stores definitions, executable logic, documentation, and test data as files. Use these references to locate files and understand their structure:
- Repository Structure: Main directories, repository root, and entity identifiers.
- Policy files and YAML schema: Descriptors, metadata, logic fields, extracts, and fixture structure. Detailed field documentation is still being developed.
For the authoring workflow, follow Structure a custom policy. Validate YAML against the schemas used by your repository and tool version.
Logic Operations and Types
Operations are declarative expressions used to retrieve values, compare data, combine conditions, and evaluate related resources. Their input and return types, treatment of empty values, and relationship behavior affect policy outcomes.
Use Policy logic reference for shared reference topics and Operations for the task-based operation index. These references are being expanded with detailed syntax and examples.
For a worked implementation, follow Write policy logic.
repo-manager Commands
repo-manager provides command groups for repository and policy development:
| Command Group | Purpose |
|---|---|
auth | Manage authorization profiles. |
env | Inspect the current environment. |
policies | Test policies, evaluate objects, and generate BigQuery scripts. |
schema | Update repository schemas. |
types | Import CMDB object definitions. |
docs | Generate repository documentation. |
Use the shared repo-manager guide for installation and configuration, and its CLI reference for command details. The policy development command reference is being drafted to collect the commands used by these workflows.
Check the installed command's --help output when confirming available flags. Follow Test and debug policies for practical testing and debugging steps.