Skip to content

[FEATURE] Report back if token expired or incorrect #60

@hawksight

Description

@hawksight

Is your feature request related to a problem? Please describe.

When running a plan action it's not entirely obvious what's wrong from the terraform error:

│ Error: Error retrieving user
│
│   with data.tlspc_user.team_owner,
│   on main.tf line 22, in data "tlspc_user" "team_owner":
│   22: data "tlspc_user" "team_owner" {
│
│ Error retrieving user: Error decoding response:
╵
Error: one or more commands failed

In my case I had miss-configured terramate withe the variable for the token.

I think you get the same error if the token has expired, or deleted.

From the event log in TLSPC it is apparent is token is invalid or expired:

Image

Describe the solution you'd like

  1. Report back if the input doesn't look like a token.
  2. Make it apparent there is an auth issue, as opposed to something else.

Describe alternatives you've considered

Could pre-check the token myself... but I'm lazy.
I think I seen a customer hit a similar issue, I expect more people might hti this as API tokens are 180 days by default.

Additional context
Add any other context or screenshots about the feature request here.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions