terraform

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanAndUpdateModules

func ScanAndUpdateModules(
	workDir string,
	oldSourceSubstr string,
	newIsVer bool,
	newVer *semver.Version,
	newConstr *semver.Constraints,
	newInput string,
	configTiers map[string]bool,
	strategy version.Strategy,
	dryRun bool,
	force bool,
) error

ScanAndUpdateModules walks `rootDir`, searching for *.tf files. For each, calls UpdateModuleVersionInFile(...) to update module blocks if needed.

func ShouldProcessTier

func ShouldProcessTier(path string, configTiers map[string]bool) bool

ShouldProcessTier determines if a given path should be processed based on the config tiers

func UpdateModuleVersionInFile

func UpdateModuleVersionInFile(
	filename string,
	oldSourceSubstr string,
	newIsVer bool,
	newVer *semver.Version,
	newConstr *semver.Constraints,
	newInput string,
	strategy version.Strategy,
	dryRun bool,
	force bool,
) (bool, string, string, error)

UpdateModuleVersionInFile reads a single .tf file, finds any module blocks whose "source" matches oldSourceSubstr, then updates "version" attribute using "keep old if it fits new, else new" logic. We pass newInput to decideVersionOrRange.

Types

This section is empty.

Jump to

Keyboard shortcuts

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