CMDB Git Bridge: On-the-Fly Git Repository for CMDB Values
Serve Helm values from the IaCConsole CMDB over the Git protocol, without maintaining a GitOps repository.
CMDB Git Bridge is a read-only Git endpoint in iacconsole-api. It builds an in-memory Git repository from your CMDB dimensions on every request. ArgoCD, Flux, or the git CLI see ordinary branches and JSON files; the source of truth stays in IaCConsole.
It is not a Terraform state backend and not a pushable Git server. Terraform and OpenTofu state stays in your own backend. CMDB Git Bridge only publishes configuration values from the CMDB.
Why use it for IaC automation
Traditional GitOps stores desired values as commits. When a pipeline publishes a new container image on every build, that means a commit per build in a values repository — plus hooks, branch protection, and repo maintenance around files that are mostly one-line changes.
With CMDB Git Bridge, CI updates one CMDB dimension through the REST API or MCP. The next Git poll gets a new commit hash with the current values. You keep the familiar ArgoCD/Helm workflow, but the “GitOps repo” is generated on demand instead of stored.
How iacconsole-api implements it
Git endpoints
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/v1/git/{orgName}/info/refs?service=git-upload-pack |
Git service discovery for clone/fetch |
POST |
/v1/git/{orgName}/git-upload-pack |
Sends the generated packfile |
Only git-upload-pack is implemented. There is no git-receive-pack, so you cannot push to a CMDB Git Bridge repo. Writes go through the dimension REST API, the console UI, the CLI, or MCP.
Authentication
Git clients use HTTP Basic auth. Send your IaCConsole API token as the password:
git clone https://iacconsole:YOUR_API_TOKEN@api.iacconsole.com/v1/git/my-org
The API also accepts the token in the username field, but putting it in the password is the standard Git credential pattern.
On-demand repository generation
For each request, the API:
- Reads dimensions from the
inventory.dimensionscollection, scoped to your account andorgName. - Writes one file per dimension at
<dimKey>/<dimValue>.jsoncontaining the pretty-printeddimDataJSON. - Creates a branch for every
workspace.masteris the default HEAD; other workspaces are available asrefs/heads/<workspace>. - For non-master branches, overlays
masterwith the target workspace: a dimension that exists in both is taken from the workspace. This gives branches a full view without duplicating the database. - Builds a deterministic tree and commit — sorted keys, fixed author/timestamp — so unchanged CMDB data produces the same commit hash, and any value change produces a new one.
The generated repository has one commit per branch and no parent history. Do not expect git log to show your change history; audit data lives in the CMDB, not in Git objects.
Data model example: service catalog image tag
A service is a dimension with dimKey: service. Keep the Service Catalog’s required cmd and workDir fields, and add image for your Helm chart:
{
"services": {
"api-server": {
"cmd": "node dist/index.js",
"workDir": "app",
"image": "registry.example.com/checkout/api-server:1.4.2"
}
}
}
If this dimension is orgName: payments, workspace: master, dimKey: service, dimValue: checkout, CMDB Git Bridge publishes it as:
service/checkout.json
CI can update only the image after a successful build:
curl -X POST \
'https://api.iacconsole.com/v1/dimension/payments/service/checkout?workspace=master&source=ci&readonly=false' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"services": {
"api-server": {
"cmd": "node dist/index.js",
"workDir": "app",
"image": "registry.example.com/checkout/api-server:1.4.3"
}
}
}'
ArgoCD sees a new commit hash on master on its next refresh and re-renders the Helm chart with the new image. No values repository commit is needed.
ArgoCD + Helm integration
The API emits JSON, and JSON is valid YAML. Helm accepts these files as values files, so no separate YAML generation step is required.
Register the generated repo as an ArgoCD repository secret:
apiVersion: v1
kind: Secret
metadata:
name: iacconsole-values
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
type: git
url: https://api.iacconsole.com/v1/git/payments
username: iacconsole
password: YOUR_API_TOKEN
Then use an external Helm chart with the generated JSON as its values source:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: checkout
namespace: argocd
spec:
project: default
destination:
server: https://kubernetes.default.svc
namespace: payments
sources:
- repoURL: https://charts.example.com
chart: microservice
targetRevision: 2.4.0
helm:
valueFiles:
- $values/service/checkout.json
- repoURL: https://api.iacconsole.com/v1/git/payments
targetRevision: master
ref: values
$values points at the root of the CMDB Git Bridge repository. The chart can live in any Helm or OCI chart repository; CMDB Git Bridge supplies only the values file. You can point targetRevision at a workspace other than master for preview environments.
Workspaces, history, and verification gates
- Staging: write changes with
?workspace=preview-123. The generated branch contains all ofmasterplus your overrides, so a preview Application can render the full result. - Promotion: after review, write the same dimension with
?workspace=master. There is no merge command; promotion is a dimension write. - Audit: each dimension stores
sourceandreadOnly. CLI runs report execution history throughPOST /v1/history/{orgName}/{workspace}/{tofiName}. Use those records for audit rather thangit log. - Verification gates: run your approval or plan checks before the
masterwrite. MCP blocksset_dimensionanddelete_dimensionagainstmaster; REST writes by CI are trusted, so protect that token and put your gate in front of it. The Git endpoint itself only reads.
Working with the repo locally
git clone https://iacconsole:YOUR_API_TOKEN@api.iacconsole.com/v1/git/payments
cd payments
git checkout master
Treat the clone as a disposable snapshot. Since each response regenerates a single commit with no parent, do not rebase against a stale local commit. Refresh with:
git fetch --force origin master
git reset --hard FETCH_HEAD
Limitations
- Read-only: clone and fetch work; push does not.
- One commit per branch; no incremental
git log. - Files are JSON only; Helm consumes them directly as values.
- File paths are fixed to
<dimKey>/<dimValue>.json. - No built-in pull requests or merge API. Promotion is an explicit dimension update.
See also
- Service Catalog — service dimension schema and deployment kinds
- API Guide — dimension endpoints and history
- AI Integration via MCP — agent access and master workspace protection
Frequently asked questions
What is the CMDB Git Bridge?
It is a read-only, on-the-fly Git repository generated from IaCConsole CMDB dimensions, used to feed Helm values files to ArgoCD or Flux.
Can I push commits to it?
No. Only git-upload-pack is implemented. Updates happen through the REST API, UI, CLI, or MCP, then Git clients see a new snapshot.
Does it store Terraform state?
No. Terraform and OpenTofu state stays in your backend. The CMDB Git Bridge serves configuration values from the CMDB.
Does it generate YAML?
It writes JSON files, which are valid Helm values files. ArgoCD passes them to the chart as values.
Where is the change history?
Dimension metadata and CLI execution history are stored in the CMDB. The generated Git repo is a single snapshot, not a commit log.