feat(build): support mount symlink in terraform build#8854
Merged
roger-zhangg merged 4 commits intodevelopfrom Mar 26, 2026
Merged
feat(build): support mount symlink in terraform build#8854roger-zhangg merged 4 commits intodevelopfrom
roger-zhangg merged 4 commits intodevelopfrom
Conversation
Thread the --mount-symlinks flag through the Terraform build pipeline so that zip artifacts containing symlinks (e.g. absolute symlinks) can be extracted during sam build --hook-name terraform. Changes: - copy_terraform_built_artifacts.py: Add --mount-symlinks CLI flag and pass it to unzip() - makefile_generator.py: Include $(SAM_CLI_MOUNT_SYMLINKS_FLAG) placeholder in the Makefile recipe - app_builder.py: Replace the placeholder with --mount-symlinks in the Makefile before invoking the builder (per-build, race-safe) - build_integ_base.py: Add mount_symlinks parameter to get_command_list Tests: - Script-level tests for symlink zip extraction with/without flag - E2E integration test with sam build --hook-name terraform - Unit test for makefile recipe generation
Member
Author
valerena
previously approved these changes
Mar 26, 2026
| skip_prepare_infra, | ||
| plan_file, | ||
| project_root_dir, | ||
| mount_symlinks=_read_parameter_value("mount_symlinks", opts, ctx, False), |
Contributor
There was a problem hiding this comment.
Not really important, but just for consistency I would put the _read_parameter_value call in line 93 and then do just mount_symlinks=mount_symlinks, here.
Vandita2020
approved these changes
Mar 26, 2026
valerena
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Thread the --mount-symlinks flag through the Terraform build pipeline so that zip artifacts containing symlinks can be extracted during sam build --hook-name terraform --mount-symlinks.
How
Tests