Giter Site home page Giter Site logo

Comments (3)

silverdaz avatar silverdaz commented on August 28, 2024 4

At the moment, it is not possible to archive 2 folders or even one folder and another file (located somewhere else).

If I am missing something, could you please point me into the right direction?
I am currently using the external provider, and created my own shell script that zips the required files and folders. Unfortunately, a terraform plan/apply recreates all the resources depending on it.

I could create a cached version, but isn't it better to include that exact functionality into this provider?
Thanks in advance, that'll be very helpful.
(PS: I like the above syntax for source_files and source_dirs)

from terraform-provider-archive.

raymondhardynike avatar raymondhardynike commented on August 28, 2024

Part of this can be done if you use the excludes functionality that i added. It is not as cool as adding each file one at a time but you can exclude all but the files you want.

I started to look into how to get this type of functionality into the code and it would require some serious changes to the way it gets data into the archive function.

If the core was to take all data objects and file paths and shove them into a hash table before adding each thing to an archive then it would be able to do things like append to zip etc because then it would be as simple as changing that hash table.

example table
/somedir/file1, ondisk
/somedir/file2, ondisk
/somedir/file3, ondisk
/somedir/file5, text, "my text data"
/file7, blob, rawblob

Then the problem becomes what has priority. I.E. does a terraform text data object have priority over a file on disk etc.

from terraform-provider-archive.

sorjef avatar sorjef commented on August 28, 2024

@silverdaz To prevent terraform from recreating resources each time the zip script runs you can use a solution I suggested under another issue #6 (comment). If this does not help, check out the comments in that issue for other options.

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.