Terraform-provider-aws: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.

Created on 10 Sep 2018  ·  4Comments  ·  Source: hashicorp/terraform-provider-aws

Getting the following error with Terraform v0.11.8

* aws_s3_bucket.foo: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

v0.11.8

Affected Resource(s)

aws_s3_bucket

  • aws_XXXXX

Expected Behavior

S3 Bucket should be created.

Actual Behavior

after I imported the resource, and specified it in the main.tf Terraform file. I would like to know how I can use a bucket named "foo" which has been created manually and essentially import it (obviously, I already imported it per documentation). So, perhaps it's the import feature which doesn't work.

An alternative way to get into this state is deleting the terraform state files, importing the S3 resource after that, adding it to the configuration and running terraform apply.

References

  • #423
    Issue #423 reported this issue but was either prematurely closed or the issue regressed. In any case, I do not have permission to re-open issues and so opening a new one.
question servics3 waiting-response

Most helpful comment

Seeing the same issue and trying to find a work around. Github repo is connected to circleci, code is: https://github.com/cappetta/circleci_terraform/tree/stage.

All 4 comments

Hi @mcqj 👋 Sorry you are running into trouble.

Can you please provide the output of the Terraform commands you are running and the configuration so we can help troubleshoot?

Closing due to lack of response.

Seeing the same issue and trying to find a work around. Github repo is connected to circleci, code is: https://github.com/cappetta/circleci_terraform/tree/stage.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings