The reference validator runs the same regex and enum checks as this page, in any of three runtimes: a CLI for shell pipelines, a TypeScript module for Node and edge, and a Python package for terraform plans and CI gates. Returns exit-code 1 on any non-conforming label set.
Single static binary. Reads from stdin, file, or labels-as-args. Best for shell scripts and CI gates.
brew install ifo4/tap/ufms-validate # or curl -fsSL https://get.ifo4.org/ufms | sh ufms-validate < labels.yaml ufms-validate --gcp-project ifo4-production
Zero-dep ESM module. Works in Cloud Run, edge functions, and the Next.js build. 14 KB minified.
npm install @ifo4/ufms-validator
import { validate } from '@ifo4/ufms-validator';
const result = validate({
ifo4_cc: 'cc-1011',
ifo4_svc: 'matrix-advisor',
// ...
});
if (!result.ok) process.exit(1);Pure-Python implementation. Use it inside Terraform sentinel checks, Airflow DAGs, or pytest fixtures.
pip install ifo4-ufms
from ifo4_ufms import validate
result = validate({
"ifo4_cc": "cc-1011",
"ifo4_svc": "matrix-advisor",
# ...
})
assert result.ok, result.errorsDrop this into Cloud Build, GitHub Actions, or GitLab CI and any merge that ships a non-compliant label set fails the build before it deploys.
steps:
- name: 'gcr.io/cloud-builders/gcloud'
id: 'ufms-gate'
entrypoint: 'bash'
args:
- '-c'
- |
curl -fsSL https://get.ifo4.org/ufms | sh
ufms-validate \
--terraform-plan tfplan.json \
--fail-on-missing \
--report ufms-report.json
options:
logging: CLOUD_LOGGING_ONLY