- Notifications
You must be signed in to change notification settings - Fork1k
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Allcoder templates push
commands fail with "Error: No configuration files" when using Coder v2.26.0+ control plane. This affects:
- Custom templates that previously worked on v2.25.x
- Fresh templates generated by
coder templates init
- All upload methods:
-d
flag, stdin tar, and direct push from template directory
2025-10-08 13:06:19.465-04:00 Terraform 1.13.02025-10-08 13:06:19.465-04:00 Error: No configuration files2025-10-08 13:06:19.465-04:00 Plan requires configuration to be present. Planning without a configuration would mark everything for destruction, which is normally not what is desired. If you would like to destroy everything, run plan with the -destroy option. Otherwise, create a Terraform configuration file (.tf file) and try again.
TL;DR: Something about Terraform 1.13.0's integration with Coder's file extraction/placement mechanism appears broken. The server-side Terraform cannot locate uploaded .tf files in its working directory during the "Detecting persistent resources" phase.
some additional investigation details
- Root cause appears to be Terraform version change on server:
- v2.25.0 uses Terraform 1.12.2 (works ✅)
- v2.26.0+ uses Terraform 1.13.0 (broken ❌)
- Source:https://github.com/coder/coder/blob/main/provisioner/terraform/install.go
- Client-side Terraform version is irrelevant:
- Tested with local Terraform 1.9.7 and 1.13.3
- Error persists regardless of client version
- The CLI uploads raw .tf files; server-side Terraform processes them
- All upload methods fail:
- ✗ coder templates push -d /path/to/template
- ✗ cd template && coder templates push
- ✗ cat template.tar.gz | coder templates push -d -
- Template files are valid:
- Same templates that successfully pushed on v2.25.x
- terraform validate succeeds locally with both 1.9.7 and 1.13.3
- fresh CLI-generated templates also fail identically
- Cannot bisect server versions easily due to database migration warnings:
"Prior to upgrading a production Coder deployment, take a database snapshot since Coder does not support rollbacks."
Relevant Log Output
# Test 1: Custom template that worked on v2.25.0 (last successful push: July 29, 2025)$ coder templates push eevee-dev -d /tmp/coder-template -y=== ✔ Queued [23ms]=== ✔ Running [4ms]=== ✔ Setting up [0ms]=== ✔ Parsing template parameters [2ms]==> ⧗ Detecting persistent resources2025-10-08 12:39:37.186-04:00 Terraform 1.13.02025-10-08 12:39:37.186-04:00 Error: No configuration files=== ✔ Detecting persistent resources [53ms]=== ✘ Cleaning Up [858ms]error: template import provisionfor start: terraform plan:exit status 1# Test 2: Fresh CLI-generated template$ coder templates init --id scratch /tmp/test-minimal-template$cd /tmp/test-minimal-template&& ls -la-rw-r--r-- main.tf-rw-r--r-- README.md$ coder templates push test-minimal -y=== ✔ Queued [16ms]=== ✔ Running [1ms]=== ✔ Setting up [0ms]=== ✔ Parsing template parameters [2ms]==> ⧗ Detecting persistent resources2025-10-08 13:06:19.465-04:00 Terraform 1.13.02025-10-08 13:06:19.465-04:00 Error: No configuration files=== ✔ Detecting persistent resources [56ms]=== ✘ Cleaning Up [341ms]error: template import provisionfor start: terraform plan:exit status 1# Test 3: Tar via stdin$ tar -czf /tmp/test.tar.gz.&& cat /tmp/test.tar.gz| coder templates pushtest -d - -y# Same error: "No configuration files"
Expected Behavior
coder templates push
should upload files properly, should not warn about resource destruction
Templates should push successfully as they did on Coder v2.25.0 with Terraform 1.12.x.
Steps to Reproduce
- Upgrade Coder control plane from v2.25.x to either v2.26.x or v2.27.0
- Generate a minimal template:
coder templates init --id scratch /tmp/test
- Push the template:
cd /tmp/test && coder templates push test-minimal -y
- Observe "Error: No configuration files" from Terraform 1.13.0
OR
- Upgrade Coder control plane from v2.25.x to either v2.26.x or v2.27.0
- Use any existing template (with main.tf present and validated)
- Attempt
coder templates push <name> -d <directory> -y
- Same error occurs
Environment
- Host OS: macOS Darwin 24.6.0 (darwin_arm64) - client; Ubuntu 24.04.2 LTS (linux_arm64) - server
- Coder version:
- Control plane: v2.27.0+c0cd32c (originally affected upgrade from v2.25.x -> 2.26.0)
- CLI: v2.27.0+c0cd32c
Additional Context
The issue occurs consistently, The issue is new (previously worked fine), I have tested this on the latest version