Deploy and maintain custom policies
Review policy changes, maintain repository content, and verify evaluation results after updated logic is activated.
Review and Test a Change
Review the requirement, metadata, logic, documentation, and test fixtures together. Keep rationale, audit instructions, and remediation consistent with the implemented conditions. Follow Test and debug policies, including missing-data and related-resource cases.
Record the policy ID, proposed Git revision, expected behavior changes, and test results in your team's review process. Preserve a known working revision for recovery.
Prepare Production Logic
Develop and test changes in wip.logic.yaml. When ready, use prod.logic.yaml for the production implementation and test that final file with its fixtures. Review the diff before submitting it to the connected repository's agreed branch.
The filename identifies production logic; the service must receive the repository change before it can evaluate the updated implementation.
Confirm Activation and Synchronization
Confirm these setup-specific details with your Technical Account Manager (TAM) and repository administrator:
- The connected repository and branch.
- Who activates policy changes and how synchronization is triggered.
- Expected synchronization and evaluation timing.
- How to establish which revision the service received.
- The recovery procedure if verification fails.
Complete the agreed review, merge, and activation process. A successful Git push or local test does not establish service activation. See Set up a private policy repository.
Verify a Subsequent Policy Run
After the expected activation time, inspect PolicyRun for the policy. Replace the project, dataset, and policy ID in this read-only query:
SELECT policyId, policyName, runTime, snapshotTime, completed, stats
FROM `YOUR_PROJECT.YOUR_CE_DATASET.PolicyRun`
WHERE policyId = '/ce/YOUR_ORG/YOUR_POLICY'
AND runTime >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
ORDER BY runTime DESC
LIMIT 10;
Check the execution time, input snapshot time, completion flag, and outcome counts. A completed run can contain incompliant or undetermined resources. Review individual outcomes through Find your first policy result.
PolicyRun does not document a Git revision field. Timing and changed counts alone cannot prove which revision executed; use the verification method agreed with your TAM. If no subsequent run appears, confirm synchronization and evaluation timing. See Review policy runs for further investigation.
Maintain Upstream Changes and Plan Rollback
Periodically review Cloudaware policy updates and integrate relevant changes using the upstream update workflow. Resolve conflicts carefully and retest affected policies, including those using shared extracts. Keep custom documentation and fixtures aligned with the resulting logic.
If a change needs to be withdrawn, coordinate restoration of the known working files through your team's Git review process and the agreed service activation procedure. Verify a subsequent run after restoration. Restoring repository files alone does not confirm that the service has switched implementations or that existing result history has changed.