Skip to content

Report & add missing module versions #1475

Open
@radeksimko

Description

@radeksimko

Context

Some users may end up producing configuration such as the following example:

module "name" {
  source = "terraform-aws-modules/eks/aws"
}

^ i.e. without explicitly defining which version(s) of the module do they want/expect

This represents poor practice because it ignores the fact that modules may (and often do) introduce breaking changes.

Proposal

  • Report missing version for Registry modules as a warning diagnostic
  • Provide a quickfix code action which adds the version constraint based on latest available major version, such as version = "~> 19.17" for terraform-aws-modules/eks/aws

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions