agentleFS
Microsoft AzureKnown publisherAzure/azure-verified-modules-managed-files/terraform/root/.github/skills/avm-tf-tflint/SKILL.md

avm-tf-tflint

Skill1 starsChanged 2 months agoMITView on GitHub

Use whenever an AVM Terraform task involves TFLint findings, AVM rule names, rule applicability, severity, exclusions, exceptions, override files, or lint validation. Covers the current canonical avm_* rules and the Avm.Authoring override merge process. Trigger on "tflint", "lint failure", "disable rule", "ignore rule", "rule override", "avm.tflint", "severity", and any AVM TFLint rule identifier.

232 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use TFLint through Avm.Authoring.

    line 8
  2. Distinctive:

    Before diagnosing a finding or changing rule configuration:

    line 12
  3. Distinctive:

    Read the current AVM TFLint rules and configuration overrides.

    line 14
  4. Very specific:

    Read the current Azure/tflint-ruleset-avm rule inventory.

    line 15
  5. Distinctive:

    Check the latest released ruleset when a plugin version or supported option matters.

    line 16
  6. Very specific:

    If the version gate reports a stale installation, run avm update, re-import the module, and retry.

    line 29
  7. Distinctive:

    Do not approximate the managed configuration with a separately installed TFLint binary, custom plugin setup, Make, Porch, or a container.

    line 31
  8. Distinctive:

    Use the supported AVM override files by default.

    line 35
  9. Distinctive:

    Read the rule guidance and its linked AVM specification.

    line 49
  10. Distinctive:

    Prefer a compliant code change.

    line 51
  11. Distinctive:

    If an exception is justified, decide whether a line-level annotation preserves more coverage than the narrowest supported override file.

    line 52
  12. Distinctive:

    Never disable a rule merely to make CI pass.

    line 56
  13. Distinctive:

    Use normal TFLint rule configuration with the current canonical rule name:

    line 70
  14. Distinctive:

    Run the managed command and address findings from each owner.

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AVM Terraform TFLint

Use TFLint through Avm.Authoring. Fix violations instead of suppressing them unless the published AVM requirement genuinely does not apply.

Read current sources first

Before diagnosing a finding or changing rule configuration:

  1. Read the current AVM TFLint rules and configuration overrides.
  2. Read the current Azure/tflint-ruleset-avm rule inventory.
  3. Check the latest released ruleset when a plugin version or supported option matters.
  4. Fetch the linked AVM specification for the reported rule before changing Terraform.

The published rules guide controls applicability and the supported override process. The released plugin controls valid rule identifiers and configuration. Do not rely on an older module, cached rule name, or this inventory when a live source differs.

Run the managed toolchain

Import-Module Avm.Authoring
avm version
avm lint

If the version gate reports a stale installation, run avm update, re-import the module, and retry. Run avm pre-commit before linting when managed sync or transforms can affect the configuration. Use avm pr-check only after committing the complete worktree because it requires a clean worktree.

Do not approximate the managed configuration with a separately installed TFLint binary, custom plugin setup, Make, Porch, or a container.

Prefer configuration overrides

Use the supported AVM override files by default. They make exceptions visible, reviewable, and consistent across the intended root, submodule, or example scope.

Use a line-level TFLint annotation when a single finding is exceptional and disabling the rule for the full supported configuration scope would hide unrelated findings. TFLint annotations can suppress issues only in valid, parseable Terraform and only when the rule permits annotations. Read the current TFLint annotation documentation before using one.

# This declaration is consumed after the managed transform runs.
# tflint-ignore: terraform_unused_declarations
avm_azapi_header = join(" ", [for k, v in local.avm_azapi_headers : "${k}=${v}"])

Name only the specific rule and explain the reason. Do not use all. Avoid file-level annotations unless the entire file genuinely needs the same exception.

Override only after investigating

  1. Read the rule guidance and its linked AVM specification.
  2. Confirm the rule applies to the failing root, submodule, or example.
  3. Prefer a compliant code change.
  4. If an exception is justified, decide whether a line-level annotation preserves more coverage than the narrowest supported override file.
  5. Explain why the exception is valid, its exact scope, and any issue or pull request that will remove it.
  6. Re-run avm lint and inspect the merged-scope result.

Never disable a rule merely to make CI pass. Keep exceptions temporary where possible. A scope-wide override does not authorize unrelated violations in that scope; manually review the scope for any additional occurrences.

Supported override files

FileScope
avm.tflint.override.hclRoot module checks.
avm.tflint_module.override.hclEvery direct submodule under modules/*.
avm.tflint_example.override.hclEvery direct example under examples/*.
modules/<name>/avm.tflint.override.hclOne direct submodule only.
examples/<name>/avm.tflint.override.hclOne direct example only.

Avm.Authoring merges the immutable AVM base configuration first, then the matching repository-wide scope override, then the target-directory override. The target override wins for that direct submodule or example. Nested module and example roots are prohibited, so do not invent override paths below modules/* or examples/*.

Use normal TFLint rule configuration with the current canonical rule name:

# This pattern module does not represent one resource, so RMFR7 does not apply.
rule "avm_output_resource_id_required" {
  enabled = false
}

AVM plugin rules also accept severity = "error", "warning", or "notice":

# Track legacy interface migration without blocking unrelated maintenance.
rule "avm_interface_lock_deprecated" {
  enabled  = true
  severity = "notice"
}

Per-rule severity changes are separate from TFLint's global --minimum-failure-severity process threshold.

For a narrowly approved AzureRM exception, prefer an override of avm_provider_azurerm_disallowed in the narrowest supported scope and list every permitted azurerm_* block in the justification comments with the AzAPI gap and upstream issue or pull request. If the scope contains other AzureRM checks that must remain enforced, use a justified line-level annotation for the exceptional finding instead. Manually verify that no undocumented AzureRM declarations or usages exist.

Canonical rule names

Ruleset v1.0.0 removed all legacy aliases. Every AVM rule identifier starts with avm_. Old names such as provider_azurerm_disallowed, required_output_rmfr7, resource_types, retry, and timeouts are invalid in current configuration.

This is the current v1.0.0 inventory. Verify it against the live sources above before use.

RuleScopeDefault severity
avm_azapi_data_response_export_values_requiredAll module scopesError
avm_azapi_replace_triggers_refs_validAll module scopesError
avm_azapi_resource_tags_requiredAll module scopesError
avm_azapi_response_export_values_requiredAll module scopesError
avm_interface_customer_managed_keyAll module scopesError
avm_interface_diagnostic_settingsAll module scopesError
avm_interface_ignore_body_changesAll module scopesError
avm_interface_locationAll module scopesError
avm_interface_lockAll module scopesError
avm_interface_lock_deprecatedAll module scopesNotice
avm_interface_managed_identitiesAll module scopesError
avm_interface_private_endpointsAll module scopesError
avm_interface_private_endpoints_deprecatedAll module scopesNotice
avm_interface_private_endpoints_manage_dns_zone_groupAll module scopesError
avm_interface_resource_typesAll module scopesError
avm_interface_retryAll module scopesError
avm_interface_role_assignmentsAll module scopesError
avm_interface_role_assignments_deprecatedAll module scopesNotice
avm_interface_tagsAll module scopesError
avm_interface_timeoutsAll module scopesError
avm_output_entire_resource_disallowedModule scopesError
avm_output_resource_id_requiredRoot moduleError
avm_provider_azapi_version_constraintModule scopesError
avm_provider_azurerm_disallowedModule scopesError
avm_provider_azurerm_version_constraintModule scopesError
avm_provider_modtm_version_constraintModule scopesError
avm_terraform_configuration_file_requiredModule scopesError
avm_terraform_ignore_changes_unquoted_referencesAll module scopesError
avm_terraform_literal_heredoc_disallowedAll module scopesNotice
avm_terraform_module_source_requiredModule scopesError
avm_terraform_provider_block_disallowedModule scopesWarning
avm_terraform_sensitive_variable_default_disallowedAll module scopesWarning

Understand adjacent tooling

The AVM plugin does not duplicate all formatting and Terraform checks:

  • MAPOTF owns deterministic ordering, file placement transforms, formatting, and removal of redundant explicit nullable = true.
  • The standard Terraform TFLint plugin validates Terraform and provider requirement declarations.
  • The AVM ruleset adds AVM-specific specification checks.

Run the managed command and address findings from each owner. Do not create an AVM-rule override for a formatting problem owned by MAPOTF.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.