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

Remote Version Check prevents changing backend to “local” when Terraform point-releases mismatch #27543

Closed
pkolyvas opened this issue Jan 19, 2021 · 1 comment · Fixed by #27545
Assignees
Labels
backend/remote bug confirmed a Terraform Core team member has reproduced this issue

Comments

@pkolyvas
Copy link
Contributor

Summary

If I have a remote workspace configured with a specific version of Terraform, ex. 0.14.3, and I am trying to move from remote execution back to local execution, the Remote Version Check won’t let me do so, even if the upgrade is a minor version.

1517895C-AD12-4260-91B8-8E86A093F8A2

Terraform Version

0.14.4
0.15-dev

Terraform Configuration Files

This issue centers around Terraform’s behaviour when you decide to remove the remote backend. In other words reconfiguring

terraform {
#    backend “remote” {
#      organization = “my_org”
#       workspaces = {
#            name = “my_workspace”
#       }
      required_providers = {
           source = “hashicorp/random”
      }
}

# Anything else below doesn’t matter
resourcerandom_pet” “terraform” {
     ...
}

Actual Behavior

Remote version check indicates that because my workspace is running 0.14.3 and my local version is 0.14.4 I cannot reconfigure the backend from remote to local.

Steps to Reproduce

  1. Comment or remove the remote backend from your Terraform configuration
  2. terraform init

Additional Context

I tested the behaviour against the HEAD of the main branch and the issue persists so I filed this as @alisdair suggested. It doesn’t strike me as high priority but it was important to document.

Workarounds

A couple of possible workarounds if you’ve arrived here with the same issue:

  1. The easy path is to modify your workspace settings to match the version of Terraform you’re running. This should be done carefully depending on the gap or discrepancy between the workspaces, but largely should be ok as terraform init shouldn’t touch the state file.
  2. Use something like TFSwitch to quickly change to your local version of Terraform to a version of Terraform matching the remote workspace and move along home.

References

@pkolyvas pkolyvas added bug backend/remote new new issue not yet triaged labels Jan 19, 2021
@alisdair alisdair self-assigned this Jan 19, 2021
@alisdair alisdair added confirmed a Terraform Core team member has reproduced this issue and removed new new issue not yet triaged labels Jan 19, 2021
@ghost
Copy link

ghost commented Feb 20, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend/remote bug confirmed a Terraform Core team member has reproduced this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants