Skip to content

Conversation

@SarahFrench
Copy link
Member

@SarahFrench SarahFrench commented Oct 29, 2025

Related to #37818

The logs from init include timestamps in format time.RFC3339 while other JSON logs use hclog.TimeFormat format.

This discrepancy is due to the logging implementation in #34886 avoiding hclog and instead printing a JSON string to the view's streams. If hclog was used directly then the calling code would not need to set a value for the timestamp and influence its format.

We can't get context from participants in the original PR to know why printing a JSON string was chosen and what limitations that might have been attempting to overcome. This PR assumes that there weren't any limitations and it was just unfamiliarity with hclog, which may or may not be true.

Regardless of why logging was implemented like that, making a change in the timestamp format may affect any systems consuming the logs, and at a minimum would require:

  • Checking that there's no breaking change in HCP Terraform.
  • Checking for required updates to terraform-exec and terraform-json.

These concerns have been addressed, see #37818 (comment)

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

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

@SarahFrench SarahFrench force-pushed the sarah/make-init-json-output-use-defaults branch 2 times, most recently from ed34b97 to 113c455 Compare October 30, 2025 09:27
@SarahFrench SarahFrench added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Nov 21, 2025
@SarahFrench SarahFrench marked this pull request as ready for review November 21, 2025 19:25
@SarahFrench SarahFrench requested a review from a team as a code owner November 21, 2025 19:25
@SarahFrench SarahFrench requested a review from a team November 21, 2025 19:25
@SarahFrench SarahFrench enabled auto-merge (squash) November 21, 2025 19:27
@SarahFrench SarahFrench force-pushed the sarah/make-init-json-output-use-defaults branch 2 times, most recently from 519dfbb to 27e0fd6 Compare November 21, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant