Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Cannot invoke cancel/discard run via terraform CLI #335

Closed
leg100 opened this issue Mar 6, 2023 · 1 comment · Fixed by #375
Closed

Cannot invoke cancel/discard run via terraform CLI #335

leg100 opened this issue Mar 6, 2023 · 1 comment · Fixed by #375

Comments

@leg100
Copy link
Owner

leg100 commented Mar 6, 2023

Terraform version: 1.3.7

When I cancel a run via the terraform CLI, pressing ^C:

Waiting for 3 run(s) to finish before being queued...
^C
Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...

Do you want to cancel the remote operation?
Only 'yes' will be accepted to cancel.

Enter a value: yes


│ Error: Failed to retrieve run: Failed to cancel run: Unprocessable Entity

│ data is not a jsonapi representation of '*otf.RunCancelOptions': Terraform Cloud returned an unexpected error. Som
etimes this is caused by network connection problems, in which case you could retry the command. If the issue persis
ts please open a support ticket to get help resolving the problem.

│ Terraform Cloud returned an unexpected error. Sometimes this is caused by network connection problems, in which
│ case you could retry the command. If the issue persists please open a support ticket to get help resolving the
│ problem.

The same occurs when the CLI discards a run.

It looks like this broke with this commit to the go-tfe lib:

hashicorp/go-tfe#388

This lib is used by the terraform CLI for iteraction with TFE/C and OTF.

@pat-s
Copy link
Contributor

pat-s commented Mar 7, 2023

I also experienced this and was thinking of reporting it - but hold back given my other "lock" issues reported recently and not being sure if they have an influence on this behavior 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants