-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Error creating S3 bucket: BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. #54
Comments
@organicnz is you did not destroy the bucket before creating this is going to happen. |
Just tried it again and it spews the same error :)
|
Hi @organicnz This is normal behavior with S3 buckets, when buckets have deleted the names takes some time to be released so that it can be reused, this is not a bug on the module or terraform, this is how the AWS S3 api works |
Yeah, looks like it is, still cleaning up S3 buckets in region us-west-2, but when it passed that step in us-west-1 or us-east-1 it drops another error with
|
are you cleaning the .terraform dir and such when switching to another region? this is to create the bucket for the state to be stored so it should not exist in the state until is created. I will assume you switched to another region because you do not have a state so in that case, you need to reinitialize the project which can be done by |
Thank you, I haven't cleaned it up before you mentioned and my deep apologies that it's not a bug as it was labelled initially.
|
Any conclusion ? I got same weird BucketAlreadyExists error |
Hi mate, have you tried to create a new unique S3 bucket? I tried on a different AWS account and it helped to resolve this issue :) |
I have same issue - I'm creating bucket that never existed before with just random name but receive |
@sev3ryn Note that S3 bucket names must be globally unique amongst all AWS customers. |
yes, thanks, thats was it. Interesting what is aws reasoning behind that if bucket is not even public :) |
To make your bucket name unique, you can add random string after attributes. In my case, i define it like this
This is more easier than searching new unique name since S3 bucket name is globally unique. |
This doesn't seem like an issue with this module as this module cannot ensure that the bucket name is unique globally |
thanks for reminding, it helped :) |
Error: creating S3 Bucket (swethabuckets7128834): operation error S3: CreateBucket, https response error StatusCode: 409, RequestID: 08J2B14W7G3ZB0D0, HostID: CegKwKnfuzghXHKd7N0RI7VlOVzYUVNErrFDzhtg/+hzWMs8KUF3Jeq1m9PEydPJMx6nuSzQZsFYEjICOjWsJw==, BucketAlreadyOwnedByYou: Getting above error while changing tfstate file to remote. |
Describe the Bug
Getting an error
Error: Error creating S3 bucket: BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
when runningterraform apply -auto-approve
.Also, it asks to
Enter the value
of a region for S3, however, it's already in vars. World be nice to automate this step as well :)Environment:
+provider.aws v2.70.0
+provider.local v1.4.0
+provider.null v2.1.2
+provider.template v2.1.2]
Steps to Reproduce
The text was updated successfully, but these errors were encountered: