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

DENA-969: Split tflint configs between MSK and team clusters #573

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

sbuliarca
Copy link
Contributor

@sbuliarca sbuliarca commented Sep 26, 2024

We need to split this, as we want to implement rules that apply only for MSK modules

@sbuliarca sbuliarca changed the title Split tflint configs between MSK and team clusters DENA-969: Split tflint configs between MSK and team clusters Sep 27, 2024
Copy link

linear bot commented Sep 27, 2024

@sbuliarca sbuliarca marked this pull request as ready for review September 27, 2024 06:51
@sbuliarca sbuliarca requested a review from a team as a code owner September 27, 2024 06:51
@@ -10,5 +12,5 @@ rule "terraform_standard_module_structure" {

# Include module calls
config {
module = true
call_module_type = "all"

Choose a reason for hiding this comment

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

@sbuliarca sbuliarca merged commit 5405026 into main Sep 27, 2024
2 checks passed
@sbuliarca sbuliarca deleted the move-tflint-per-folder branch September 27, 2024 08:28
# use compact, so that errors will be reported by the GH action see https://github.com/terraform-linters/setup-tflint?tab=readme-ov-file#checks
- --args=--format=compact
# We won't be able to use --hook-config=--delegate-chdir, as we need to determine the current folder in our plugin tflint-ruleset-kafka-config.
files: "^.*/kafka-shared-msk/.+/.*$"
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep things simple, we could probably just match the start of the path (or is there a reason we enforce the depth with the /.+/. bit?)

Suggested change
files: "^.*/kafka-shared-msk/.+/.*$"
files: "^.*/kafka-shared-msk/"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, as we don't wanna run it on the folder dev-asw/kafka-shared-msk/ as it doesn't contain any module. Only on its subfolders

Comment on lines -13 to +15
module = true
call_module_type = "all"
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to require tflint v0.50.0+ https://github.com/terraform-linters/tflint/releases/tag/v0.50.0 but I don't think we version this at all (it needs to be installed independently from pre-commit, maybe worth noting somewhere that we only support running the latest version of tflint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We mention installing it here: https://github.com/utilitywarehouse/kafka-cluster-config/blob/main/CONTRIBUTING.md. Maybe worth moving it directly to readme, as it might be missed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants