feat: archive modules in size order until limit is hit (#21773)

Archiving modules attempts to save as many modules as it can before it hits the limit. Enabling the template as much as it can, rather than a hard failure.
This commit is contained in:
Steven Masley
2026-02-02 09:03:18 -06:00
committed by GitHub
parent dd6aec04d7
commit 6b3d4377c3
6 changed files with 336 additions and 20 deletions
@@ -830,3 +830,17 @@ Unless explicitly mentioned, no registry modules require Dynamic Parameters.
Later in 2025, more registry modules will be converted to Dynamic Parameters to improve their UX.
In the meantime, you can safely convert existing templates and build new parameters on top of the functionality provided in the registry.
### "Module not loaded" errors when using Dynamic Parameters
Dynamic Parameters require Terraform modules to be archived and stored in the database. Coder limits module archives to **20MB total** to prevent database bloat. If your template uses modules that exceed this limit, some modules will be unavailable for parameter declarations.
**Symptoms:**
You may see warnings in the provisioner logs:
```text
[API] 2026-01-29 22:00:22.691 [warn] provisionerd-nixos-0.executor: some (or all) terraform modules were not archived, template will have reduced function skipped_modules=large:git::https://github.com/coder/large-module.git
```
If encountered, reduce the size of the module by removing unnecessary files.