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

Terraform thinks S3 policy has changed when it hasn't. #6952

Closed
fields opened this issue May 31, 2016 · 3 comments
Closed

Terraform thinks S3 policy has changed when it hasn't. #6952

fields opened this issue May 31, 2016 · 3 comments
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community

Comments

@fields
Copy link

fields commented May 31, 2016

Even after terraform apply, terraform plan still sees policy changes in the aws_s3_bucket resource.

Terraform Version

0.6.15

Affected Resource(s)

  • aws_s3_bucket

Expected Behavior

terraform plan should recognize that the policy hasn't changed.

Actual Behavior

terraform plan sees changes in the policy.

Steps to Reproduce

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

  1. terraform plan

https://gist.github.com/fields/1af00ad7608246035e93e7813bd30571

@catsby
Copy link
Contributor

catsby commented Jun 1, 2016

Hey @fields – looks like you're missing the Sid attribute:

What AWS is returning:

{
  "Statement": [
    {
      "Action": "s3:PutObject",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::xxxxx:root"
      },
      "Resource": "arn:aws:s3:::bucketname/*",
      "Sid": ""
    }
  ],
  "Version": "2012-10-17"
}

What Terraform is trying to change it back to:

{
  "Statement": [
    {
      "Action": "s3:PutObject",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam:xxxx:root"
      },
      "Resource": "arn:aws:s3:::bucketname/*"
    }
  ],
  "Version": "2012-10-17"
}

Can you try adding "Sid": "" ?

@catsby catsby added bug provider/aws waiting-response An issue/pull request is waiting for a response from the community labels Jun 1, 2016
@catsby
Copy link
Contributor

catsby commented Jun 13, 2016

Going to close this for now, the issue seems to be in the config file and not Terraform itself. Please comment/reopen if you feel otherwise.

Thanks!

@catsby catsby closed this as completed Jun 13, 2016
@ghost
Copy link

ghost commented Apr 25, 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 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

2 participants