`terraform login` status?

How can I determine if I have a valid token to run terraform output, for example, against a workspace on app.terraform.io? For scripting purposes it would be useful to test if I am logged in, then initiate a terraform login as needed.

I’d accept a terraform login --noRefresh that reuses the current login if it’s still valid. :slight_smile: