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_s3_bucket_object etag returns providers bug error #22273

Closed
vasilij-icabbi opened this issue Jul 31, 2019 · 2 comments
Closed

aws_s3_bucket_object etag returns providers bug error #22273

vasilij-icabbi opened this issue Jul 31, 2019 · 2 comments

Comments

@vasilij-icabbi
Copy link

vasilij-icabbi commented Jul 31, 2019

Terraform Version

Terraform v0.12.5
+ provider.aws v2.21.1
+ provider.null v2.1.2

I have a null_resource that runs a bash script locally to create a zip file:

resource "null_resource" "package_lambda" {

  triggers = {
    build_number = timestamp()
  }

  provisioner "local-exec" {
    command = "bin/package-lambda"
    interpreter = ["bash"]
  }
}

Than I have aws_s3_bucket_object resource that puts created zip file onto S3:

resource "aws_s3_bucket_object" "rss" {

  depends_on = [
    null_resource.package_lambda
  ]

  bucket = aws_s3_bucket.lambda_packages_storage.bucket
  key    = format("lambdas/%s/function.zip", local.lambdas.rss.function_name)
  source = local.lambdas.rss.path_to_file

  acl = "private"

  etag = md5(filebase64(local.lambdas.rss.path_to_file))
}

When I run terraform apply I get following error:

Error: Provider produced inconsistent final plan

When expanding the plan for aws_s3_bucket_object.rss to include new
values learned so far during apply, provider "aws" produced an invalid new
value for .etag: was cty.StringVal("92026b29f59b68ccc930d007b67b1a3b"), but
now cty.StringVal("563744635d84d0506cafce7111c9ae52").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Is there a workaround to this issues? Thank you.

@ghost
Copy link

ghost commented Jul 31, 2019

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

@ghost ghost closed this as completed Jul 31, 2019
@ghost
Copy link

ghost commented Aug 31, 2019

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 Aug 31, 2019
This issue was closed.
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

2 participants