A walkthrough for adding a new cloud provider (or expanding an existing experimental one) to ICE. Designed to be self-contained - clone, follow the steps, get a green deploy.
If you're new to the codebase, skim architecture overview first so the terms below land.
A provider in ICE is the combination of:
- A
Provideridentifier and metadata inpackages/constants/src/providers.ts. - A deployer class implementing
ProviderDeployerinpackages/core/src/deploy/providers/. - (Optional) An importer that walks the cloud and produces a canvas.
- An auth adapter that turns user-supplied credentials into an SDK client.
- Per-resource handlers for the resource types you want to support.
- Provider-readiness entry in
PROVIDER_READINESS(stable/experimental/design-only).
For the deploy path to light up end-to-end, you need #1, #2, #4, and the handlers in #5 for at least one resource type.
Edit packages/constants/src/providers.ts:
export type Provider = 'aws' | 'gcp' | 'azure' | 'kubernetes' | 'alibaba' | 'oci' | 'digitalocean' | 'your-cloud';
export const PROVIDER_READINESS: Record<Provider, ProviderReadiness> = {
// …
'your-cloud': 'experimental', // start here; bump to 'stable' once you've earned it
};
export const CLOUD_PROVIDERS: CloudProviderMeta[] = [
// …
{
id: 'your-cloud',
name: 'Your Cloud',
shortName: 'YC',
description: 'Short pitch.',
icon: 'your-cloud',
color: '#xxxxxx',
readiness: PROVIDER_READINESS['your-cloud'],
},
];Also update the .d.ts and .js siblings (these are hand-kept in sync - see providers.ts for the layout).
Create packages/core/src/deploy/providers/your-cloud-deployer.ts. Implement the ProviderDeployer interface from packages/core/src/deploy/providers/types.ts. The shape:
import type { DeployOptions, ResourceDeployResult, ProviderDeployer } from '../types.js';
export class YourCloudDeployer implements ProviderDeployer {
provider = 'your-cloud';
async initialize(options: DeployOptions): Promise<void> {
// Spin up SDK clients from options.auth_credentials.
}
async cleanup(): Promise<void> {
// Destroy clients, close pools.
}
async create(
type: string,
name: string,
properties: Record<string, unknown>,
_options: Record<string, unknown>,
): Promise<ResourceDeployResult> {
// Dispatch on `type.startsWith('your-cloud.x.y')`.
// Each branch calls a private `create_x_y` helper that returns provider_id.
}
async update(/* same shape */): Promise<ResourceDeployResult> {
/* … */
}
async destroy(/* same shape */): Promise<ResourceDeployResult> {
/* … */
}
}
export function create_your_cloud_deployer(): YourCloudDeployer {
return new YourCloudDeployer();
}Look at aws-deployer.ts for the minimum-viable shape (~500 lines, 3 handlers). For something fuller, gcp-deployer.ts + providers/gcp/handlers/* is the reference implementation (20+ resource types, handler-per-file).
Wire the new class into packages/core/src/deploy/providers/index.ts and re-export from a thin packages/providers/your-cloud/ package if you want a public surface.
Authentication lives next to the deployer. For GCP it's packages/core/src/deploy/providers/gcp/auth.ts. Two key responsibilities:
- Take user-supplied credentials from the in-app Settings → Providers form.
- Validate them (a read-only call like "list projects" /
sts:GetCallerIdentity) so we fail fast with a useful error instead of mid-deploy.
The validate function is registered in packages/core/src/deploy/providers/registry.ts and called by the gateway on credential save.
For each concept your provider should support, add a ProviderVariant to the concept's blueprint under packages/blocks/src/common/concepts/<concept>/blueprint.ts:
providers: ['aws', 'gcp', 'azure', 'your-cloud'],
providerVariants: [
// …
{
provider: 'your-cloud',
dataOverrides: {
providerDisplayName: 'Your Cloud Storage Buckets',
},
},
],Concepts are provider-agnostic in the palette - adding your provider here is what lights it up for users.
Mirror the layout in packages/core/src/deploy/providers/__tests__/. The minimum:
- A unit test asserting
createdispatches to the right private helper for each resource type. - A unit test asserting
destroycalls succeed when the provider API returns NOT_FOUND (treat as idempotent). - A deploy-translation integration test for one happy path.
If you're adding to an experimental provider, also add a scenario YAML in e2e/deployment-tests/scenarios/ for the resource you implemented and run pnpm test:scenarios against your sandbox.
- Update
PROVIDER_READINESSinpackages/constants/src/providers.tsonce handlers are stable. That value drives every UI badge. - Update the ROADMAP if the parity story moves.
The pull request template has the checklist we run through on review. The important parts for a provider PR:
pnpm typecheckandpnpm test:unitare green.- Manual: I deployed at least one resource end-to-end against my own cloud account.
- A screenshot of the canvas with at least one block in the deployed state.
- architecture overview - overall flow.
- core-engine - translate / plan / apply.
packages/core/src/deploy/providers/gcp/- reference implementation.packages/core/src/deploy/providers/aws-deployer.ts- minimum-viable shape.PROVIDER_READINESS- the source-of-truth for what's stable vs experimental.