-
Notifications
You must be signed in to change notification settings - Fork 104
Added validation 'db_use_mtls' variable and updated min tf req to 1.9.0 #374
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
Conversation
updated tf ver to 1.9.0, updated auto workflow tflint version and added --chdir in tflint, and update tflint config
ajmera-naman
left a comment
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.
Great work! Could you attach the release test links to your PR.
sure, updated |
tauhid621
left a comment
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.
Looks good overall.
I just want to know if this could break existing infra which is deployed using the module 🤔
| This module is intended to run in an AWS account with minimal preparation, however it does have the following pre-requisites: | ||
|
|
||
| ### Terraform version >= 0.14 | ||
| ### Terraform version >= 1.9.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.
Could there be any implications of the version bump for existing infra which uses this module?
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.
yes, as cross referencing variable in validation block is available from 1.9.0, so consumer of this module needs to use terraform version 1.9.0+
| mtls_database = try(module.database_mtls[0], local.default_database) | ||
| standard_db = try(module.database[0], local.default_database) | ||
|
|
||
| selected_database = ( |
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 am wondering if we used to get error from this earlier?
If yes, was it during a later stage?
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.
it should not break any exisitng infra as there is no tf script changes in the pr. if consumer is using it may break any existing pipeline which is using terraform version <= 1.9 and deploy tfe using this module. |
tauhid621
left a comment
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.
Looks good overall. I guess we can expect end users to update to 1.9 if they are using an older version.
ajmera-naman
left a comment
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
I had the same concern, and things will definitely break (as they did in release tests where the version had to be bumped up). Alos, people using |
|
Closing this PR for now. These changes would break compatibility for users running Terraform |

Background
I have added validation
db_use_mtlsto give error whendb_use_mtlsandenable_auroraboth variable are true.Why?
to improve the developer experience
How?
I have added validation block in
db_use_mtlsvariable and cross referenceenable_auroravariable, to cross reference min tf version should be1.9.0so I have updated min tf version requirement to1.9.0, I had to also updated tflint version in workflow as older version gives error on cross referencing variable in validation.also updated tflint command and config as newer version have removed options/feature marked as deprecated:
--chdiroption in tflint commandmodule = falsetocall_module_type = "none"in tflint config (.tflint.hcl)Testing?
tested changes locally by setting
db_use_mtlsandenable_auroravariable true and false, see below screenshotScreenshots
✅db_use_mtls,✅enable_aurora✅db_use_mtls,❌enable_aurora❌db_use_mtls,✅enable_aurora❌db_use_mtls,❌enable_aurorarelease test also passed - https://github.com/hashicorp/terraform-enterprise/actions/runs/17382920555
note: one of the azure release test is falling due to an allocation error, which is not related to version changes.
How Has This Been Tested
Ran Locally to check error behavior and its working as expected
Test Configuration
db_use_mtlsandenable_auroratrue, it will show error interraform planThis PR makes me feel