-
Notifications
You must be signed in to change notification settings - Fork 63
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
Hash-code of lambda function code file changes if run in diffrent shell/os #48
Comments
@wadhekarpankaj On one ubuntu host the source file had 0664 permissions, whilst on the other it had 0644. These read-write permissions aren't tracked by git, hence it was possible for them to be different between hosts. However, these permissions are stored in the resultant zip file. I've not tried this on Windows, but I imagine it would be difficult (if not impossible) to get identical zip files as the permissions models are so different. I don't think this is a terraform (or provider issue) really, it's just that we're stretching the usage of terraform a little far expecting it to create perfectly reproducible zip files across multiple platforms. It would be better to have some other tooling managing the zip files in an earlier part of the pipeline. |
Hello @mf-lit , Regards, |
Actually I think there is even a PR that as never been reviewed for this issue, see #47 |
I think this should be closed as a duplicate of #34 ? |
Adding |
Hash of the original file can also be used source_code_hash = base64encode(filesha256(data.archive_file.source_file.source_file)) |
This issue was originally opened by @wadhekarpankaj as hashicorp/terraform#22397. It was migrated here as a result of the provider split. The original body of the issue is below.
Hello,
I am using the lambda module to create lambda function in AWS. However, the value of source_code_hash changes, If I try to do terraform plan/apply in different shell or OS.
The code contents are the same every time I run terraform init. This code is used by multiple users and they have a different OS. We need a solution to avoid this.
Hope the issue is clear.
Terraform version
Terraform v0.11.11
Terraform code
Actual Behavior
In Windows-
No changes. Infrastructure is up-to-date.
In Ubuntu-
and vice versa
Expected Behavior
In Windows-
No changes. Infrastructure is up-to-date.
In Ubuntu-
No changes. Infrastructure is up-to-date.
The text was updated successfully, but these errors were encountered: