Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

required_version is too strict with 0.39.0 #1453

Closed
franzs opened this issue Jul 28, 2022 · 1 comment
Closed

required_version is too strict with 0.39.0 #1453

franzs opened this issue Jul 28, 2022 · 1 comment

Comments

@franzs
Copy link

franzs commented Jul 28, 2022

Introduction

The new version 0.39.0 of tflint causes extra warnings.

Expected Behavior

No warning should occur as with version 0.38.1 and below.

Actual behavior

Having a terraform block without required_version causes a warning although there is a required_version in another terraform block:

% tflint
1 issue(s) found:

Warning: terraform "required_version" attribute is required (terraform_required_version)

  on  line 0:
   (source code not available)

Reference: https://github.com/terraform-linters/tflint/blob/v0.39.0/docs/rules/terraform_required_version.md

Step to Reproduce

backend.tf:

terraform {
  backend "gcs" {
    bucket = "tfstate"
    prefix = "prefix"
  }
}

versions.tf:

terraform {
  required_version = "~> 1.1.0"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 4.27.0"
    }
  }
}

Run tflint version 0.39.0.

Additional Context

% tflint -v
TFLint version 0.39.0
% terraform -v
Terraform v1.1.9
on linux_amd64
@franzs
Copy link
Author

franzs commented Jul 28, 2022

Oh, this is a duplcate of #1451. Sorry...

@franzs franzs closed this as completed Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant