FAQ | This is a LIVE service | Changelog

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.minor format.
    • Reusable/shared modules must use the >= version format.
  • Docker Integration
    The custom plugin will be included in a new Docker image built and maintained in our dockerimages repository.

  • CI Pipeline Update
    The tflint job 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 dockerimages repo.
  • 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.
Edited by Ryan Kowalewski