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_lambda_function gets file hash different from the one exported by archive_file #10600

Open
szemlyanoy opened this issue Oct 22, 2019 · 2 comments
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/lambda Issues and PRs that pertain to the lambda service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. waiting-response Maintainers are waiting on response from community or contributor.

Comments

@szemlyanoy
Copy link

Despite zip file is not changed lambda is updating with archive every apply

data "archive_file" "lambda_zip" {
  type          = "zip"
  source_file   = "${path.module}/src/${local.fullname}.rb"
  output_path   = "${path.module}/src/${local.fullname}.zip"
}

resource "aws_lambda_function" "func" {
  filename         = "${path.module}/src/${local.fullname}.zip"
  function_name    = "lsm_${local.basename}"
  role             = aws_iam_role.recyclerLambda.arn
  handler          = "${local.fullname}.lambda_handler"
  source_code_hash = data.archive_file.lambda_zip.output_base64sha256
  runtime          = "ruby2.5"
  tags = {
bt_tier = var.bt_tier
deployed_by = "Terraform"
  }
}

The same with md5 checksum. The actual checksum of file on FS is not changing.
Please advice

Thanks,
Sergii

@szemlyanoy szemlyanoy added the question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. label Oct 22, 2019
@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Oct 22, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 22, 2019
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Oct 13, 2021
@github-actions github-actions bot removed the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Oct 26, 2021
@justinretzolk
Copy link
Member

Hey @szemlyanoy 👋 Thank you for taking the time to file this issue! Given that there's been a number of AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 9, 2021
@justinretzolk justinretzolk added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/lambda Issues and PRs that pertain to the lambda service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. waiting-response Maintainers are waiting on response from community or contributor.
Projects
None yet
Development

No branches or pull requests

2 participants