Skip to content

Support a configuration file to pin versions recursively #75

@nitrocode

Description

@nitrocode

It would be nice if tfupdate could support a configuration file to pin versions recursively. Then we could have a config in our mono infra repo and run a single command in a pre-commit hook and in our gh action to ensure we use the verified versions.

I was thinking of the following config, similar to tflint

#.tfupdate.hcl
tfupdate {
  recursive = true

  terraform {
    required_version = "> 1.0.0"

    providers = {
      "aws" = {
        source = "hashicorp/aws"
        version = "~> 4"
      }
      "tls" = {
        source = "hashicorp/tls"
        version = "~> 3"
      }
      # 50 other providers with specific versions
    }
  }
}

Then we can run the command without having to string together multiple commands

tfupdate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions