Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading workspace when the remote workspace has the terraform version set to a constraint #994

Open
kpenaseveriche opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kpenaseveriche
Copy link

go-tfe version

The version used in terraform 1.9.8:

1.58.0

Description

When running commands that call workspace#Read, like terraform untaint (given that the current project is configured to use a remote workspace). If the remote TFE workspace has a version constraint set on the terraform-version field (which is supported as documented in the API docs). It produces an error about a malformed version.

Error: Error looking up workspace

Invalid Terraform version: Malformed version: ~> 1.6.0

Testing plan

  • Create a TFE workspace with a version constraint
  • Set up a project configured with that workspace as the backend
  • Apply a plan such that a resource exists
  • Run terraform untaint <resource name>

Expected Behavior

Command edits the remote state.

Actual Behavior

Error looking up workspace

Additional Context

In our use-case, the remote workspace was created via the API, not the UI

@kpenaseveriche kpenaseveriche added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant