8000 GitHub - brk3/pre-commit-tfupdate: pre-commit hook for tfupdate that works around auto-update limitations
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

brk3/pre-commit-tfupdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Overview

This repo contains a pre-commit hook for tfupdate, similar to what's offered by antonbabenko/pre-commit-terraform.

It allows for auto update of modules and non core providers, both of which are a limitation in tfupdate (minamijoyo/tfupdate#65) and hence antonbabenko/pre-commit-terraform.

Usage

Providers

Assume you have a terraform config with the following:

terraform {
  required_version = "1.4.6"

  required_providers {
    keycloak = {
      source  = "mrparkers/keycloak"
      version = "4.2.0"
    }
  }
}

To update this to the latest verison of mrparkers/keycloak, place the following in your .pre-commit-config.yaml:

- repo: https://github.com/brk3/pre-commit-tfupdate
  rev: 0.0.2
  hooks:
    - id: tfupdate
      name: Auto update mrparkers/keycloak provider
      args: [tfregistryProvider, provider, mrparkers/keycloak, keycloak]

Modules

Assume you have a terraform config with the following:

module "db" {
  source  = "terraform-aws-modules/rds/aws"
  version = "3.1.0"

  ...
}

To update this to the latest version of terraform-aws-modules/rds/aws, place the following in your .pre-commit-config.yaml:

- repo: https://github.com/brk3/pre-commit-tfupdate
  rev: 0.0.2
  hooks:
    - id: tfupdate
      name: Auto update terraform-aws-modules/rds/aws module
      args: [tfregistryModule, module, terraform-aws-modules/rds/aws, terraform-aws-modules/rds/aws]

About

pre-commit hook for tfupdate that works around auto-update limitations

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0