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

Applying bucket changes without terraform doesn't reflect in state after terraform refresh #2296

Closed
srikiraju opened this issue Nov 15, 2017 · 6 comments
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.
Milestone

Comments

@srikiraju
Copy link

Terraform Version

Terraform v0.10.8

Affected Resource(s)

  • aws_s3_bucket

Terraform Configuration Files

 resource "aws_s3_bucket" "www" {
     bucket = "main_bucket"
     acl    = "private"
    replication_configuration {
       role = "${aws_iam_role.s3_replication.arn}"

       rules {
         id     = "All"
         prefix = ""
         status = "Enabled"

         destination {
           bucket        = "arn:aws:s3:::otherbucket"
           storage_class = "STANDARD"
         }
      }
    }
 }

Steps to Reproduce

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

  1. terraform apply
  2. Remove replication from AWS console
  3. terraform plan - Same, plan does not detect that replication was removed
  4. terraform refresh - Off-band changes not detected

I think a lot of the other options in s3_bucket have the same behaviour

@paddycarver paddycarver added the bug Addresses a defect in current functionality. label Nov 21, 2017
@devonbleak
Copy link
Contributor

Confirming that changing ACLs also doesn't show up - had a bucket set to public today and my terraform with acl = "private" showed no changes required in the plan.

@radeksimko radeksimko added the service/s3 Issues and PRs that pertain to the s3 service. label Jan 28, 2018
@Chhed13
Copy link
Contributor

Chhed13 commented Feb 12, 2018

I can't reproduce exactly this code, but I definitely found an issue with replication_configuration update function - it refreshes only if replication.ReplicationConfiguration != nil instead of set state to default value.

@Chhed13
Copy link
Contributor

Chhed13 commented Feb 13, 2018

Added pull request for replication.
As I can see in code there is no read function for ACL implemented at all.
For cors_rule block - the same situation as for replication - it updates only when not nil.
And I double check request_payer, versioning and lifecycle_rule. They can work not correct on remove too.

@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

(Since a commit already closed this ticket for replication_config, let's address each case individually)

@ghost
Copy link

ghost commented Apr 7, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

No branches or pull requests

6 participants