terraform

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLock added in v0.18.0

func CheckLock(directory string) error

CheckLock checks that the lockfile exists

func Clean

func Clean(directory string) error

Clean cache in a terraform directory

func Docs added in v0.6.0

func Docs(directory string) error

Docs validate if the README of a module are up to date with the content of the module

func DocsFix added in v0.6.0

func DocsFix(directory string) error

DocsFix updates the README to the configuration of the module

func FindTerraformProjects

func FindTerraformProjects(base string) ([]string, error)

FindTerraformProjects will search through the base directory to find the all terraform projects

func HasChanges added in v0.8.0

func HasChanges(terraformProjects []string) (bool, error)

HasChanges checks if the current branch has any terraform changes compared to the main branch

func HasTerraformDocsConfig added in v0.14.2

func HasTerraformDocsConfig(dir string) bool

HasTerraformDocsConfig checks whether the given directory contains a terraform-docs.yml configuration file.

func Init

func Init(directory string) error

Init downloads Terraform modules locally

func InitUpgrade

func InitUpgrade(directory string) error

InitUpgrade downloads and updates Terraform modules locally

func IsTerraformProject

func IsTerraformProject(p string, d fs.DirEntry) bool

IsTerraformProject returns true if a directory contains a go module.

func IsTerraformSubmodule added in v0.20.2

func IsTerraformSubmodule(dir string) bool

IsTerraformSubmodule returns true if the directory is a subdirectory of another terraform project.

func Lint

func Lint(directory, tfLintCfg string) error

Lint runs the linters

func LintFix

func LintFix(directory, tfLintCfg string) error

LintFix fixes found issues (if it's supported by the linters)

func ProviderLock

func ProviderLock(directory string) error

ProviderLock updates the provider lock file locking poviders for a list of os architecures

func Security

func Security(directory string) error

Security validates security of the terraform project config --exit-code 1 --misconfig-scanners=terraform

func Test

func Test(directory string) error

Test automates testing the packages named by the import paths, see also: go test.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL