A project is a container for resources inside an organization. Resources such as secrets belong to one project, and IAM policies can grant access to one project and what’s in it. Projects can sit in folders, which only organize them.
Identifiers
| Field | Example | Notes |
|---|---|---|
id |
0199a3c4-7a2b-7c1d-8e3f-4a5b6c7d8e9f |
UUID. API paths use it. |
slug |
prj_g7h8i9j0k1l2 |
prj_ and 12 lowercase letters and digits. Generated, unique and never changes. |
resourceName |
ezgh::org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2 |
Names the project in IAM policies. |
name |
web |
1 to 100 characters. Needn’t be unique. |
folderId |
0199a3c5-… or null |
The folder it sits in; null at the top of the organization. |
The ezgh CLI accepts a project’s ID, slug or name.
What belongs to a project
- Resources. Secrets are created in a project, under
/v1/organizations/{orgId}/projects/{projectId}/secrets. A resource’s name starts with its project’s:ezgh:us-west-1:org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2:sec_…. - Access. A policy whose resources are
ezgh:*:org_…:prj_…(the project) andezgh:*:org_…:prj_…:*(everything in it) grants access to that project only. See IAM. Each project can also give users, groups and bots its own full or read-only access: see Project access. - Quotas. Some quotas apply per project, such as Network’s VPCs per project. See Service quotas.
In the console, the project switcher at the top of the sidebar selects the project that project-scoped pages, such as Secrets, show.
List projects
You see the projects you’re allowed to list (projects.list).
Open Projects. Projects show in a tree with their folders.
ezgh projects listcurl https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects \
-H "Authorization: Bearer $EZGH_API_KEY"See ListProjects.
Create a project
You need projects.create. An organization can have 10 projects by default; over the limit,
creating one returns 409 quota_exceeded. See Project quota.
To create a project in a folder, or give people access to it as you create it, see
Create a project.
Open Projects and click Create project. See Create a project.
ezgh projects create webcurl -X POST https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects \
-H "Authorization: Bearer $EZGH_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "name": "web" }'The response is 201 with the project. See CreateProject
and idempotency keys.
Rename a project
You need projects.update on the project. Renaming changes only name.
Open the project, then the Settings tab. Change its name and click Rename.
ezgh projects update web --name storefrontcurl -X PATCH https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID \
-H "Authorization: Bearer $EZGH_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "storefront" }'See UpdateProject.
Move a project
You need projects.update on the project; nothing on the folders. Moving changes only
folderId: nobody’s access changes, and the project’s ID, slug and resource name stay the same.
Open the project, then the Settings tab. Under Location, choose a folder and click Move.
ezgh projects move storefront --folder Engineering/Web
ezgh projects move storefront --root--root moves the project to the top of the organization.
curl -X PATCH https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID \
-H "Authorization: Bearer $EZGH_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "folderId": "'$FOLDER_ID'" }'"folderId": null moves the project to the top of the organization. A PATCH can send name,
folderId or both. See UpdateProject.
Delete a project
You need projects.delete on the project. Deletion takes effect at once and can’t be undone.
The project’s own
access policies are deleted and detached from
everyone, and the project stops counting toward the organization’s project quota.
Open the project, then the Settings tab, and click Delete project. Type the project’s name to confirm; the dialog lists who loses the project’s own access.
ezgh projects delete storefrontThe CLI asks for confirmation; --yes skips it.
curl -X DELETE https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID \
-H "Authorization: Bearer $EZGH_API_KEY"The response is 204. See DeleteProject.