LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gcloud-projects

Google Cloud project management

TLDR

List projects
$ gcloud projects list
copy
Create a project
$ gcloud projects create [project_id]
copy
Describe a project
$ gcloud projects describe [project_id]
copy
Delete a project
$ gcloud projects delete [project_id]
copy
Set IAM policy
$ gcloud projects set-iam-policy [project_id] [policy.json]
copy

SYNOPSIS

gcloud projects command [options]

DESCRIPTION

gcloud projects provides commands for managing Google Cloud projects, which serve as the fundamental organizational unit in GCP. Every resource in Google Cloud belongs to exactly one project, and projects provide the basis for billing, access control, and resource isolation.The command group supports the full project lifecycle including creation, deletion, and restoration of soft-deleted projects. It also handles IAM policy management at the project level, controlling which principals have access to project resources.Projects contain settings like project ID (immutable), project name (changeable), and project number (assigned by Google). Understanding project management is essential for organizing resources and managing costs in Google Cloud, as billing is tracked per project.

SUBCOMMANDS

list

List projects the active account has permission to view.
create PROJECTID [**--name=**NAME] [**--organization=**ORG] [**--folder=**FOLDER_]
Create a new project. ID must be 6–30 characters, lowercase letters, digits, or hyphens.
describe PROJECTID_
Show metadata (name, number, lifecycle state, labels) for a project.
delete PROJECTID_
Mark a project for deletion (it is soft-deleted for 30 days before permanent removal).
get-iam-policy PROJECTID_
Print the IAM policy attached to the project.
set-iam-policy PROJECTID POLICYFILE
Replace the IAM policy with the one defined in the JSON or YAML file.
add-iam-policy-binding PROJECTID **--member=**MEMBER **--role=**ROLE_
Add a single member/role binding to the project's IAM policy.
remove-iam-policy-binding PROJECTID **--member=**MEMBER **--role=**ROLE_
Remove a member/role binding from the project's IAM policy.
update PROJECTID_
Update project metadata such as display name or labels.
move PROJECTID **--organization=**ORG | **--folder=**FOLDER_
Move a project to a different organization or folder.
undelete PROJECTID_
Restore a soft-deleted project within the 30-day grace period.

SEE ALSO

Copied to clipboard
Kai