Skip to content

Importing Existing YAML

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/lexicons/gcp/importing-yaml/.
Import the Config Connector YAML files I name into TypeScript under src/ with `npx chant import`, and check that `npx chant build src/ --output manifests.yaml` writes the same resources.
Run `npx chant lint src/`, and open a pull request with src/ and a list of anything the import left out or changed. Keep the original YAML.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.

chant import reads Config Connector YAML and writes TypeScript.

Input YAML → parse → generate TypeScript → export typed resources

The importer reads multi-document YAML, identifies Config Connector resources by their cnrm.cloud.google.com apiVersion, and writes a typed constructor call for each.

Input YAML:

apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
name: my-bucket
spec:
location: US
uniformBucketLevelAccess: true

Generated TypeScript:

import { Bucket } from "@intentius/chant-lexicon-gcp";
export const myBucket = new Bucket({
metadata: { name: "my-bucket" },
location: "US",
uniformBucketLevelAccess: true,
});

The import pipeline:

  • Only handles Config Connector resources (cnrm.cloud.google.com apiVersion)
  • Non-CC resources (standard K8s Deployments, Services) are filtered out
  • Resource references are preserved as literal values, not typed refs
  • Multi-document YAML is fully supported

chant