Giter Site home page Giter Site logo

Comments (3)

RichardBradley avatar RichardBradley commented on June 26, 2024 2

This feature would give a workaround for #58

from terraform-provider-archive.

virgofx avatar virgofx commented on June 26, 2024 1

The workaround in #90 has been released in terraform-provider-archive v2.2.0 which adds output_file_mode and should fix your issue.

from terraform-provider-archive.

emoshaya avatar emoshaya commented on June 26, 2024

output_file_mode hasn't resolve this issue for the dynamic source block..

I have the following code. When I inspect the archive.zip files all the permissions are set to "0644" instead of "0755"


data "archive_file" "this" {
  type = "zip"
  source_file = null
  output_path = "${path.module}/archive.zip"
  source_content_filename (with source_content), source_file, or source_dir must be specified. 
  dynamic "source" {
    for_each = var.files
    content {
      content  = source.value.content
      filename = source.value.filename
    }
  }
  source_dir = null
  source_content = null
  source_content_filename = null
  output_file_mode = "0755"
  excludes = null
  exclude_symlink_directories = false
}

I think the solution proposed in this issue makes more sense as you might want different permissions for each file

data "archive_file" "datadog" {
  type        = "zip"
  output_path = "${path.module}/files/lambda_function.py.zip"

  source {
    content  = "${data.http.datadog.body}"
    filename = "lambda_function.py"
    file_permission = "0755"
  }

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.