Giter Site home page Giter Site logo

Comments (8)

jcollum avatar jcollum commented on July 24, 2024 2

Seems like a reasonable use case, I have a handler in dist (compiled from ts) and some packages in node_modules. Doesn't seem crazy to want to package them up into the same zip.

from terraform-provider-archive.

gurre avatar gurre commented on July 24, 2024

Have you checked using the CLI? If on macOS it adds the folder.

unzip -vl lambda_function_payload.zip

from terraform-provider-archive.

AzySir avatar AzySir commented on July 24, 2024

Have we put any consideration into this. I have this same issue with Lambda creations. There are packages being zipped but I also need to add my handler.py into the same zip - but can't seem to do so with this provider.

I thought this might be a common use-case does anyone have a work around?

Otherwise i'll be forced to use local-exec (which is not ideal)

from terraform-provider-archive.

simonweil avatar simonweil commented on July 24, 2024

Any chance to get this implemented?

from terraform-provider-archive.

bendbennett avatar bendbennett commented on July 24, 2024

@sanspace can I confirm that this is still an issue with the latest version of the provider?

When using v2.2.0 with the following configuration:

data "archive_file" "lambda" {
  type        = "zip"
  source_dir  = "src/"
  output_path = "dist/lambda_src.zip"
}

If the source_dir contains the following:

-rw-r--r--  1 bdb  staff   14 15 Aug 14:12 file1.txt
-rw-r--r--  1 bdb  staff   14 15 Aug 14:12 file2.txt
-rw-r--r--  1 bdb  staff   14 15 Aug 14:12 file3.txt

Running terraform apply generates lambda_src.zip in the dist directory.

Running unzip lambda_src.zip in the dist directory then produces the following:

-rw-r--r--  1 bdb  staff   14  1 Jan  2049 file1.txt
-rw-r--r--  1 bdb  staff   14  1 Jan  2049 file2.txt
-rw-r--r--  1 bdb  staff   14  1 Jan  2049 file3.txt
-rw-r--r--  1 bdb  staff  412 16 Nov 15:56 lambda_src.zip

The archive (zip) did not contain a directory containing the files but just contains the files.
Can you confirm that you are seeing something different from this?
Thanks.

from terraform-provider-archive.

sanspace avatar sanspace commented on July 24, 2024

@bendbennett I left the org years back and I no longer have the same set up. If you do not see any issues, please go ahead and close this one. Thank you!

from terraform-provider-archive.

bendbennett avatar bendbennett commented on July 24, 2024

@sanspace thanks for letting me know.

I'm going to close this as I cannot reproduce the original issue.

from terraform-provider-archive.

github-actions avatar github-actions commented on July 24, 2024

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.

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.