Open mpr555 opened 1 year ago
In my case: 1) I generated new token at terraform 2) Update TF_API_TOKEN at Repository secrets ( "myrepo" -> Settings -> Secrets and variables -> Actions) with new token 3) Rerun and it working.
I've got the same issue - generating a new token solves the problem, but it's weird as the old token hasn't expired. Anyway to further investigate this?
I've got the same issue - generating a new token solves the problem, but it's weird as the old token hasn't expired. Anyway to further investigate this?
One possible reason for this, if you used a user token and SSO is enabled, this would be only active whilst SSO session remains active.
It's possible for the token to be not expired but inactive due to SSO session expiry.
I've got the same issue - generating a new token solves the problem, but it's weird as the old token hasn't expired. Anyway to further investigate this?
One possible reason for this, if you used a user token and SSO is enabled, this would be only active whilst SSO session remains active.
Thanks @srlynch1 - yes that was the problem. What's a better way to handle this, without relying on an active SSO session? ~Is it recommended to use an organisation token in this case?~ I just saw that organisation token does not have permission to perform plans and applies in workspaces. Should I use a team token?
Not an org token, generally you would use a team token.
If it's Terraform Enterprise it's also possible to flag a user account as a service account via SAML assertion using IsServiceAccount
On Friday last week, I had a GitHub workflow using tf cloud to do a plan etc from the guide below
https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
It was working all ok. Nothing has changed, and I have checked API keys expiration and now it does not work.
Kind regards,
Max