-
-
Notifications
You must be signed in to change notification settings - Fork 201
feat!: Update supported Terraform min version to v1.0+ and AWS provider to v4.0+ #47
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
feat!: Update supported Terraform min version to v1.0+ and AWS provider to v4.0+ #47
Conversation
wrappers/cis-alarms/versions.tf
Outdated
@@ -1,3 +1,3 @@ | |||
terraform { | |||
required_version = ">= 0.13.1" | |||
required_version = ">= 1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in wrappers should not be updated. The hook autogenerates it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take a look at the failing modules tomorrow morning.
Thank you for an update across all (or almost all)!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW the version in wrappers is hardcoded right in here - https://github.com/antonbabenko/pre-commit-terraform/blob/master/hooks/terraform_wrapper_module_for_each.sh#L41 . It is ok for the wrappers.
b50fd2f
to
7a9522a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tell me if I should apply a similar update to the pre-commit.yml
in other failing modules.
# Run only validate pre-commit check on min version supported | ||
if: ${{ matrix.directory != '.' }} | ||
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.3.0 | ||
if: ${{ matrix.directory != '.' && !contains(matrix.directory, 'wrappers') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct way is probably to disable clowdhaus/terraform-min-max
from fetching terraform versions from the wrappers
directories, but the simplest is to disable runs of pre-commit terraform_validate
step, so I did.
Wrappers define just the minimum required versions of the Terraform for itself, but they don't know (and should not know) what they are wrapping and what is their required version of the Terraform. Hope it makes sense :)
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works!
with: | ||
terraform-version: ${{ steps.minMax.outputs.maxVersion }} | ||
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }} | ||
install-hcledit: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing hcledit
in all modules should be fine.
This PR is included in version 4.0.0 🎉 |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
lock.yml
workflow to automatically lock issues and PRs after 30 days. Theres a lot "Me too" or "I have this issue, when will this get fixed" on really old/stale issues and in order to properly triage, users need to supply their configurations. This workflow is pulled from the AWS provider's repo to force users to fill out a proper issue ticket and keep chatter out of merged PRs or old issuesMotivation and Context
Breaking Changes
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request