terraform-provider-archive icon indicating copy to clipboard operation
terraform-provider-archive copied to clipboard

Add source_dirs field

Open juliosueiras opened this issue 4 years ago • 5 comments

Add source_dirs field which would allow archiving multiple dirs at once with the following structure

if dir1 have file1 and dir2 have file2 it would result in this

file1
dir2/file2

terraform example:

data "archive_file" "test-dirs" {
  type = "zip"
  output_path = "test.zip"

  source_dirs {
    root_dirs = [
      "./dir1" # include the content as root level 
    ]
    dirs = [
      "./dir2" # include the folder in the archive
    ]
  }
}

The items need to be for this are adding test cases relate to this and ensure all errors from the filepath walk are return

juliosueiras avatar Aug 20 '21 00:08 juliosueiras

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Aug 20 '21 00:08 hashicorp-cla

Hi @juliosueiras 👋 Thank you for submitting this!

Would you be able to add your intended use case to #37? This will help us with designing the functionality and ensuring that we are covering any expectations.

Thanks!

bflad avatar Sep 02 '21 14:09 bflad

@bflad just want to make sure , is it for me to write how to use this PR to address the use case outline in #37 ?

juliosueiras avatar Sep 04 '21 17:09 juliosueiras

@juliosueiras, is there any active work going on with this PR? I created #125 which has some similarities.

jhancock93 avatar Mar 06 '22 21:03 jhancock93

Hi @juliosueiras 👋 Thank you for submitting this!

Would you be able to add your intended use case to #37? This will help us with designing the functionality and ensuring that we are covering any expectations.

Thanks!

@bflad can we accept this functionality - it's so powerful in the "new" world of serverless this is a required function!

AzySir avatar Nov 04 '23 02:11 AzySir