Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source_dir zips folder contents rather than folder #96

Open
joekendal opened this issue Apr 28, 2021 · 0 comments
Open

source_dir zips folder contents rather than folder #96

joekendal opened this issue Apr 28, 2021 · 0 comments

Comments

@joekendal
Copy link

Terraform Version

v0.14.8

Affected Data

  • archive_file

Terraform Configuration Files

// Zips the mappings folder into mappings.zip
data "archive_file" "lib" {
  type        = "zip"
  source_file  = "${path.module}/folder"
  output_path = "${path.module}/folder.zip"
}

Expected Behavior

folder.zip deflates to folder

$ unzip folder.zip
$ tree
.
└──  folder

Actual Behavior

folder.zip deflates to the contents of folder not the folder itself

$ unzip folder.zip
$ tree
.
├── file1
└──  file2

Steps to Reproduce

  1. mkdir folder
  2. touch folder/file{1,2}
  3. terraform apply
  4. unzip folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant