-
Notifications
You must be signed in to change notification settings - Fork 961
Open
Description
Problem
Currently, coder templates push
doesn't follow symlinks when creating template archives. This makes it difficult to share common files (like modules.tf
and ides.tf
) between multiple templates in a monorepo while keeping templates self-contained and functional offline.
Proposed Solution
Add an optional flag (e.g., --dereference-symlinks
or --follow-symlinks
) to coder templates push
that would:
- Follow symlinks and include the actual file contents in the template archive
- Allow templates to share common files via symlinks while remaining standalone
- Be opt-in to avoid breaking existing workflows
Use Case
This would enable template authors to:
- Create symlinks to shared files in template directories
- Use the flag to push templates with dereferenced symlinks
- Maintain template portability without requiring module dependencies
Security Considerations
- Should be opt-in only to avoid mistakes
- Consider validation to prevent following symlinks outside the template directory
Alternative Workarounds
- Hard links (but Git doesn't track them)
- Build scripts to copy files (adds a build step, and makes it more annoying/misleading to contribute)
- Custom tar creation with
coder templates push -d -
(kinda sucks)
Issue by @phorcys420
Metadata
Metadata
Assignees
Labels
No labels