terraform

package
v1.27.0-dev Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const LockFile = "terraform.lock"

Variables

This section is empty.

Functions

func RemoveLock

func RemoveLock(ctx context.Context, packageID int64) error

RemoveLock removes the terraform lock for the given package.

func SetLock

func SetLock(ctx context.Context, packageID int64, lock *LockInfo) error

SetLock sets the terraform lock for the given package.

Types

type LockInfo

type LockInfo struct {
	ID        string    `json:"ID"`
	Operation string    `json:"Operation"`
	Info      string    `json:"Info"`
	Who       string    `json:"Who"`
	Version   string    `json:"Version"`
	Created   time.Time `json:"Created"`
	Path      string    `json:"Path"`
}

LockInfo is the metadata for a terraform lock.

func GetLock

func GetLock(ctx context.Context, packageID int64) (LockInfo, error)

GetLock returns the terraform lock for the given package. Lock is empty if no lock exists.

func ParseLockInfo

func ParseLockInfo(r io.Reader) (*LockInfo, error)

func (*LockInfo) IsLocked

func (l *LockInfo) IsLocked() bool

type State

type State struct {
	Serial  uint64 `json:"serial"`
	Lineage string `json:"lineage"`
}

func ParseState

func ParseState(r io.Reader) (*State, error)

ParseState parses the required parts of Terraform state file

Jump to

Keyboard shortcuts

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