Giter Site home page Giter Site logo

Comments (5)

mf-lit avatar mf-lit commented on August 28, 2024 1

@wadhekarpankaj
I just ran foul of this, but found that the issue was down to permissions on the source files.

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.

from terraform-provider-archive.

wadhekarpankaj avatar wadhekarpankaj commented on August 28, 2024

Hello @mf-lit ,
Thank you for your response.
I do agree with you regarding git not tracking file permissions.
I am also doing a few experiments to figure out how I can do this with the existing capabilities of terraform. I can try to avoid zipping or try another approach for the same.

Regards,
Pankaj

from terraform-provider-archive.

ThinkBriK avatar ThinkBriK commented on August 28, 2024

Actually I think there is even a PR that as never been reviewed for this issue, see #47

from terraform-provider-archive.

chrisbloe avatar chrisbloe commented on August 28, 2024

I think this should be closed as a duplicate of #34 ?

from terraform-provider-archive.

asaf-kali avatar asaf-kali commented on August 28, 2024

Adding output_file_mode = "0644" (or any other value) to the "archive_file" solved this for me, as the default file mode is different on different OS, causing the file hash to change.

from terraform-provider-archive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.