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

Using aws_s3_bucket_object with kms_key_id causes "etag" issues #6698

Closed
akarnani opened this issue May 16, 2016 · 7 comments
Closed

Using aws_s3_bucket_object with kms_key_id causes "etag" issues #6698

akarnani opened this issue May 16, 2016 · 7 comments

Comments

@akarnani
Copy link

akarnani commented May 16, 2016

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.6.16

Affected Resource(s)

  • aws_s3_bucket_object

Terraform Configuration Files

resource "aws_s3_bucket_object" "foo" { content = "abc" key = "foo" bucket = "${aws_s3_bucket.bar.id}" kms_key_id = "${aws_kms_key.main.arn}" }

Expected Behavior

On successive applies in which the content changes, they should be applied correctly

Actual Behavior

terraform appears to attempt to use an internally stored etag, however the check which prevents use of both etag and kms_key_id appears to fire and prevent the apply with the error message
aws_s3_bucket_object.foo: Unable to specify 'kms_key_id' and 'etag' together because 'etag' wouldn't equal the MD5 digest of the raw object data

Steps to Reproduce

  1. terraform apply
  2. alter content
  3. terraform apply
@coen-hyde
Copy link

Yep, I just experienced this

@coen-hyde
Copy link

This only happens on update. The first creation of the s3 object works fine. Looks like etag is being set in the statefile after creation regardless of kms. See:

d.Set("etag", strings.Trim(*resp.ETag, `"`))

@luhn
Copy link

luhn commented Jun 17, 2016

I'm also having a problem with this. Current workaround is to taint the resource.

@rvangraan
Copy link

Having the same problem. This only started happening when we upgraded to 0.7.2 from 0.6.x

@joseph-wortmann
Copy link

I am having the same problem after upgrading to 0.7.2

@catsby
Copy link
Contributor

catsby commented Oct 11, 2016

Hello friends – I just merged #9168, which adds an explicit conflict between etag and kms_key_id. You'll need to remove your etag if you're using kms_key_id. Sorry for the trouble!

@catsby catsby closed this as completed Oct 11, 2016
@ghost
Copy link

ghost commented Apr 21, 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 21, 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

7 participants