Implement a DevOps-specific custom ruleset plugin
Summary
We want to implement a custom TFLint ruleset to enforce DevOps-specific Terraform linting standards that are not covered by existing community rulesets such as tflint-ruleset-terraform or tflint-ruleset-google.
Scope
This issue tracks the creation of a custom TFLint plugin, integration into our Docker infrastructure, and adoption in the standard Terraform CI pipeline.
Details
-
Custom Ruleset Plugin
We'll create a new TFLint plugin dedicated to checks relevant to our DevOps practices. -
Initial Rule
The first rule to be included will enforce version constraint formatting:- Root modules must use the
~> major.minorformat. - Reusable/shared modules must use the
>= versionformat.
- Root modules must use the
-
Docker Integration
The custom plugin will be included in a new Docker image built and maintained in ourdockerimagesrepository. -
CI Pipeline Update
Thetflintjob in our standard Terraform pipeline will be updated to use this new Docker image, ensuring the new rule is automatically enforced during CI.
Acceptance Criteria
-
A new TFLint plugin project exists with the initial rule implemented and tested. -
The plugin is packaged into a custom Docker image in the dockerimagesrepo. -
CI templates are modified to use the new image. -
Repository pipelines are updated to use the CI templates. -
Documentation is added for how to maintain and extend the ruleset.