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

Backport of configs: Accept and minimally validate a "language" argument into v0.15 #27942

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #27941 to be assessed for backporting due to the inclusion of the label 0.15-backport.

The below text is copied from the body of the original PR.


We expect that in order to continue to evolve the language without breaking existing modules we will at some point need to have a way to mark when a particular module is expecting a newer interpretation of the language.

Although it's too early to do any deep preparation for that, this commit aims to proactively reserve an argument named "language" inside "terraform" blocks, which currently only accepts the keyword TF2021 that is intended to represent "the edition of the Terraform language as defined in 2021".

Since TF2021 represents the language as currently defined without setting language, in practice there's no real reason to set this today, but this minimal validation is intended to give better feedback to users of older Terraform versions in the event that we introduce a new language edition later and they try to use an module incompatible with their Terraform version. Specifically, it will recommend that they upgrade to a newer version rather than just reporting that the language argument isn't supported.


This is a v0.15 backport because this change will meet its goals best if it's included in as early a Terraform CLI release as possible, to minimize the number of pre-0.15 uses of Terraform still around at the point where we might introduce a new edition keyword.

@teamterraform teamterraform force-pushed the backport/f-minimal-language-editions/exactly-creative-mustang branch from cb9fc9e to b6aca3a Compare February 26, 2021 19:43
@teamterraform teamterraform force-pushed the backport/f-minimal-language-editions/exactly-creative-mustang branch from ffed2c5 to 06c426f Compare February 26, 2021 19:43
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #27942 (06c426f) into v0.15 (cb9fc9e) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
configs/parser_config.go 87.91% <ø> (ø)
configs/experiments.go 79.31% <100.00%> (+6.58%) ⬆️
terraform/node_resource_plan.go 96.11% <0.00%> (-1.95%) ⬇️
checkpoint.go 31.57% <0.00%> (ø)
states/statefile/version4.go 58.19% <0.00%> (+0.23%) ⬆️

@apparentlymart apparentlymart merged commit b8670fe into v0.15 Feb 26, 2021
@apparentlymart apparentlymart deleted the backport/f-minimal-language-editions/exactly-creative-mustang branch February 26, 2021 19:51
@ghost
Copy link

ghost commented Mar 29, 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 Mar 29, 2021
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 this pull request may close these issues.

2 participants