Google Cloud Projects
Google Cloud projects form the basis for creating, enabling, and using all Google Cloud services including managing APIs, enabling billing, adding and removing collaborators, and managing permissions for Google Cloud resources.
he following are used to identify your project:
-
Project name: A human-readable name for your project.
The project name isn’t used by any Google APIs. You can edit the project name at any time during or after project creation. Project names do not need to be unique.
-
Project ID: A globally unique identifier for your project.
A project ID is a unique string used to differentiate your project from all others in Google Cloud. You can use the Google Cloud console to generate a project ID, or you can choose your own. You can only modify the project ID when you’re creating the project.
Project ID requirements:
- Must be 6 to 30 characters in length.
- Can only contain lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Cannot end with a hyphen.
- Cannot be in use or previously used; this includes deleted projects.
- Cannot contain restricted strings, such as
google
andssl
.
-
Project number: An automatically generated unique identifier for your project.
gaddepradeep@cloudshell:~$ gcloud projects create -h
Usage: gcloud projects create [PROJECT_ID] [optional flags]
optional flags may be --enable-cloud-apis | --folder | --help | --labels |
--name | --organization | --set-as-default
For detailed information on this command and its flags, run:
gcloud projects create --help
gaddepradeep@cloudshell:~$
gcloud projects create PROJECT_ID
gcloud projects create PROJECT_ID --organization=ORGANIZATION_ID
gcloud projects create PROJECT_ID --folder=FOLDER_ID
To create a project with an organization or a folder as parent, use the --organization
or --folder
flags. As a resource can only have one parent, only one of these flags can be used:
gcloud projects describe PROJECT_ID
Shutting down (deleting) projects
You can shut down projects using the Google Cloud console or the projects.delete
method in the API. A project must have a lifecycle state of ACTIVE
to be shut down in this way.
This method immediately marks a project to be deleted. A notification email is sent to the user who initiated the delete operation and the Technical category contacts that are listed in Essential Contacts on a best effort basis; if the notification fails to send, the project is still marked to be deleted. If there’s no contact in the Technical category, the fallback contact isn’t notified.
A project that is marked for deletion isn’t usable. If the project has a billing account associated with it, that association is broken and isn’t reinstated if the project delete operation is canceled. After 30 days, the project is fully deleted. Until it is fully deleted, the project might still be visible, although it isn’t usable.
To stop the project delete process during the 30-day period, see the steps to restore a project. You can verify the number of days left in the 30-day period by using the gcloud projects describe
Google Cloud CLI method.
Welcome to Cloud Shell! Type "help" to get started.
To set your Cloud Platform project in this session use “gcloud config set project [PROJECT_ID]”
gaddepradeep@cloudshell:~$ gcloud projects list
Listed 0 items.
gaddepradeep@cloudshell:~$ gcloud projects describe pradeepgadde
createTime: '2023-04-05T02:23:10.714Z'
lifecycleState: DELETE_REQUESTED
name: pradeepgadde
projectId: pradeepgadde
projectNumber: '616276308247'
gaddepradeep@cloudshell:~$