Skip to content

Conversation

@Emyrk
Copy link

@Emyrk Emyrk commented Oct 27, 2025

Terraform init json logs to include millisecond precision. Following the trend of other logs.

Example output:

{"@level":"info","@message":"Terraform 1.13.3","@module":"terraform.ui","@timestamp":"2025-10-27T12:48:29.576675-05:00","terraform":"1.13.3","type":"version","ui":"1.2"}
{"@level":"info","@message":"Initializing the backend...","@module":"terraform.ui","@timestamp":"2025-10-27T17:48:29Z","message_code":"initializing_backend_message","type":"init_output"}

The timestamps for init_output omit milliseconds.

Target Release

1.15.x

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

Terraform init json logs omit millisecond precision included in
other logs
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Oct 27, 2025

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@Emyrk Emyrk marked this pull request as ready for review October 27, 2025 18:27
@Emyrk Emyrk requested a review from a team as a code owner October 27, 2025 18:27
Emyrk added a commit to coder/coder that referenced this pull request Oct 28, 2025
This uses the `terraform init -json` logs to add more visibility into
the `init` phase of `plan`. The `init` logs omit `ms` precision, so we
have to use `time.Now()` 😢

Open TF PR: hashicorp/terraform#37818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant