tfwrite

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateProviderLockConstraints

func UpdateProviderLockConstraints(filePath, providerSource, constraints string) (bool, error)

UpdateProviderLockConstraints updates only the constraints attribute of an existing provider entry in .terraform.lock.hcl. Returns false if the provider block was not found.

func WriteModuleVersion

func WriteModuleVersion(filePath, moduleName, newVersion string) error

WriteModuleVersion updates the version attribute of a module block in a .tf file.

func WriteProviderLock

func WriteProviderLock(filePath, providerSource, version, constraints string, hashes []string) error

WriteProviderLock creates or updates a provider entry in .terraform.lock.hcl.

func WriteProviderVersion

func WriteProviderVersion(filePath, providerName, newConstraint string) error

WriteProviderVersion updates the version constraint in a required_providers block. Since hclwrite doesn't support nested object manipulation directly, we use token-level string replacement within the provider attribute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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