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

backend/remote: No version check for operations #27319

Merged

Conversation

alisdair
Copy link
Contributor

Terraform remote version conflicts are not a concern for operations. We are in one of three states:

  • Running remotely, in which case the local version is irrelevant;
  • Workspace configured for local operations, in which case the remote version is meaningless;
  • Forcing local operations with a remote backend, which should only happen in the Terraform Cloud worker, in which case the Terraform versions by definition match.

This commit therefore disables the version check for operations (plan and apply), which has the consequence of disabling it in Terraform Cloud and Enterprise runs. In turn this enables Terraform Enterprise runs with bundles which have a version that doesn't exactly match the bundled Terraform version.

Intended for back-port to 0.14 for an upcoming release.

Terraform remote version conflicts are not a concern for operations. We
are in one of three states:

- Running remotely, in which case the local version is irrelevant;
- Workspace configured for local operations, in which case the remote
  version is meaningless;
- Forcing local operations with a remote backend, which should only
  happen in the Terraform Cloud worker, in which case the Terraform
  versions by definition match.

This commit therefore disables the version check for operations (plan
and apply), which has the consequence of disabling it in Terraform Cloud
and Enterprise runs. In turn this enables Terraform Enterprise runs with
bundles which have a version that doesn't exactly match the bundled
Terraform version.
@alisdair alisdair added the 0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Dec 17, 2020
@alisdair alisdair self-assigned this Dec 17, 2020
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #27319 (619c672) into master (428d404) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
backend/remote/backend.go 62.67% <100.00%> (-0.15%) ⬇️
dag/marshal.go 61.90% <0.00%> (-1.59%) ⬇️
terraform/node_resource_apply_instance.go 52.55% <0.00%> (+2.79%) ⬆️

@alisdair alisdair marked this pull request as ready for review December 17, 2020 18:26
@alisdair alisdair requested a review from a team December 17, 2020 18:26
Copy link
Contributor

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good, pragmatic solution to a difficult problem

@ghost
Copy link

ghost commented Feb 4, 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 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants