tfstate

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MoveOpt

type MoveOpt struct {
	StatePath string
	StateOut  string
}

MoveOpt is an option of MoveState function.

type Reader

type Reader struct {
	Stderr    io.Writer
	Logger    log.Logger
	Terraform *tfexec.Terraform
}

Reader reads Terraform State.

func (*Reader) Read added in v0.5.0

func (reader *Reader) Read(ctx context.Context, filePath string) (*tfjson.State, error)

Read gets Terraform State by `terraform show -json` command.

type RemoveOpt

type RemoveOpt struct {
	StatePath string
}

RemoveOpt is an option of MoveState function.

type Updater

type Updater struct {
	Stdout    io.Writer
	Stderr    io.Writer
	DryRun    bool
	Logger    log.Logger
	Terraform *tfexec.Terraform
}

Updater updates Terraform State by `terraform state` commands.

func (*Updater) Move

func (updater *Updater) Move(ctx context.Context, sourceAddress, newAddress string, opt *MoveOpt) error

Move runs `terraform state mv`.

func (*Updater) Remove

func (updater *Updater) Remove(ctx context.Context, address string, opt *RemoveOpt) error

Remove runs `terraform state rm`.

Jump to

Keyboard shortcuts

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