terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Feature request: Timestamp in terraform console output during runs

Open dfairhurst opened this issue 8 years ago • 6 comments

Hi there,

Would it be possible to add a timestamp to the logs of terraform (not just debug logs, but also in the normal output). It would help a lot with debugging when we have failures due to issues with dependencies between resources, by enabling us to see the timestamp for each creation/deletion etc.

Best regards, Dan

dfairhurst avatar Nov 02 '16 19:11 dfairhurst

A clunky work around is to use ts as shown here:

https://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command

Freyert avatar Apr 17 '18 20:04 Freyert

Entered in 2016, and still no action? We too need prefixed timestamps, as we have run into networking issues between the terraform client and the IaaS provider, and having consistent identification of incidents, as with all our other tools is needed.

This is not just UX, this is for proper devops practice

ellisroll-b avatar Aug 12 '21 11:08 ellisroll-b

It would at least be nice to get some official response from Hashicorp on this. It really would be a valuable feature, given how many operations with popular providers such as AWS, often have a multitude of waiting operations tied to it.

datfinesoul avatar Mar 22 '22 03:03 datfinesoul

+1, this would be extremely useful for long duration deployments

stirlingalgermissen avatar Jun 21 '22 19:06 stirlingalgermissen

Bump it! It would be good to have.

f5-alex-zaets avatar Jul 08 '22 17:07 f5-alex-zaets

Can someone from @teamterraform comment on this?

ahmedwonolo avatar Aug 08 '22 21:08 ahmedwonolo

Thanks for the interest in this issue! This is unlikely to be addressed in Terraform in the foreseeable future. You might try the workflow of using tc as described in https://github.com/hashicorp/terraform/issues/9810#issuecomment-382133987, and many CI tools prepend timestamps in their own log output for this reason.

I will leave this issue open to track the request. Thanks for your feedback!

crw avatar Aug 12 '22 22:08 crw