Terraform Cloud API token unauthorised if logged out of HCP website

Hi,

I’ve noticed that ever since (I think) linking my TF Cloud account with my HCP account, if I’m logged out of HCP website (and, in turn, TFC), running terraform CLI for a TF configuration configured to use Terraform Cloud fails with

Error: Failed to read organization "<myorg>" at host app.terraform.io
Encountered an unexpected error while reading the organization settings: unauthorized

The error occurs even when a valid user API token exists in terraform.d/credentials.tfrc.json (confirmed by successfully re-running terraform login)

After I log into HCP in my browser, terraform CLI commands work fine.

I may be misremembering, but I don’t think this was happening before linking my TFC account to HCP.

Is this intended behaviour? Can it be disabled?

Thank you!

2 Likes

we are also experiencing this

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.