Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug: Terraform provider fails to validate timezones in minimal container environments #470

Open
@uzair-coder07

Description

@uzair-coder07

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

  1. Install the tzdata package in your provisioner environment:
  • Debian/Ubuntu: apt-get install tzdata
  • Alpine: apk add tzdata
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp