Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request] Fix the tflint recommended preset findings and enforce the full preset

未关闭
#321 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
terraform

调研方向

Start with .tflint.hcl and tools/tflint.sh, then run tflint to reproduce the 66 findings and the evaluation failure in blueprints/fedramp-high/cloud-scheduler-job. Work through the reported unused declarations, deprecated interpolations, and untyped variable, recording notes for removed variables that may still appear in tfvars files. Done when the preset reports no findings, the blueprint loads successfully, and the script enforces the full preset.

由索引模型根据 Issue 内容生成。

描述

Enhancement Level of Effort - Medium Priority - Medium Scope - Blueprint Scope - Fast Scope - Module

Feature Description

Fix the findings that the tflint recommended preset reports today, then let tools/tflint.sh enforce the whole preset instead of only the terraform_naming_convention rule.

Use Case

  • The .tflint.hcl file enables the recommended preset, but CI never ran tflint until #310, so findings accumulated.
  • On main, the preset reports 66 findings: 62 terraform_unused_declarations, 3 terraform_deprecated_interpolation and 1 terraform_typed_variables.
  • tflint also fails to load blueprints/fedramp-high/cloud-scheduler-job, because it evaluates base64encode(var.data) with a null default.

Proposed Solution

  • Remove or use the unused variables and locals, convert the deprecated interpolations, and type the remaining variable.
  • Fix the cloud-scheduler-job evaluation, for example by guarding the null value.
  • Drop --only=terraform_naming_convention from tools/tflint.sh once the findings reach zero.
  • Removing an unused variable breaks tfvars files that still set it, so each removal needs a note.

Compliance & Deployment Context

  • Target Deployment Type(s):
    • US Region Restricted (e.g., Access Policy constraint)
    • FedRAMP Moderate
    • FedRAMP High
    • DoD IL4
    • DoD IL5
    • All / General
  • Relevant NIST 800-53r5 Controls: CM-2 baseline configuration

Reusability Check

Stellar Engine prioritizes reusability.

  • I have checked if this functionality can be achieved by extending an existing module or blueprint.
  • I have verified that this does not duplicate existing functionality.

Alternatives Considered

  • Disable the noisy rules in .tflint.hcl, which hides real dead code.
  • Keep only the naming rule, which leaves the preset unenforced.

Additional Context

  • Related: #309, #310 and #311.
主要语言
HCL
星标
55
派生
21
平均合并
1 天 13 小时
30 天内合并 PR
48

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google/stellar-engine 的其他 Issue

查看 google/stellar-engine 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。