plugin

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTaintedPath        = errors.New("filepath is tainted")
	ErrMaxSizeSizeLimit   = errors.New("max size limit of decoded data exceeded")
	ErrActionUnknown      = errors.New("action not found")
	ErrInvalidTofuVersion = errors.New("invalid version string")
	ErrHTTPError          = errors.New("http error")
)

Functions

This section is empty.

Types

type FmtOptions

type FmtOptions struct {
	List  *bool `json:"list"`
	Write *bool `json:"write"`
	Diff  *bool `json:"diff"`
	Check *bool `json:"check"`
}

FmtOptions fmt options for the OpenTofu fmt command.

type InitOptions

type InitOptions struct {
	BackendConfig []string `json:"backend-config"`
	Lock          *bool    `json:"lock"`
	LockTimeout   string   `json:"lock-timeout"`
}

InitOptions include options for the OpenTofu init command.

type Plugin

type Plugin struct {
	*wp.Plugin
	Settings *Settings
}

Plugin implements provide the plugin.

func New

func New(options wp.Options, settings *Settings) *Plugin

func (*Plugin) Execute

func (p *Plugin) Execute() error

Execute provides the implementation of the plugin.

func (*Plugin) FlagsFromContext added in v0.1.3

func (p *Plugin) FlagsFromContext() error

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate handles the settings validation of the plugin.

type Settings

type Settings struct {
	Action cli.StringSlice

	TofuVersion string
	InitOptions InitOptions
	FmtOptions  FmtOptions

	RootDir     string
	DataDir     string
	OutFile     string
	Parallelism int
	Targets     cli.StringSlice
	Refresh     bool
	NoLog       bool
}

Settings for the Plugin.

Jump to

Keyboard shortcuts

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