Projects

Where every resource lives: pick a project, create into it, move between them.

What it is

Every resource lives in exactly one project. Pick a project in the console's top bar: every list shows what is in it, and what you create goes into it. Each organization has a Default project, which holds everything not put in another one; it can be renamed and is never deleted. Resources that existed before projects are all in Default.

A project is not a tag. Tags are free labels on top (env=prod, team=payments), and saved views group by them; a resource's project changes only when someone moves it. See Tags, saved views & topology.

How to

Pick a project

The project picker sits next to the service switcher in the top bar. All projects shows everything, and new resources then go into Default. Every create form shows the project it creates into under Project and tags, and changing it there changes the top bar's choice too.

Create, rename or delete a project

Projects in the sidebar, or:

dcloud projects projects create --name Webshop
dcloud projects projects update --slug webshop --name "Web shop"
dcloud projects projects delete --slug webshop --yes

The slug (webshop) is made from the name and never changes: policies and scripts name a project by it. Renaming changes only the name people read. Deleting a project moves what is in it to Default; nothing else is deleted, and tags stay.

Create into a project from code

Every client sends the project's slug as the X-EWS-Project header. It decides where a create goes and what a list shows, and it is what ews:RequestProject reads. Without it, a create goes into Default and a list shows every project. A slug that names no project refuses the create (400, code: unknown_project) before anything is made.

Client For the whole client For one call
dcloud DCLOUD_PROJECT=webshop --project webshop
TypeScript SDK new DcloudClient({ project: 'webshop' }) client.rds.instances.create({...}, { project: 'webshop' })
Python SDK Client(project="webshop") request_options=RequestOptions(project="webshop")
Go SDK dcloud.Options{Project: "webshop"} dcloud.WithProject("webshop")
Terraform provider "dcloud" { project = "webshop" } (or DCLOUD_PROJECT) project = "webshop" on the resource
MCP — the tool's project argument

The SDKs also read DCLOUD_PROJECT. In Terraform, a resource's project is read back from where it lives; changing it moves the resource (a plan shows an update, never a replace), and changing the provider's project moves nothing that exists. List data sources show the provider's project. (ews_project is a saved view, a tag query, not a project.)

dcloud rds instances create --identifier orders --project webshop --tags env=prod

Move a resource

The Project line under a resource's tags has Move…, or:

dcloud projects projects move --resource-type rds:db --resource-id ewdb-… --project webshop

Its parts go with it: a Kubernetes cluster's node groups and their machines, a database's endpoint load balancer, backup bucket and passwords, a VPC's subnets and NAT gateway. Moving needs projects:MoveResource on the project it leaves and on the one it enters.

Turn a project tag into projects

An organization that grouped resources with a project tag before projects existed sees an offer on the Projects page: one project per value, and every resource carrying that value moved into it. Only the organization's owner can do it, signed in to the console, and nothing happens until they click. Resources someone already moved stay where they are, and the tag itself is kept.

Limit someone to one project

The condition key ews:ResourceProject is the project of the resource a request names. This policy gives a person everything in Postgres, DNS and Compute, in the project webshop only:

{
  "Version": "2024-01-01",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["rds:*", "dns:*", "ec2:*"],
      "Resource": "*",
      "Condition": { "StringEquals": { "ews:ResourceProject": "webshop" } }
    }
  ]
}

They can read, change and delete what lives in webshop, and nothing in another project. For a list or a create, which name no single resource, the key is the project the request names (X-EWS-Project, --project, or the console's picker): they list and create in webshop by picking it, and a list or create anywhere else is refused. A part of something (a cluster's node group, a database's login) is in its parent's project. Move a resource out of webshop and it is out of their reach.

ews:RequestProject is the project a create goes into (default when none is named), for a policy that only governs where things are created.

See cost and set a budget by project

In the cost explorer, group or filter by Project: every resource's cost counts under the one project it lives in, Default for what lives in no other one, and organization-wide meters (registry storage, request counts) under "(organization-wide)". Saved view groups by saved tag queries, as before.

A budget can cover A project ({ "type": "resourceProject", "projectId": "<id>" } in the API): what lives in it, as resources are moved in and out. Budgets on a saved view or on tags keep working.

Limit what a project may use

On a project's page, Quotas in this project › Set a limit: at most so many databases, machines, clusters, buckets… in this project, so one team cannot use up the organization's quota. A create or a Move into the project past its limit is refused with the usual 409 QuotaExceeded, quota.project set and a message naming the project. The organization's own quota still applies first; a limit above it changes nothing.

Limits count resources of one kind that land in the project a create names. Parts (subnets, node groups, snapshots) follow their owner's project and cannot be limited per project; neither can sizes and rates (vCPUs, GiB, requests per second). A project that already holds more than a new limit keeps what it has; only new ones are refused. Two creates at the same moment can pass a limit by one.

Reference

Where a new resource lives

Created as Lives in
Anything a person creates The project named by X-EWS-Project or the picker; else Default
A part of something (a node group, a subnet, a snapshot, a database's endpoint) Its parent's project
A copy of something (a restored database, a fork) The project named, else its source's

API

Operation Permission
GET /projects/api/projects projects:ListProjects
POST /projects/api/projects projects:CreateProject
PATCH /projects/api/projects/{slug} projects:UpdateProject
DELETE /projects/api/projects/{slug} projects:DeleteProject, and projects:MoveResource on Default
GET /projects/api/resource projects:ListProjects
POST /projects/api/move projects:MoveResource on both projects
GET /projects/api/projects/{slug}/quotas projects:ListProjects
PUT / DELETE /projects/api/projects/{slug}/quotas/{quotaId} projects:UpdateProject
POST /projects/api/from-tag the organization's owner, signed in

A project's RN is rn:ews::<org>:projects:project/<slug>. Resource names (RNs) of everything else do not change with projects.

Lists from the API and CLI

Every list of resources that live in projects follows X-EWS-Project (--project or DCLOUD_PROJECT in the dcloud, project in the SDKs, Terraform data sources and MCP tools) the way the console's lists follow the picker: name a project and the list holds what lives in it; name none and it holds every project's resources. A project that does not exist lists nothing.

What is not supported

  • Limits per project on sizes and rates (vCPUs, GiB), and on parts.
  • A VPC can be used from every project of the organization.
Did this page help you?