terraform-linters / tflint

A Pluggable Terraform Linter
Mozilla Public License 2.0
4.97k stars 357 forks source link

The latest version don't use the last version of the tflint-ruleset-azurerm #2018

Closed julienLemarie closed 7 months ago

julienLemarie commented 7 months ago

Summary

Hello,

I have an alert on the azurerm_automation_runbook because the last version of the Docker image get the 0.25.1 azurerm ruleset version: image

But the last version is the 0.26.0: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.26.0/docs/rules/azurerm_automation_runbook_invalid_runbook_type.md

Command

tflint

Terraform Configuration

terraform {
  required_providers {
    # https://github.com/hashicorp/terraform-provider-azuread/releases
    azuread = {
      source  = "hashicorp/azuread"
      version = ">= 2.47.0, < 3.0.0"
    }
    # https://registry.terraform.io/providers/hashicorp/azurerm/latest
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 3.94.0, < 4.0.0"
    }
    # https://github.com/hashicorp/terraform-provider-null/releases
    null = {
      source  = "hashicorp/null"
      version = ">= 3.2.2, < 4.0.0"
    }
    # https://github.com/hashicorp/terraform-provider-random/releases
    # tflint-ignore: terraform_unused_required_providers
    random = {
      source  = "hashicorp/random"
      version = ">= 3.6.0, < 4.0.0"
    }
  }

  # https://github.com/hashicorp/terraform/releases
  required_version = ">= 1.7.4, < 2.0.0"
}

TFLint Configuration

- stage: Linting
  displayName: Linting analysis
  jobs:  
  - job: TFLint
    displayName: TFLint analysis
    steps:

    - task: CmdLine@2
      displayName: Pull TFLint docker image
      inputs:    
        script: docker pull ghcr.io/terraform-linters/tflint:latest

    - task: CmdLine@2
      displayName: 'TFLint'
      inputs:        
        script: |
          docker run --rm -v $(System.DefaultWorkingDirectory):/data --entrypoint=/bin/sh -t ghcr.io/terraform-linters/tflint \
          -c "tflint --init
          cd '/data'
          tflint --recursive --config '/data/.tflint.hcl'"

Output

Installed "azurerm" (source: github.com/terraform-linters/tflint-ruleset-azurerm, version: 0.25.1)
2 issue(s) found:

Error: "PowerShell72" is an invalid value as runbook_type (azurerm_automation_runbook_invalid_runbook_type)

  on terraform-client/automation-account.tf line 156:
 156:   runbook_type = "PowerShell72"

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.25.1/docs/rules/azurerm_automation_runbook_invalid_runbook_type.md

Error: "PowerShell72" is an invalid value as runbook_type (azurerm_automation_runbook_invalid_runbook_type)

  on terraform-client/automation-account.tf line 206:
 206:   runbook_type = "PowerShell72"

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.25.1/docs/rules/azurerm_automation_runbook_invalid_runbook_type.md

##[error]Bash exited with code '2'.

TFLint Version

0.50.3

Terraform Version

1.7.4

Operating System