I'm trying to set up Terraform for use with GCP and I'm having trouble creating a new project from the gcloud cli: Terraform Lab
The command I'm using is
gcloud projects create testproject
The error I get over and over is:
ERROR: (gcloud.projects.create) Project creation failed. The project ID you specified is already in use by another project. Please try an alternative ID.
Here's what I did so far:
Here's the error I get when I try to create a new project from the "gcloud init" command:
Enter a Project ID. Note that a Project ID CANNOT be changed later.
Project IDs must be 6-30 characters (lowercase ASCII, digits, or
hyphens) in length and start with a lowercase letter. vincetest
WARNING: Project creation failed: HttpError accessing
<https://cloudresourcemanager.googleapis.com/v1/projects?alt=json>:
response: <{'status': '409', 'content-length': '268', 'x-xss
-protection': '1; mode=block', 'x-content-type-options': 'nosniff',
'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer',
'server': 'ESF', '-content-encoding': 'gzip',
'cache-control': 'private', 'date': 'Fri, 28 Sep 2018 18:38:11 GMT',
'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;
charset=UTF-8'}>, content <{
"error": {
"code": 409,
"message": "Requested entity already exists",
"status": "ALREADY_EXISTS",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ResourceInfo",
"resourceName": "projects/vincetest"
}
]
}
}
>
Creating the project from the web page console worked fine.
Project IDs are unique across all projects. That means if any user ever had a project with that ID, you cannot use it. testproject
is pretty common, so it's not surprising it's already taken.
Try a more unique ID. One common technique is to user your organization's name as a prefix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With