You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using previously-installed hashicorp/archive v2.5.0
Terraform Configuration
# Achive the files to include in the function app packagedata"archive_file""functionapp_archive" {
type="zip"source_dir="${path.module}/function"# This also skips all directories lexically greater than the symlinked directory in the parent directoryexclude_symlink_directories=trueoutput_path="${path.module}/function-app.zip"# Excludes list drawn from .funcignore fileexcludes=[
"**/*.js.map",
"**/*.ts",
".git*",
".vscode",
"__azurite_db*__.json",
"__blobstorage__",
"__queuestorage__",
"local.settings.json",
"test",
"tsconfig.json"
]
}
Expected Behavior
I am zipping up the contents of a Typescript package to run as an Azure Function. To do this successfully I need to exclude the symlink to the package root directory that npm install creates under node_modules, but I need all the other directories and files present under node_modules to be included.
Actual Behavior
If I use exclude_symlink_directories = true to skip the symlink to the package root directory that npm install creates, then all remaining directories that are lexically greater than the symlink name in node_modules are skipped too.
Steps to Reproduce
Create a default Typescript Azure Function under a directory called "function"
Run npm install in the "function" directory to install the required node modules under node_modules.
Create a Terraform script to zip up the "function" directory (using the Terraform snippet above)
terraform init && terraform plan
Examine the zip file created - note that under the node_modules directory, every directory lexically greater than the symlinked directory in the original directory has been skipped from the zip file.
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
A workaround is to include the symlink in the excludes block.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Terraform CLI and Provider Versions
Terraform v1.9.4
on windows_amd64
Terraform Configuration
Expected Behavior
I am zipping up the contents of a Typescript package to run as an Azure Function. To do this successfully I need to exclude the symlink to the package root directory that npm install creates under node_modules, but I need all the other directories and files present under node_modules to be included.
Actual Behavior
If I use
exclude_symlink_directories = true
to skip the symlink to the package root directory that npm install creates, then all remaining directories that are lexically greater than the symlink name in node_modules are skipped too.Steps to Reproduce
terraform init && terraform plan
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
A workaround is to include the symlink in the excludes block.
Code of Conduct
The text was updated successfully, but these errors were encountered: