Examples: Resources
llms.txt lists every page for an agent
Show the whole prompt
Read https://intentius.io/chant/lexicons/gcp/examples/.
Write the Config Connector resources I describe in src/, starting from the closest example on the page (StorageBucket, ComputeInstance, Cloud SQL or IAM binding).
Run `npx chant build src/ --output manifests.yaml` and `npx chant lint src/` until both pass, and open a pull request with the source and manifests. Do not run kubectl against a cluster.
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`.Optional: hand this page to your coding agent
Read https://intentius.io/chant/lexicons/gcp/examples/.Write the Config Connector resources I describe in src/, starting from the closest example on the page (StorageBucket, ComputeInstance, Cloud SQL or IAM binding).Run `npx chant build src/ --output manifests.yaml` and `npx chant lint src/` until both pass, and open a pull request with the source and manifests. Do not run kubectl against a cluster.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`.StorageBucket
Section titled “StorageBucket”A Storage bucket with encryption, versioning, and lifecycle rules:
import { StorageBucket, GCP } from "@intentius/chant-lexicon-gcp";
export const bucket = new StorageBucket({ location: "US", storageClass: "STANDARD", uniformBucketLevelAccess: true, versioning: { enabled: true }, encryption: { defaultKmsKeyName: "projects/p/locations/us/keyRings/kr/cryptoKeys/key", }, lifecycleRule: [ { action: { type: "Delete" }, condition: { age: 365 } }, { action: { type: "SetStorageClass", storageClass: "NEARLINE" }, condition: { age: 30 } }, ],});ComputeInstance
Section titled “ComputeInstance”A Compute Engine VM with shielded VM configuration:
import { ComputeInstance, GCP } from "@intentius/chant-lexicon-gcp";
export const vm = new ComputeInstance({ machineType: "e2-medium", zone: "us-central1-a", bootDisk: { initializeParams: { sourceImageRef: { external: "projects/debian-cloud/global/images/debian-12", }, }, }, networkInterface: [{ networkRef: { name: "my-network" }, subnetworkRef: { name: "my-subnet" }, }], shieldedInstanceConfig: { enableSecureBoot: true, enableVtpm: true, enableIntegrityMonitoring: true, },});Cloud SQL
Section titled “Cloud SQL”A PostgreSQL instance with backups and high availability:
import { CloudSqlInstance } from "@intentius/chant-lexicon-gcp";
const { instance, database, user } = CloudSqlInstance({ name: "app-db", databaseVersion: "POSTGRES_15", tier: "db-custom-2-8192", region: "us-central1", backupEnabled: true, highAvailability: true, diskSize: 50,});
export { instance, database, user };IAM Binding
Section titled “IAM Binding”Grant a service account access to a resource:
import { IAMPolicyMember } from "@intentius/chant-lexicon-gcp";
export const binding = new IAMPolicyMember({ member: "serviceAccount:app@my-project.iam.gserviceaccount.com", role: "roles/storage.objectViewer", resourceRef: { apiVersion: "storage.cnrm.cloud.google.com/v1beta1", kind: "StorageBucket", name: "my-bucket", },});