Repository navigation
fix: require Terraform >= 1.3.0 for optional() attributes - #166
Open
sarankumar (sarankumar1325) wants to merge 2 commits into
Open
sarankumar (sarankumar1325) wants to merge 2 commits into
sarankumar (sarankumar1325) wants to merge 2 commits into
Conversation
variables.tf uses optional(type, default) object attributes, which Terraform only supports since 1.3.0. With the old >= 1.0 floor, Terraform 1.0-1.2 pass the version check and then fail with "Invalid type specification".
sarankumar (sarankumar1325)
requested review from
Andriy Knysh (aknysh),
Joe Niland (joe-niland) and
yangci (oycyc)
October 31, 2026 05:57
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
💥 This pull request now has conflicts. Could you fix it sarankumar (@sarankumar1325)? 🙏 |
…n-optional-attrs Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com> # Conflicts: # examples/complete/versions.tf # examples/mtls/versions.tf # examples/multi-origin/versions.tf # examples/s3/versions.tf # examples/wordpress/versions.tf # versions.tf
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
required_versionfrom>= 1.0to>= 1.3.0inversions.tfand in every example'sversions.tf.why
variables.tfuses optional object attributes with defaults, such asoptional(string, null)andoptional(bool, false). Terraform added these in 1.3.0.>= 1.3.0, those versions get the clear "Unsupported Terraform Core version" message instead.README.mdis left alone because the readme bot regenerates its requirements table.Checked locally with
terraform init -backend=falseandterraform validate:mainwith the error above.examples/complete,s3,multi-origin,mtlsandwordpress.terraform fmt -check -recursiveis clean.references