I am using terraform to zip a folder as below code.
data "archive_file" "src" {
type = "zip"
source_dir = "dist"
output_path = ".build/src.zip"
}
It creates the zip file src.zip in .build directory. But the src.zip doesn't include the root folder which is dist. How can I zip the folder include the folder itself?
So currently you're zipping a folder structure that looks like this:
dist
...
Is there anything stopping you from zipping a folder structure that looks like this?
my_archive_file_target
dist
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With