Cannot create bucket even if another user no longer own the bucket name - google-cloud-storage

We are transferring Google cloud storage bucket name (naked domain name) from one user to another. Since we no longer have active account, who own the bucket name, the bucket was deleted from Google cloud storage. And then recreate the same bucket name, but the console panel continue deny to create the bucket with the following error.
The bucket you tried to create is a domain name owned by another user.
It has been several days, the bucket was deleted.

In order to create a bucket that maps to a domain name, the account creating the bucket must be the registered owner of the domain name. Presumably the old account is registered as the owner of the domain. You're going to want to have the new account go through the domain verification process at Google Webmaster Tools: https://www.google.com/webmasters/tools/
Here's some more documentation about how to claim ownership of the domain name: https://support.google.com/webmasters/answer/35179

Related

How to migrate GCS bucket from one project to another in different account

How to transfer GCS bucket from one account to another account without downloading data
Is Transfer Service for Cloud Data Chargable?
You don't transfert GCS bucket from an account to another one. The GCS bucket belong to a project.
You can grant new user on the project, on only on the bucket to allow them access. You can also create another bucket, in another project, with another name (project id and bucket name are global resources, 2 can't have the same name all around the world) and use Transfer service to duplicate the data. The service is free of charge if the data stay in the same region (if not, egress cost will be applied)

why when i create google storage bucket it will remind me the buck name exists?

when i create google storage bucket in my own google account, some name i put it will reminds the name already exists.
Is there only one namespace for create bucket and the bucket name not bind to user account?
It seems strange, only have one namespace.
GCS buckets are in a global namespace:
https://cloud.google.com/storage/docs/naming-buckets#considerations

Creating domain Storage Buckets

message: '{"ResourceType":"storage.v1.bucket","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"errors":[{"domain":"global","message":"The
bucket you tried to create requires domain ownership verification.","reason":"forbidden"}],"message":"The
bucket you tried to create requires domain ownership verification.","statusMessage":"Forbidden","requestPath":"https://www.googleapis.com/storage/v1/b","httpMethod":"POST","suggestion":"Consider
granting permissions to 1058303916595#cloudservices.gserviceaccount.com"}}'
Above is the message when I tried to create storagebuckets via Deployment Manager. I already tried adding 1058303916595#cloudservices.gserviceaccount.com to the Verified owners of that domain on the Google Search Console but still no luck
To create a Storage Bucket with domain name, your account should be a verified owner of the domain, not the cloudservices.gserviceaccount.com. Additional information can be found in Domain-Named Bucket Verification documentation.
You have to login to your domain name provider with the same account that you use to login to the Google Cloud Console. Then request a new domain name, go to Google Cloud Console App Engine page. Go to Settings and then click on Custom domains and then Add a custom domain. After adding the domain name there and verifying it, you will be able to create a bucket name using that domain as name. But make sure to do so with the same account that the domain was verified with.

Cannot create a bucket in google cloud with the name even if i have deleted the previous one?

I created a bucket with my domain name in google cloud to host my static website there. I deleted it for some reason and now iam not able to create a same named bucket. Is there any thing i cannot do that again. Then is there any way i can create bucket to point my website.

storage.buckets().insert() for xyz.domain.com bucket not working

I am using the GCS JSON API via Java and a Service Account. My code to insert objects, delete objects, and copy objects all works great. And I can successfully create new buckets with storage.buckets().insert() so long as the bucket name is NOT based on my domain name (i.e. creating bucket “454393-test-bucket” works, but creating bucket "test334.domain.com" does NOT work). Note that I CAN create domain name based buckets from the developer console when logged in as the project owner with no problem, and can also later insert/copy/delete objects from that bucket via the service account.
There must be something basic I am doing wrong.
Here is my code:
Bucket newBucket = new Bucket().setName(bucketName);
storage.buckets().insert(Utils.GAE_PROJECT_NAME, newBucket).execute();
Here is the error I get:
Uncaught exception from servlet
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "The bucket you tried to create is a domain name owned by another user.",
"reason" : "forbidden"
} ],
"message" : "The bucket you tried to create is a domain name owned by another user."
}
The account which verifies ownership of the bucket must be the same account that creates the bucket. If your account is the verified owner of your domain, your account must be used to create the bucket (and not a service account owned by a project owned by your account). When you are creating buckets from the developer console, you're using your own account, which has access.
Good news, though. You can add your service account to the list of owners of the domain, and it will gain this permission. On Webmaster Central, you can add and remove owners for domains.
Go to https://www.google.com/webmasters/verification/home?hl=en
Click on your domain
Click "Add an owner"
Put in the email address of the service account.
More on this is available in the Google Cloud Storage documentation: https://developers.google.com/storage/docs/bucketnaming#verification