Reputation: 557
I am trying to use google cloud by going through a tutorial on formatting and filtering with gcloud. After entering gcloud projects list
on the cloud shell I get a single project listed in which one can read the PROJECT-ID. After entering the command that includes the project-id, gcloud projects create <ENTER-PROJECT-ID>
, I get the error message shown on the title of this post.
What is going wrong here ? What should I do ?
Thanks.
Upvotes: 0
Views: 1116
Reputation: 2498
The command gcloud projects create < ENTER-PROJECT-ID> is used to create a new project using the Cloud shell. You cannot use the project-id which is mentioned in projects list i.e., from gcloud projects list to create a new project, because the output results the projects which are already created so it results in the following error: The project ID you specified is already in use by another project. Please try an alternative ID.
If you want to use the project from the projects list you can use the following command:
$ gcloud config set project $MY_PROJECT_ID
Method -1:
To create a new project from cloud shell, use the gcloud projects create command:
$ gcloud projects create <project-id>
Where PROJECT_ID is the ID for the project you want to create. A project ID must start with a lowercase letter, and can contain only ASCII letters, digits, and hyphens, and must be between 6 and 30 characters.
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 create <project-id> --organization=ORGANIZATION_ID
$ gcloud projects create <project-id> --folder=FOLDER_ID
Method -2:
You can also create a project using the cloud console. Here are the steps:
Refer creating and managing projects for information.
Upvotes: 1