Skip to content
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

aws_iam_policy_document on S3 bucket attempts to destroy the bucket #15700

Closed
btilford opened this issue Aug 2, 2017 · 2 comments
Closed

aws_iam_policy_document on S3 bucket attempts to destroy the bucket #15700

btilford opened this issue Aug 2, 2017 · 2 comments

Comments

@btilford
Copy link

btilford commented Aug 2, 2017

Terraform Version

0.9.11

Expected Behavior

S3 bucket policy is updated without having to destroy the bucket.

Actual Behavior

  • aws_s3_bucket.my-bucket: Error deleting S3 Bucket: BucketNotEmpty: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
    status code: 409, request id: 123ABC "my-bucket"
  • aws_s3_bucket.my-bucket: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
    status code: 409, request id: 1234XYZ

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create (terraform apply) an S3 bucket with an aws_iam_policy_document. I have multiple statements. 2 for internal network users to access the bucket and objects and then 2 more for specific users and roles to do the same.
  2. Add an object to the bucket.
  3. Modify the principal list for the policy.
  4. terraform plan shows resources to create
  5. terraform apply tries to delete the bucket and fails because there are objects in it.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@hashibot
Copy link
Contributor

hashibot commented Aug 3, 2017

This issue has been automatically migrated to hashicorp/terraform-provider-aws#1326 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@ghost
Copy link

ghost commented Apr 8, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants