Platform Projects
How shared infrastructure such as a network, an ingress gateway or a compute cluster could be owned by one Celerity project and used by many applications
Design note
Platform projects and the shared infrastructure resource types they would hold are part of the vision and are not available yet. This page sets out the current design, which is not committed and may change before it is built.
Each Celerity application deploys on its own: one blueprint, one deployment, one rollback. That is the right default for a single application and the wrong one for a system of several. On the containerised AWS target today, every celerity/api gets its own ECS cluster and its own load balancer. Two applications behind two load balancers cost more than the same system behind one, and organisations that run several applications usually want a single entry point: one certificate inventory, one ingress allowlist and one place for host-based routing.
Celerity can already share a network across applications, with a celerity/vpc in referenced mode. v0 also adds an external mode to celerity/vpc and to the infrastructure resource types, such as buckets, data stores, queues, topics, config stores, caches and SQL databases, so that an application can use a network or resource that was created outside Celerity, in the same account or another one. That is part of v0 in its own right and doesn't depend on anything on this page.
The design on this page applies the same modes to ingress and compute, through two new resource types:
| Resource type | Summary |
|---|---|
celerity/gateway | A shared entry point that several applications attach their routes to |
celerity/cluster | A compute pool that several applications' containerised components can run on |
These are called platform primitives. They cover network, ingress and compute only. Data resources, such as data stores and SQL databases, stay owned by applications.
Platform projects
A platform project would be a distinct kind of Celerity project, recognised by the CLI, that holds shared infrastructure. It has a blueprint and a deploy configuration, like an application, but no handler code and no handler build.
Platform primitives are designed to be the main contents of a platform project, but they are not restricted to one. Just as an application project can own a celerity/vpc that other applications reference today, an application project could own a gateway or cluster for other applications to use. A platform project is the recommended owner for anything shared, not the only one.
Managed, referenced and external modes
Every platform primitive would support the same three modes that celerity/vpc has in v0, each with its own set of fields:
| Mode | Who owns the resource | Fields |
|---|---|---|
managed (default) | This blueprint. Celerity provisions the resource and owns its lifecycle. | The full specification. |
referenced | Another Celerity project that declares it in managed mode. | name only. The resource is found by its Celerity name. |
external | Something outside Celerity, such as CloudFormation, Terraform or the console. | name, plus target-specific identifiers under external. |
For the platform primitives, setting a field that doesn't belong to the chosen mode would be a validation error, not something silently ignored.
The modes let an application move between owners without changing anything else. An application can start attached to a load balancer that another tool created (external), then move to one owned by a Celerity platform project (referenced) by changing one field and redeploying.
Attaching to shared infrastructure
An application uses a shared resource by declaring it in its own blueprint, in referenced or external mode, and linking it to its components by label. This is exactly how a referenced celerity/vpc works today. No link crosses a blueprint boundary.
The owner provisions; attachers create only their own pieces. An application attaching to a gateway creates its target group, listener rule and security group rule. It never creates or modifies the load balancer, listener, certificate, cluster or network. This is the rule celerity/vpc in referenced mode already follows for network access controls.
Target-specific sizing stays in deploy configuration, as it does today, so blueprints stay portable.
Finding a referenced resource
A resource in referenced mode is found by its Celerity name, through a celerity:<type>:name tag on the resource, in the deploying account and region.
For celerity/gateway and celerity/cluster, the transformer would resolve the reference with a data source rather than a resource. A data source is resolved when changes are staged, needs no change to the deploy engine, and fails with a clear error when the referenced resource doesn't exist. celerity/vpc keeps its existing reference mode, which already resolves a network's many subnets, route tables and security groups.
Ownership
Celerity would not record which applications use a shared resource, and would not stop its owner from destroying or replacing it. Coordinating the removal of shared infrastructure is the organisation's responsibility. Two consequences follow:
- An application whose referenced resource has gone fails the next time its changes are staged, when the reference can't be resolved. Until then it keeps running against whatever still exists. A deleted gateway takes the application's traffic with it immediately.
- An application's own attachment resources, such as target groups, listener rules and security group rules, belong to the application. If the owner destroys a gateway first, the application's next destroy has to tolerate those resources already being gone.
The same applies to celerity/vpc today, and its specification would say so plainly.
Access
The owner of a shared resource can't know who uses it, so it can't grant access to them with resource policies. Instead, each application grants its own roles identity-based access, the same grants the transformer already creates for resources in the same blueprint, pointed at the shared resource. Sharing is limited to one account and region.
There are two caveats:
- A customer-managed KMS key needs a key policy that delegates to IAM, as the default key policy does. A key policy that names principals explicitly denies applications that reference it.
- An explicit deny in a resource policy on the shared resource overrides an application's own grant. An owner who adds one is responsible for allowing the applications that use the resource.
For the platform primitives, this rarely arises. An application attaching to a gateway needs no permissions on it, since its listener rules and target groups are its own resources. On a shared cluster, each application's tasks use their own task and execution roles, and the instance role belongs to the cluster's owner.
Resources in external mode follow the same rules: Celerity doesn't own them, and each application grants its own access.
Example
A platform project owns a network and a gateway:
version: 2025-11-02
transform: celerity-2026-02-27-draft
variables:
certificateArn:
type: string
allowedRanges:
type: string
resources:
network:
type: celerity/vpc
linkSelector:
byLabel:
network: shop
spec:
name: shop-network
preset: standard
gateway:
type: celerity/gateway
metadata:
labels:
network: shop
spec:
name: shop-gateway
tls:
certificateIds: ["${variables.certificateArn}"]
ingress:
allowedCidrs: "${split(variables.allowedRanges, \",\")}"An application project attaches its API to both:
version: 2025-11-02
transform: celerity-2026-02-27-draft
resources:
network:
type: celerity/vpc
linkSelector:
byLabel:
network: shop
spec:
name: shop-network
mode: referenced
gateway:
type: celerity/gateway
linkSelector:
byLabel:
gateway: shop
spec:
name: shop-gateway
mode: referenced
ordersApi:
type: celerity/api
metadata:
labels:
network: shop
gateway: shop
spec:
protocols: ["http"]
domain:
domainName: api.shop.example.com
basePaths: ["/v1"]Before the platform project exists, the same application can attach to a load balancer created by another tool by switching the gateway to external mode:
gateway:
type: celerity/gateway
linkSelector:
byLabel:
gateway: shop
spec:
name: shop-gateway
mode: external
external:
listenerId: "${variables.listenerArn}"
securityGroupIds: ["${variables.loadBalancerSecurityGroupId}"]What this design does not cover
- Landing zones. No accounts, organisations, service control policies, transit gateways or centralised egress.
- Load balancer configuration. No weighted target groups, header-based routing, OIDC on the load balancer or WAF rule authoring. Routing is derived from what applications already declare.
- Shared data resources. Data stores, SQL databases, caches and buckets stay owned by applications.
- Cross-account references. A resource in
referencedmode has to be in the same account and region as the applications that use it. A resource in another account can still be used inexternalmode, which v0 supports for the infrastructure resource types.
Last updated on