- Notifications
You must be signed in to change notification settings - Fork24
Description
Description
The Terraform provider validates timezones using time.LoadLocation() but doesn't embed the timezone database (time/tzdata). This causes timezone validation to fail in minimal containers or environments that don't have system tzdata installed.
Root Cause
The main Coder binaryembeds tzdata via _ "time/tzdata" import, but the Terraform providerdoes not include this import. This causes thecoder templates push command to fail with the following:
2025-12-01 12:57:53.234-06:00 Error: failed to load timezone "America/New_York": unknown time zone America/New_York Encountered an error running "coder templates push", see "coder templates push --help" for more information error: template import provision for start: terraform plan: exit status 1
Workarounds
- Install the tzdata package in your provisioner environment:
- Debian/Ubuntu: apt-get install tzdata
- Alpine: apk add tzdata
- Use UTC as the timezone (always available regardless of environment)
Proposed Fix
Add the tzdata embed import to the Terraform provider's main.go:
import ( _ "time/tzdata")The _ "time/tzdata" import embeds the IANA Time Zone database directly into the compiled binary. This means time.LoadLocation() will have access to all timezone definitions regardless of whether the host system has tzdata installed. This is also consistent with how the main Coder binary handles it.