Local Testing
Show the whole prompt
Read https://intentius.io/chant/local-testing/overview/.
In `examples/local-cloud-trio`, run `npm install`, then `npx chant run aws --no-record`, `npx chant run azure --no-record` and `npx chant run gcp --no-record`, each against its local Floci emulator. They need Docker, `aws` and `curl`.
Show me the output of each run, and tell me which resource each one verified. Keep every `endpoint` override in place.
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/local-testing/overview/.In `examples/local-cloud-trio`, run `npm install`, then `npx chant run aws --no-record`, `npx chant run azure --no-record` and `npx chant run gcp --no-record`, each against its local Floci emulator. They need Docker, `aws` and `curl`.Show me the output of each run, and tell me which resource each one verified. Keep every `endpoint` override in place.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 synthesizes each cloud’s native format — CloudFormation for AWS, ARM for Azure, Config Connector for GCP — and can apply that output to a local emulator instead of a real account. That runs the deployer code you use in production against an emulated cloud API, at no cost and offline.
The applier issues the same calls it would against AWS, Azure, or GCP; only the endpoint changes. A green local run has exercised synthesis, serialization, and apply.
“Offline” here means after the image is pulled: chant emulator up needs the container image once, and every call after that is loopback. See Network Egress for what each phase reaches.
Nothing on the path shells out to a CLI. chant build is a pure function — TypeScript in, a validated spec-native artifact out. The applier then speaks the cloud’s own protocol directly: awsApply calls the CloudFormation API, azApply PUTs ARM resources, gcpApply calls the GCS/PubSub/IAM REST APIs. It doesn’t wrap aws, az, or gcloud. So a green local run tests the real deployer.
What runs locally
Section titled “What runs locally”Each cloud keeps its native format and its own local target. The emulators are the Floci suite — LocalStack-compatible, Quarkus/GraalVM native, one per cloud.
| Cloud | Resource shape | Synthesizes to | Applied by | Emulator | Port |
|---|---|---|---|---|---|
| AWS | S3, IAM, Lambda, … | CloudFormation | awsApply | floci | 4566 |
| Azure | Storage, KeyVault, … | ARM template | azApply | floci-az | 4577 |
| GCP | GCS, PubSub, Secrets, … | Config Connector | gcpApply | floci-gcp | 4588 |
The resource description is identical in shape across clouds. What differs is how each cloud’s apply reaches the emulator — because each cloud’s control plane is different.
Why three different appliers
Section titled “Why three different appliers”There is no shared apply verb off-cluster. Each cloud’s local story forced a different path:
- AWS —
awsApplycalls the CloudFormation API directly (create-or-update the stack, then poll it to a settled state) against Floci’s emulated CloudFormation control plane. The stack is the deploy boundary. - Azure — floci-az has no
Microsoft.Resources/deploymentsprovider, soaz deploymentcan’t run locally.azApplyreads the ARM template and PUTs each resource directly to floci-az’s ARM resource CRUD, in dependency order, resolvingreference()/listKeys()from live responses. - GCP — GCP has no native deployment service.
gcpApplymaps each Config Connector resource to its underlying REST call and drives create/update/delete itself, including long-running operations and orphan pruning.
In every case the deployer code is the thing under test, run against a real cloud-shaped API.
Pick your path
Section titled “Pick your path”Each page walks the full loop for one cloud: boot the emulator, build the stack, apply it, verify the resource, tear down.
The tri-cloud example
Section titled “The tri-cloud example”examples/local-cloud-trio is the reference for all three paths in one project. The same infrastructure — an object store — is described once per cloud and deployed to each cloud’s emulator.
cd examples/local-cloud-trionpm install
chant run aws # S3 bucket → Flocichant run azure # storage account → floci-azchant run gcp # GCS bucket → floci-gcpEach op boots that cloud’s emulator, builds the stack, applies it, verifies the resource exists, and tears the emulator down. The project needs Docker plus aws and curl on PATH — no cloud account.
The chant.config.ts loads all three cloud lexicons so chant run resolves each cloud’s applier activity:
export default { lexicons: ["aws", "azure", "gcp", "fountain"] } satisfies ChantConfig;From local to real cloud
Section titled “From local to real cloud”The emulator is only an endpoint. The same stacks and ops target a real account by dropping the endpoint override — and, for AWS, unsetting AWS_ENDPOINT_URL. Nothing about the resources or the apply logic changes, which is what makes a green local run meaningful.