diff --git a/.changes/v1.15/ENHANCEMENTS-20251027-132238.yaml b/.changes/v1.15/ENHANCEMENTS-20251027-132238.yaml new file mode 100644 index 000000000000..7c4d0af69918 --- /dev/null +++ b/.changes/v1.15/ENHANCEMENTS-20251027-132238.yaml @@ -0,0 +1,5 @@ +kind: ENHANCEMENTS +body: terraform init log timestamps include millisecond precision +time: 2025-10-27T13:22:38.714891768-05:00 +custom: + Issue: "37818" diff --git a/internal/command/views/init.go b/internal/command/views/init.go index ab16c436b14c..d27d678cd82c 100644 --- a/internal/command/views/init.go +++ b/internal/command/views/init.go @@ -9,6 +9,7 @@ import ( "strings" "time" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/tfdiags" ) @@ -97,7 +98,7 @@ func (v *InitJSON) Output(messageCode InitMessageCode, params ...any) { return } - current_timestamp := time.Now().UTC().Format(time.RFC3339) + current_timestamp := time.Now().UTC().Format(hclog.TimeFormat) json_data := map[string]string{ "@level": "info", "@message": preppedMessage,