views

package
v1.14.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MPL-2.0 Imports: 55 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const JSON_UI_VERSION = "1.2"

This version describes the schema of JSON UI messages. This version must be updated after making any changes to this view, the jsonHook, or any of the command/views/json package.

Variables

View Source
var ErrorInputDisabled = fmt.Errorf("in this view cannot ask user input")

Functions

func NewUIOptionalHook

func NewUIOptionalHook(view *View) tofu.Hook

func SaveErroredTestStateFile

func SaveErroredTestStateFile(state *states.State, run *moduletest.Run, file *moduletest.File, view Test)

SaveErroredTestStateFile is a helper function to invoked in DestroySummary to store the state to errored_test.tfstate and handle associated diagnostics and errors with this operation

Types

type Apply

type Apply interface {
	ResourceCount(stateOutPath string)
	Outputs(outputValues map[string]*states.OutputValue)

	Operation() Operation
	Hooks() []tofu.Hook

	Diagnostics(diags tfdiags.Diagnostics)
	HelpPrompt()

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

The Apply view is used for the apply command.

func NewApply

func NewApply(args *arguments.View, destroy bool, view *View) Apply

NewApply returns an initialized Apply implementation for the given ViewType.

type ApplyHuman

type ApplyHuman struct {
	// contains filtered or unexported fields
}

The ApplyHuman implementation renders human-readable text logs, suitable for a scrolling terminal.

func (*ApplyHuman) Backend

func (v *ApplyHuman) Backend() Backend

func (*ApplyHuman) Diagnostics

func (v *ApplyHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ApplyHuman) HelpPrompt

func (v *ApplyHuman) HelpPrompt()

func (*ApplyHuman) Hooks

func (v *ApplyHuman) Hooks() []tofu.Hook

func (*ApplyHuman) Operation

func (v *ApplyHuman) Operation() Operation

func (*ApplyHuman) Outputs

func (v *ApplyHuman) Outputs(outputValues map[string]*states.OutputValue)

func (*ApplyHuman) ResourceCount

func (v *ApplyHuman) ResourceCount(stateOutPath string)

type ApplyJSON

type ApplyJSON struct {
	// contains filtered or unexported fields
}

The ApplyJSON implementation renders streaming JSON logs, suitable for integrating with other software.

func (*ApplyJSON) Backend

func (v *ApplyJSON) Backend() Backend

func (*ApplyJSON) Diagnostics

func (v *ApplyJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*ApplyJSON) HelpPrompt

func (v *ApplyJSON) HelpPrompt()

func (*ApplyJSON) Hooks

func (v *ApplyJSON) Hooks() []tofu.Hook

func (*ApplyJSON) Operation

func (v *ApplyJSON) Operation() Operation

func (*ApplyJSON) Outputs

func (v *ApplyJSON) Outputs(outputValues map[string]*states.OutputValue)

func (*ApplyJSON) ResourceCount

func (v *ApplyJSON) ResourceCount(stateOutPath string)

type ApplyMulti

type ApplyMulti []Apply

func (ApplyMulti) Backend

func (m ApplyMulti) Backend() Backend

func (ApplyMulti) Diagnostics

func (m ApplyMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ApplyMulti) HelpPrompt

func (m ApplyMulti) HelpPrompt()

func (ApplyMulti) Hooks

func (m ApplyMulti) Hooks() []tofu.Hook

func (ApplyMulti) Operation

func (m ApplyMulti) Operation() Operation

func (ApplyMulti) Outputs

func (m ApplyMulti) Outputs(outputValues map[string]*states.OutputValue)

func (ApplyMulti) ResourceCount

func (m ApplyMulti) ResourceCount(stateOutPath string)

type Backend

type Backend interface {
	Basic
	InitializingBackend()
	BackendTypeAlias(backendType, canonType string)
	UnconfiguringBackendType(backendType string)
	BackendTypeUnset(backendType string)
	BackendTypeSet(backendType string)
	BackendTypeChanged(oldBackendType string, newBackendType string)
	BackendReconfigured()
	MigrationCompleted(workspaces []string, currentWs string)

	StateLocker() StateLocker
}

func NewBackendHuman

func NewBackendHuman(view *View) Backend

NewBackendHuman returns a new Backend instance that will print in human format. This particular function is meant to be used only in special cases, where the Backend view cannot be acquired from a command related view (eg: Apply.Backend). At the moment of writing this comment, this function is meant to be used only to create this view in cases where it is not initialised correctly, which are paths that are only reachable from incomplete configured tests.

type BackendHuman

type BackendHuman struct {
	// contains filtered or unexported fields
}

func (*BackendHuman) BackendReconfigured

func (v *BackendHuman) BackendReconfigured()

func (*BackendHuman) BackendTypeAlias

func (v *BackendHuman) BackendTypeAlias(backendType, canonType string)

func (*BackendHuman) BackendTypeChanged

func (v *BackendHuman) BackendTypeChanged(oldBackendType string, newBackendType string)

func (*BackendHuman) BackendTypeSet

func (v *BackendHuman) BackendTypeSet(backendType string)

func (*BackendHuman) BackendTypeUnset

func (v *BackendHuman) BackendTypeUnset(backendType string)

func (*BackendHuman) Diagnostics

func (v *BackendHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*BackendHuman) InitializingBackend

func (v *BackendHuman) InitializingBackend()

func (*BackendHuman) MigrationCompleted

func (v *BackendHuman) MigrationCompleted(workspaces []string, currentWs string)

func (*BackendHuman) StateLocker

func (v *BackendHuman) StateLocker() StateLocker

func (*BackendHuman) UnconfiguringBackendType

func (v *BackendHuman) UnconfiguringBackendType(backendType string)

type BackendJSON

type BackendJSON struct {
	// contains filtered or unexported fields
}

func (*BackendJSON) BackendReconfigured

func (v *BackendJSON) BackendReconfigured()

func (*BackendJSON) BackendTypeAlias

func (v *BackendJSON) BackendTypeAlias(backendType, canonType string)

func (*BackendJSON) BackendTypeChanged

func (v *BackendJSON) BackendTypeChanged(oldBackendType string, newBackendType string)

func (*BackendJSON) BackendTypeSet

func (v *BackendJSON) BackendTypeSet(backendType string)

func (*BackendJSON) BackendTypeUnset

func (v *BackendJSON) BackendTypeUnset(backendType string)

func (*BackendJSON) Diagnostics

func (v *BackendJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*BackendJSON) InitializingBackend

func (v *BackendJSON) InitializingBackend()

func (*BackendJSON) MigrationCompleted

func (v *BackendJSON) MigrationCompleted(workspaces []string, currentWs string)

func (*BackendJSON) StateLocker

func (v *BackendJSON) StateLocker() StateLocker

func (*BackendJSON) UnconfiguringBackendType

func (v *BackendJSON) UnconfiguringBackendType(backendType string)

type BackendMulti

type BackendMulti []Backend

func (BackendMulti) BackendReconfigured

func (m BackendMulti) BackendReconfigured()

func (BackendMulti) BackendTypeAlias

func (m BackendMulti) BackendTypeAlias(backendType, canonType string)

func (BackendMulti) BackendTypeChanged

func (m BackendMulti) BackendTypeChanged(oldBackendType string, newBackendType string)

func (BackendMulti) BackendTypeSet

func (m BackendMulti) BackendTypeSet(backendType string)

func (BackendMulti) BackendTypeUnset

func (m BackendMulti) BackendTypeUnset(backendType string)

func (BackendMulti) Diagnostics

func (m BackendMulti) Diagnostics(diags tfdiags.Diagnostics)

func (BackendMulti) InitializingBackend

func (m BackendMulti) InitializingBackend()

func (BackendMulti) MigrationCompleted

func (m BackendMulti) MigrationCompleted(workspaces []string, currentWs string)

func (BackendMulti) StateLocker

func (m BackendMulti) StateLocker() StateLocker

func (BackendMulti) UnconfiguringBackendType

func (m BackendMulti) UnconfiguringBackendType(backendType string)

type BackendRemote

type BackendRemote interface {
	Basic
	Output(msg string, color bool)
	RunWarning(msg string)
	RenderLog(log *jsonformat.JSONLog) error
	RenderHumanPlan(plan jsonformat.Plan, mode plans.Mode)
	OperationCancelled()
	OperationNotCancelled()
	PreRefresh()
	InitialRetryError(isRemote bool)
	RepeatedRetryError(elapsed time.Duration)
	UnavailableVersionInBackend(localVersion, usedVersion string)
	ApplySavedHeader()
	LockTimeoutError()
	RemoteWorkspaceInRelativeDirectory(wd string, configDir string)
	WaitingForCostEstimation(elapsedHint string)
	WaitingForOperationToStart(opType string, elapsed string)
	WaitingForTheManuallyLockedWorkspace(elapsedHint string)
	WaitingForRuns(noOfRuns int, elapsedHint string)
	WaitingForQueuedRuns(noOfRuns int, elapsedHint string)
	OperationHeader(isApply bool, isRemote bool)
}

func NewBackendRemote

func NewBackendRemote(view *View) BackendRemote

NewBackendRemote returns an implementation of BackendRemote which is meant to be used for the cloud and remote implementations. Contrary to the idea of this package to have only commands related views creation exposed and non-commands views to be retrieved from the commands related one, this is exposed to be created because this has no json implementation and because the plug of this view in the places where it's needed is not yet straightforward.

type BackendRemoteHuman

type BackendRemoteHuman struct {
	// contains filtered or unexported fields
}

func (*BackendRemoteHuman) ApplySavedHeader

func (v *BackendRemoteHuman) ApplySavedHeader()

func (*BackendRemoteHuman) Diagnostics

func (v *BackendRemoteHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*BackendRemoteHuman) InitialRetryError

func (v *BackendRemoteHuman) InitialRetryError(isRemote bool)

func (*BackendRemoteHuman) LockTimeoutError

func (v *BackendRemoteHuman) LockTimeoutError()

func (*BackendRemoteHuman) OperationCancelled

func (v *BackendRemoteHuman) OperationCancelled()

func (*BackendRemoteHuman) OperationHeader

func (v *BackendRemoteHuman) OperationHeader(isApply bool, isRemote bool)

func (*BackendRemoteHuman) OperationNotCancelled

func (v *BackendRemoteHuman) OperationNotCancelled()

func (*BackendRemoteHuman) Output

func (v *BackendRemoteHuman) Output(msg string, colored bool)

func (*BackendRemoteHuman) PreRefresh

func (v *BackendRemoteHuman) PreRefresh()

func (*BackendRemoteHuman) RemoteWorkspaceInRelativeDirectory

func (v *BackendRemoteHuman) RemoteWorkspaceInRelativeDirectory(wd string, configDir string)

func (*BackendRemoteHuman) RenderHumanPlan

func (v *BackendRemoteHuman) RenderHumanPlan(plan jsonformat.Plan, mode plans.Mode)

func (*BackendRemoteHuman) RenderLog

func (v *BackendRemoteHuman) RenderLog(log *jsonformat.JSONLog) error

func (*BackendRemoteHuman) RepeatedRetryError

func (v *BackendRemoteHuman) RepeatedRetryError(elapsed time.Duration)

func (*BackendRemoteHuman) RunWarning

func (v *BackendRemoteHuman) RunWarning(description string)

func (*BackendRemoteHuman) UnavailableVersionInBackend

func (v *BackendRemoteHuman) UnavailableVersionInBackend(localVersion, usedVersion string)

func (*BackendRemoteHuman) WaitingForCostEstimation

func (v *BackendRemoteHuman) WaitingForCostEstimation(elapsedHint string)

func (*BackendRemoteHuman) WaitingForOperationToStart

func (v *BackendRemoteHuman) WaitingForOperationToStart(opType string, elapsed string)

func (*BackendRemoteHuman) WaitingForQueuedRuns

func (v *BackendRemoteHuman) WaitingForQueuedRuns(noOfRuns int, elapsedHint string)

func (*BackendRemoteHuman) WaitingForRuns

func (v *BackendRemoteHuman) WaitingForRuns(noOfRuns int, elapsedHint string)

func (*BackendRemoteHuman) WaitingForTheManuallyLockedWorkspace

func (v *BackendRemoteHuman) WaitingForTheManuallyLockedWorkspace(elapsedHint string)

type Basic

type Basic interface {
	Diagnostics(diags tfdiags.Diagnostics)
}

Basic represents the basic view that can perform basic printing actions as showing diagnostics. This is implemented by most of the view implementations and can be used as argument to allow access to the defined basic functionality.

type Console

type Console interface {
	Diagnostics(diags tfdiags.Diagnostics)

	UnsupportedLocalOp()
	Output(result string)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewConsole

func NewConsole(args *arguments.View, view *View) Console

NewConsole returns an initialized Console implementation for the given ViewType.

type ConsoleHuman

type ConsoleHuman struct {
	// contains filtered or unexported fields
}

func (*ConsoleHuman) Backend

func (v *ConsoleHuman) Backend() Backend

func (*ConsoleHuman) Diagnostics

func (v *ConsoleHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ConsoleHuman) Output

func (v *ConsoleHuman) Output(result string)

func (*ConsoleHuman) UnsupportedLocalOp

func (v *ConsoleHuman) UnsupportedLocalOp()

type ConsoleJSON

type ConsoleJSON struct {
	// contains filtered or unexported fields
}

ConsoleJSON is meant to be used only for the `-json-into` situation. The `console` command with `-json` does not really make sense so this is not allowed.

func (*ConsoleJSON) Backend

func (v *ConsoleJSON) Backend() Backend

func (*ConsoleJSON) Diagnostics

func (v *ConsoleJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*ConsoleJSON) Output

func (v *ConsoleJSON) Output(result string)

func (*ConsoleJSON) UnsupportedLocalOp

func (v *ConsoleJSON) UnsupportedLocalOp()

type ConsoleMulti

type ConsoleMulti []Console

func (ConsoleMulti) Backend

func (m ConsoleMulti) Backend() Backend

func (ConsoleMulti) Diagnostics

func (m ConsoleMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ConsoleMulti) Output

func (m ConsoleMulti) Output(result string)

func (ConsoleMulti) UnsupportedLocalOp

func (m ConsoleMulti) UnsupportedLocalOp()

type DeprecationDiagnosticAllowedSeen

type DeprecationDiagnosticAllowedSeen map[any]any

Used to track duplicate diagnostic entries in DeprecationDiagnosticAllowed()

type Fmt

type Fmt interface {
	Diagnostics(diags tfdiags.Diagnostics)
	UserOutputWriter() io.Writer
}

func NewFmt

func NewFmt(view *View) Fmt

NewFmt returns an initialized Fmt implementation.

type FmtHuman

type FmtHuman struct {
	// contains filtered or unexported fields
}

func (*FmtHuman) Diagnostics

func (v *FmtHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*FmtHuman) UserOutputWriter

func (v *FmtHuman) UserOutputWriter() io.Writer

UserOutputWriter returns a io.Writer that uses the [FmtHuman.view] as a proxy to write the user facing information during formatting.

type Get

type Get interface {
	Diagnostics(diags tfdiags.Diagnostics)
	Hooks(showLocalDir bool) initwd.ModuleInstallHooks
}

func NewGet

func NewGet(args *arguments.View, view *View) Get

NewGet returns an initialized Get implementation for the given ViewType.

type GetHuman

type GetHuman struct {
	// contains filtered or unexported fields
}

func (*GetHuman) Diagnostics

func (v *GetHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*GetHuman) Hooks

func (v *GetHuman) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

type GetJSON

type GetJSON struct {
	// contains filtered or unexported fields
}

func (*GetJSON) Diagnostics

func (v *GetJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*GetJSON) Hooks

func (v *GetJSON) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

type GetMulti

type GetMulti []Get

func (GetMulti) Diagnostics

func (m GetMulti) Diagnostics(diags tfdiags.Diagnostics)

func (GetMulti) Hooks

func (m GetMulti) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

type Graph

type Graph interface {
	Diagnostics(diags tfdiags.Diagnostics)
	ErrorUnsupportedLocalOp()
	Output(graphStr string)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewGraph

func NewGraph(view *View) Graph

NewGraph returns an initialized Graph implementation for the given ViewType.

type GraphHuman

type GraphHuman struct {
	// contains filtered or unexported fields
}

func (*GraphHuman) Backend

func (v *GraphHuman) Backend() Backend

func (*GraphHuman) Diagnostics

func (v *GraphHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*GraphHuman) ErrorUnsupportedLocalOp

func (v *GraphHuman) ErrorUnsupportedLocalOp()

func (*GraphHuman) Output

func (v *GraphHuman) Output(graphStr string)

type Import

type Import interface {
	Diagnostics(diags tfdiags.Diagnostics)
	Hooks() []tofu.Hook
	Operation() Operation

	InvalidAddressReference()
	MissingResourceConfiguration(addr addrs.AbsResourceInstance, modulePath string, resourceType string, resourceName string)
	Success()
	UnsupportedLocalOp()

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewImport

func NewImport(args *arguments.View, view *View) Import

NewImport returns an initialized Import implementation for the given ViewType.

type ImportHuman

type ImportHuman struct {
	// contains filtered or unexported fields
}

The ImportHuman implementation renders messages in a human-readable form.

func (*ImportHuman) Backend

func (v *ImportHuman) Backend() Backend

func (*ImportHuman) Diagnostics

func (v *ImportHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ImportHuman) Hooks

func (v *ImportHuman) Hooks() []tofu.Hook

func (*ImportHuman) InvalidAddressReference

func (v *ImportHuman) InvalidAddressReference()

func (*ImportHuman) MissingResourceConfiguration

func (v *ImportHuman) MissingResourceConfiguration(addr addrs.AbsResourceInstance, modulePath string, resourceType string, resourceName string)

func (*ImportHuman) Operation

func (v *ImportHuman) Operation() Operation

func (*ImportHuman) Success

func (v *ImportHuman) Success()

func (*ImportHuman) UnsupportedLocalOp

func (v *ImportHuman) UnsupportedLocalOp()

type ImportJSON

type ImportJSON struct {
	// contains filtered or unexported fields
}

func (*ImportJSON) Backend

func (v *ImportJSON) Backend() Backend

func (*ImportJSON) Diagnostics

func (v *ImportJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*ImportJSON) Hooks

func (v *ImportJSON) Hooks() []tofu.Hook

func (*ImportJSON) InvalidAddressReference

func (v *ImportJSON) InvalidAddressReference()

func (*ImportJSON) MissingResourceConfiguration

func (v *ImportJSON) MissingResourceConfiguration(addr addrs.AbsResourceInstance, modulePath string, _ string, _ string)

func (*ImportJSON) Operation

func (v *ImportJSON) Operation() Operation

func (*ImportJSON) Success

func (v *ImportJSON) Success()

func (*ImportJSON) UnsupportedLocalOp

func (v *ImportJSON) UnsupportedLocalOp()

type ImportMulti

type ImportMulti []Import

func (ImportMulti) Backend

func (m ImportMulti) Backend() Backend

func (ImportMulti) Diagnostics

func (m ImportMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ImportMulti) Hooks

func (m ImportMulti) Hooks() []tofu.Hook

func (ImportMulti) InvalidAddressReference

func (m ImportMulti) InvalidAddressReference()

func (ImportMulti) MissingResourceConfiguration

func (m ImportMulti) MissingResourceConfiguration(addr addrs.AbsResourceInstance, modulePath string, resourceType string, resourceName string)

func (ImportMulti) Operation

func (m ImportMulti) Operation() Operation

func (ImportMulti) Success

func (m ImportMulti) Success()

func (ImportMulti) UnsupportedLocalOp

func (m ImportMulti) UnsupportedLocalOp()

type Init

type Init interface {
	CopyFromModule(src string)
	InitialisedFromEmptyDir()

	Diagnostics(diags tfdiags.Diagnostics)

	ConfigError()
	OutputNewline()
	InitSuccess()
	InitSuccessCLI()

	InitializingModules(upgrade bool)

	InitializingProviderPlugins()
	ProviderAlreadyInstalled(provider string, version string, inCache bool)
	BuiltInProviderAvailable(provider string)
	ReusingLockFileVersion(provider string)
	FindingProviderVersions(provider string, constraints string)
	FindingLatestProviderVersion(provider string)
	UsingProviderFromCache(provider string, version string)
	InstallingProvider(provider string, version string, toCache bool)
	ProviderInstalled(provider string, version string, authResult string, keyID string)
	ProviderInstalledSkippedSignature(provider string, version string)
	WaitingForCacheLock(cacheDir string)
	ProvidersSignedInfo()
	ProviderUpgradeLockfileConflict()
	ProviderInstallationInterrupted()
	LockFileCreated()
	LockFileChanged()
	Hooks(showLocalDir bool) initwd.ModuleInstallHooks

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewInit

func NewInit(args *arguments.View, view *View) Init

NewInit returns an initialized Init implementation for the given ViewType.

type InitHuman

type InitHuman struct {
	// contains filtered or unexported fields
}

func (*InitHuman) Backend

func (v *InitHuman) Backend() Backend

func (*InitHuman) BuiltInProviderAvailable

func (v *InitHuman) BuiltInProviderAvailable(provider string)

func (*InitHuman) ConfigError

func (v *InitHuman) ConfigError()

func (*InitHuman) CopyFromModule

func (v *InitHuman) CopyFromModule(src string)

func (*InitHuman) Diagnostics

func (v *InitHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*InitHuman) FindingLatestProviderVersion

func (v *InitHuman) FindingLatestProviderVersion(provider string)

func (*InitHuman) FindingProviderVersions

func (v *InitHuman) FindingProviderVersions(provider string, constraints string)

func (*InitHuman) Hooks

func (v *InitHuman) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

func (*InitHuman) InitSuccess

func (v *InitHuman) InitSuccess()

func (*InitHuman) InitSuccessCLI

func (v *InitHuman) InitSuccessCLI()

func (*InitHuman) InitialisedFromEmptyDir

func (v *InitHuman) InitialisedFromEmptyDir()

func (*InitHuman) InitializingModules

func (v *InitHuman) InitializingModules(upgrade bool)

func (*InitHuman) InitializingProviderPlugins

func (v *InitHuman) InitializingProviderPlugins()

func (*InitHuman) InstallingProvider

func (v *InitHuman) InstallingProvider(provider string, version string, toCache bool)

func (*InitHuman) LockFileChanged

func (v *InitHuman) LockFileChanged()

func (*InitHuman) LockFileCreated

func (v *InitHuman) LockFileCreated()

func (*InitHuman) OutputNewline

func (v *InitHuman) OutputNewline()

func (*InitHuman) ProviderAlreadyInstalled

func (v *InitHuman) ProviderAlreadyInstalled(provider string, version string, inCache bool)

func (*InitHuman) ProviderInstallationInterrupted

func (v *InitHuman) ProviderInstallationInterrupted()

func (*InitHuman) ProviderInstalled

func (v *InitHuman) ProviderInstalled(provider string, version string, authResult string, keyID string)

func (*InitHuman) ProviderInstalledSkippedSignature

func (v *InitHuman) ProviderInstalledSkippedSignature(provider string, version string)

func (*InitHuman) ProviderUpgradeLockfileConflict

func (v *InitHuman) ProviderUpgradeLockfileConflict()

func (*InitHuman) ProvidersSignedInfo

func (v *InitHuman) ProvidersSignedInfo()

func (*InitHuman) ReusingLockFileVersion

func (v *InitHuman) ReusingLockFileVersion(provider string)

func (*InitHuman) UsingProviderFromCache

func (v *InitHuman) UsingProviderFromCache(provider string, version string)

func (*InitHuman) WaitingForCacheLock

func (v *InitHuman) WaitingForCacheLock(cacheDir string)

type InitJSON

type InitJSON struct {
	// contains filtered or unexported fields
}

func (*InitJSON) Backend

func (v *InitJSON) Backend() Backend

func (*InitJSON) BuiltInProviderAvailable

func (v *InitJSON) BuiltInProviderAvailable(provider string)

func (*InitJSON) ConfigError

func (v *InitJSON) ConfigError()

func (*InitJSON) CopyFromModule

func (v *InitJSON) CopyFromModule(src string)

func (*InitJSON) Diagnostics

func (v *InitJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*InitJSON) FindingLatestProviderVersion

func (v *InitJSON) FindingLatestProviderVersion(provider string)

func (*InitJSON) FindingProviderVersions

func (v *InitJSON) FindingProviderVersions(provider string, constraints string)

func (*InitJSON) Hooks

func (v *InitJSON) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

func (*InitJSON) InitSuccess

func (v *InitJSON) InitSuccess()

func (*InitJSON) InitSuccessCLI

func (v *InitJSON) InitSuccessCLI()

func (*InitJSON) InitialisedFromEmptyDir

func (v *InitJSON) InitialisedFromEmptyDir()

func (*InitJSON) InitializingModules

func (v *InitJSON) InitializingModules(upgrade bool)

func (*InitJSON) InitializingProviderPlugins

func (v *InitJSON) InitializingProviderPlugins()

func (*InitJSON) InstallingProvider

func (v *InitJSON) InstallingProvider(provider string, version string, toCache bool)

func (*InitJSON) LockFileChanged

func (v *InitJSON) LockFileChanged()

func (*InitJSON) LockFileCreated

func (v *InitJSON) LockFileCreated()

func (*InitJSON) OutputNewline

func (v *InitJSON) OutputNewline()

func (*InitJSON) ProviderAlreadyInstalled

func (v *InitJSON) ProviderAlreadyInstalled(provider string, version string, inCache bool)

func (*InitJSON) ProviderInstallationInterrupted

func (v *InitJSON) ProviderInstallationInterrupted()

func (*InitJSON) ProviderInstalled

func (v *InitJSON) ProviderInstalled(provider string, version string, authResult string, keyID string)

func (*InitJSON) ProviderInstalledSkippedSignature

func (v *InitJSON) ProviderInstalledSkippedSignature(provider string, version string)

func (*InitJSON) ProviderUpgradeLockfileConflict

func (v *InitJSON) ProviderUpgradeLockfileConflict()

func (*InitJSON) ProvidersSignedInfo

func (v *InitJSON) ProvidersSignedInfo()

func (*InitJSON) ReusingLockFileVersion

func (v *InitJSON) ReusingLockFileVersion(provider string)

func (*InitJSON) UsingProviderFromCache

func (v *InitJSON) UsingProviderFromCache(provider string, version string)

func (*InitJSON) WaitingForCacheLock

func (v *InitJSON) WaitingForCacheLock(cacheDir string)

type InitMulti

type InitMulti []Init

func (InitMulti) Backend

func (m InitMulti) Backend() Backend

func (InitMulti) BuiltInProviderAvailable

func (m InitMulti) BuiltInProviderAvailable(provider string)

func (InitMulti) ConfigError

func (m InitMulti) ConfigError()

func (InitMulti) CopyFromModule

func (m InitMulti) CopyFromModule(src string)

func (InitMulti) Diagnostics

func (m InitMulti) Diagnostics(diags tfdiags.Diagnostics)

func (InitMulti) FindingLatestProviderVersion

func (m InitMulti) FindingLatestProviderVersion(provider string)

func (InitMulti) FindingProviderVersions

func (m InitMulti) FindingProviderVersions(provider string, constraints string)

func (InitMulti) Hooks

func (m InitMulti) Hooks(showLocalPath bool) initwd.ModuleInstallHooks

func (InitMulti) InitSuccess

func (m InitMulti) InitSuccess()

func (InitMulti) InitSuccessCLI

func (m InitMulti) InitSuccessCLI()

func (InitMulti) InitialisedFromEmptyDir

func (m InitMulti) InitialisedFromEmptyDir()

func (InitMulti) InitializingModules

func (m InitMulti) InitializingModules(upgrade bool)

func (InitMulti) InitializingProviderPlugins

func (m InitMulti) InitializingProviderPlugins()

func (InitMulti) InstallingProvider

func (m InitMulti) InstallingProvider(provider string, version string, toCache bool)

func (InitMulti) LockFileChanged

func (m InitMulti) LockFileChanged()

func (InitMulti) LockFileCreated

func (m InitMulti) LockFileCreated()

func (InitMulti) OutputNewline

func (m InitMulti) OutputNewline()

func (InitMulti) ProviderAlreadyInstalled

func (m InitMulti) ProviderAlreadyInstalled(provider string, version string, inCache bool)

func (InitMulti) ProviderInstallationInterrupted

func (m InitMulti) ProviderInstallationInterrupted()

func (InitMulti) ProviderInstalled

func (m InitMulti) ProviderInstalled(provider string, version string, authResult string, keyID string)

func (InitMulti) ProviderInstalledSkippedSignature

func (m InitMulti) ProviderInstalledSkippedSignature(provider string, version string)

func (InitMulti) ProviderUpgradeLockfileConflict

func (m InitMulti) ProviderUpgradeLockfileConflict()

func (InitMulti) ProvidersSignedInfo

func (m InitMulti) ProvidersSignedInfo()

func (InitMulti) ReusingLockFileVersion

func (m InitMulti) ReusingLockFileVersion(provider string)

func (InitMulti) UsingProviderFromCache

func (m InitMulti) UsingProviderFromCache(provider string, version string)

func (InitMulti) WaitingForCacheLock

func (m InitMulti) WaitingForCacheLock(cacheDir string)

type JSONView

type JSONView struct {
	// contains filtered or unexported fields
}

func NewJSONView

func NewJSONView(view *View, out *os.File) *JSONView

NewJSONView creates a new JSONView that wraps the logger configured for the JSON output. This method is meant to be called only from the views that are root level, meaning that are created for the invoked Bogform command. The other utilitary views (eg: Backend, StateLocker, jsonHook, etc) needs to get JSONView from a root level view. That's because when this method is called, it prints a log entry with the Bogform version. By invoking this method multiple times in a run, will produce multiple version log entries, which might disrupt any other external parsing tool that might rely on the machine readable output.

func (*JSONView) ChangeSummary

func (v *JSONView) ChangeSummary(cs *json.ChangeSummary)

func (*JSONView) Diagnostics

func (v *JSONView) Diagnostics(diags tfdiags.Diagnostics, metadata ...any)

func (*JSONView) Error

func (v *JSONView) Error(message string)

Error is designed for supporting command.WrappedUi

func (*JSONView) Hook

func (v *JSONView) Hook(h json.Hook)

func (*JSONView) Info

func (v *JSONView) Info(message string)

Info is designed for supporting command.WrappedUi

func (*JSONView) Log

func (v *JSONView) Log(message string)

func (*JSONView) Output

func (v *JSONView) Output(message string)

Output is designed for supporting command.WrappedUi

func (*JSONView) Outputs

func (v *JSONView) Outputs(outputs jsonentities.Outputs)

func (*JSONView) PlannedChange

func (v *JSONView) PlannedChange(c *jsonentities.ResourceInstanceChange)

func (*JSONView) ResourceDrift

func (v *JSONView) ResourceDrift(c *jsonentities.ResourceInstanceChange)

func (*JSONView) StateDump

func (v *JSONView) StateDump(state string)

func (*JSONView) Version

func (v *JSONView) Version()

func (*JSONView) Warn

func (v *JSONView) Warn(message string)

Warn is designed for supporting command.WrappedUi

type Login

type Login interface {
	Diagnostics(diags tfdiags.Diagnostics)

	UiSeparator()
	MOTDMessage(msg string)
	DefaultTFCLoginSuccess()
	DefaultTFELoginSuccess(dispHostname string)
	TokenObtainedConfirmation(dispHostname string)
	OpeningBrowserForOAuth(dispHostname, authCodeURL string)
	ManualBrowserLaunch(dispHostname, authCodeURL string)
	WaitingForHostSignal()
	PasswordRequestHeader()
	OpeningBrowserForTokens(dispHostname, tokensURL string)
	ManualBrowserLaunchForTokens(dispHostname, tokensURL string)
	GenerateTokenInstruction()
	TokenStorageInFile(localFilename string)
	TokenStorageInHelper(helperType string)
	RetrievedTokenForUser(username string)
	RequestAPITokenMessage(dispHostname, mechanism string)
	BrowserBasedLoginInstruction()
	StorageLocationConsentInHelper(helperType string)
	StorageLocationConsentInFile(localFilename string)
}

func NewLogin

func NewLogin(args *arguments.View, view *View) Login

NewLogin returns an initialized Login implementation for the given ViewType.

type LoginHuman

type LoginHuman struct {
	// contains filtered or unexported fields
}

func (*LoginHuman) BrowserBasedLoginInstruction

func (v *LoginHuman) BrowserBasedLoginInstruction()

func (*LoginHuman) DefaultTFCLoginSuccess

func (v *LoginHuman) DefaultTFCLoginSuccess()

func (*LoginHuman) DefaultTFELoginSuccess

func (v *LoginHuman) DefaultTFELoginSuccess(dispHostname string)

func (*LoginHuman) Diagnostics

func (v *LoginHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*LoginHuman) GenerateTokenInstruction

func (v *LoginHuman) GenerateTokenInstruction()

func (*LoginHuman) MOTDMessage

func (v *LoginHuman) MOTDMessage(msg string)

func (*LoginHuman) ManualBrowserLaunch

func (v *LoginHuman) ManualBrowserLaunch(dispHostname, authCodeURL string)

func (*LoginHuman) ManualBrowserLaunchForTokens

func (v *LoginHuman) ManualBrowserLaunchForTokens(dispHostname, tokensURL string)

func (*LoginHuman) OpeningBrowserForOAuth

func (v *LoginHuman) OpeningBrowserForOAuth(dispHostname, authCodeURL string)

func (*LoginHuman) OpeningBrowserForTokens

func (v *LoginHuman) OpeningBrowserForTokens(dispHostname, tokensURL string)

func (*LoginHuman) PasswordRequestHeader

func (v *LoginHuman) PasswordRequestHeader()

func (*LoginHuman) RequestAPITokenMessage

func (v *LoginHuman) RequestAPITokenMessage(dispHostname, mechanism string)

func (*LoginHuman) RetrievedTokenForUser

func (v *LoginHuman) RetrievedTokenForUser(username string)

func (*LoginHuman) StorageLocationConsentInFile

func (v *LoginHuman) StorageLocationConsentInFile(localFilename string)

func (*LoginHuman) StorageLocationConsentInHelper

func (v *LoginHuman) StorageLocationConsentInHelper(helperType string)

func (*LoginHuman) TokenObtainedConfirmation

func (v *LoginHuman) TokenObtainedConfirmation(dispHostname string)

func (*LoginHuman) TokenStorageInFile

func (v *LoginHuman) TokenStorageInFile(localFilename string)

func (*LoginHuman) TokenStorageInHelper

func (v *LoginHuman) TokenStorageInHelper(helperType string)

func (*LoginHuman) UiSeparator

func (v *LoginHuman) UiSeparator()

func (*LoginHuman) WaitingForHostSignal

func (v *LoginHuman) WaitingForHostSignal()

type LoginJSON

type LoginJSON struct {
	// contains filtered or unexported fields
}

func (*LoginJSON) BrowserBasedLoginInstruction

func (v *LoginJSON) BrowserBasedLoginInstruction()

func (*LoginJSON) DefaultTFCLoginSuccess

func (v *LoginJSON) DefaultTFCLoginSuccess()

func (*LoginJSON) DefaultTFELoginSuccess

func (v *LoginJSON) DefaultTFELoginSuccess(dispHostname string)

func (*LoginJSON) Diagnostics

func (v *LoginJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*LoginJSON) GenerateTokenInstruction

func (v *LoginJSON) GenerateTokenInstruction()

func (*LoginJSON) MOTDMessage

func (v *LoginJSON) MOTDMessage(msg string)

func (*LoginJSON) ManualBrowserLaunch

func (v *LoginJSON) ManualBrowserLaunch(dispHostname, authCodeURL string)

func (*LoginJSON) ManualBrowserLaunchForTokens

func (v *LoginJSON) ManualBrowserLaunchForTokens(dispHostname, tokensURL string)

func (*LoginJSON) OpeningBrowserForOAuth

func (v *LoginJSON) OpeningBrowserForOAuth(dispHostname, authCodeURL string)

func (*LoginJSON) OpeningBrowserForTokens

func (v *LoginJSON) OpeningBrowserForTokens(dispHostname, tokensURL string)

func (*LoginJSON) PasswordRequestHeader

func (v *LoginJSON) PasswordRequestHeader()

func (*LoginJSON) RequestAPITokenMessage

func (v *LoginJSON) RequestAPITokenMessage(dispHostname, mechanism string)

func (*LoginJSON) RetrievedTokenForUser

func (v *LoginJSON) RetrievedTokenForUser(username string)

func (*LoginJSON) StorageLocationConsentInFile

func (v *LoginJSON) StorageLocationConsentInFile(localFilename string)

func (*LoginJSON) StorageLocationConsentInHelper

func (v *LoginJSON) StorageLocationConsentInHelper(helperType string)

func (*LoginJSON) TokenObtainedConfirmation

func (v *LoginJSON) TokenObtainedConfirmation(dispHostname string)

func (*LoginJSON) TokenStorageInFile

func (v *LoginJSON) TokenStorageInFile(localFilename string)

func (*LoginJSON) TokenStorageInHelper

func (v *LoginJSON) TokenStorageInHelper(helperType string)

func (*LoginJSON) UiSeparator

func (v *LoginJSON) UiSeparator()

func (*LoginJSON) WaitingForHostSignal

func (v *LoginJSON) WaitingForHostSignal()

type LoginMulti

type LoginMulti []Login

func (LoginMulti) BrowserBasedLoginInstruction

func (m LoginMulti) BrowserBasedLoginInstruction()

func (LoginMulti) DefaultTFCLoginSuccess

func (m LoginMulti) DefaultTFCLoginSuccess()

func (LoginMulti) DefaultTFELoginSuccess

func (m LoginMulti) DefaultTFELoginSuccess(dispHostname string)

func (LoginMulti) Diagnostics

func (m LoginMulti) Diagnostics(diags tfdiags.Diagnostics)

func (LoginMulti) GenerateTokenInstruction

func (m LoginMulti) GenerateTokenInstruction()

func (LoginMulti) MOTDMessage

func (m LoginMulti) MOTDMessage(msg string)

func (LoginMulti) ManualBrowserLaunch

func (m LoginMulti) ManualBrowserLaunch(dispHostname, authCodeURL string)

func (LoginMulti) ManualBrowserLaunchForTokens

func (m LoginMulti) ManualBrowserLaunchForTokens(dispHostname, tokensURL string)

func (LoginMulti) OpeningBrowserForOAuth

func (m LoginMulti) OpeningBrowserForOAuth(dispHostname, authCodeURL string)

func (LoginMulti) OpeningBrowserForTokens

func (m LoginMulti) OpeningBrowserForTokens(dispHostname, tokensURL string)

func (LoginMulti) PasswordRequestHeader

func (m LoginMulti) PasswordRequestHeader()

func (LoginMulti) RequestAPITokenMessage

func (m LoginMulti) RequestAPITokenMessage(dispHostname, mechanism string)

func (LoginMulti) RetrievedTokenForUser

func (m LoginMulti) RetrievedTokenForUser(username string)

func (LoginMulti) StorageLocationConsentInFile

func (m LoginMulti) StorageLocationConsentInFile(localFilename string)

func (LoginMulti) StorageLocationConsentInHelper

func (m LoginMulti) StorageLocationConsentInHelper(helperType string)

func (LoginMulti) TokenObtainedConfirmation

func (m LoginMulti) TokenObtainedConfirmation(dispHostname string)

func (LoginMulti) TokenStorageInFile

func (m LoginMulti) TokenStorageInFile(localFilename string)

func (LoginMulti) TokenStorageInHelper

func (m LoginMulti) TokenStorageInHelper(helperType string)

func (LoginMulti) UiSeparator

func (m LoginMulti) UiSeparator()

func (LoginMulti) WaitingForHostSignal

func (m LoginMulti) WaitingForHostSignal()

type Logout

type Logout interface {
	Diagnostics(diags tfdiags.Diagnostics)

	NoCredentialsStored(dispHostname string)
	RemovingCredentialsFromHelper(dispHostname, helperType string)
	RemovingCredentialsFromFile(dispHostname, localFilename string)
	LogoutSuccess(dispHostname string)
}

func NewLogout

func NewLogout(args *arguments.View, view *View) Logout

NewLogout returns an initialized Logout implementation for the given ViewType.

type LogoutHuman

type LogoutHuman struct {
	// contains filtered or unexported fields
}

func (*LogoutHuman) Diagnostics

func (v *LogoutHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*LogoutHuman) LogoutSuccess

func (v *LogoutHuman) LogoutSuccess(dispHostname string)

func (*LogoutHuman) NoCredentialsStored

func (v *LogoutHuman) NoCredentialsStored(dispHostname string)

func (*LogoutHuman) RemovingCredentialsFromFile

func (v *LogoutHuman) RemovingCredentialsFromFile(dispHostname, localFilename string)

func (*LogoutHuman) RemovingCredentialsFromHelper

func (v *LogoutHuman) RemovingCredentialsFromHelper(dispHostname, helperType string)

type LogoutJSON

type LogoutJSON struct {
	// contains filtered or unexported fields
}

func (*LogoutJSON) Diagnostics

func (v *LogoutJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*LogoutJSON) LogoutSuccess

func (v *LogoutJSON) LogoutSuccess(dispHostname string)

func (*LogoutJSON) NoCredentialsStored

func (v *LogoutJSON) NoCredentialsStored(dispHostname string)

func (*LogoutJSON) RemovingCredentialsFromFile

func (v *LogoutJSON) RemovingCredentialsFromFile(dispHostname, localFilename string)

func (*LogoutJSON) RemovingCredentialsFromHelper

func (v *LogoutJSON) RemovingCredentialsFromHelper(dispHostname, helperType string)

type LogoutMulti

type LogoutMulti []Logout

func (LogoutMulti) Diagnostics

func (m LogoutMulti) Diagnostics(diags tfdiags.Diagnostics)

func (LogoutMulti) LogoutSuccess

func (m LogoutMulti) LogoutSuccess(dispHostname string)

func (LogoutMulti) NoCredentialsStored

func (m LogoutMulti) NoCredentialsStored(dispHostname string)

func (LogoutMulti) RemovingCredentialsFromFile

func (m LogoutMulti) RemovingCredentialsFromFile(dispHostname, localFilename string)

func (LogoutMulti) RemovingCredentialsFromHelper

func (m LogoutMulti) RemovingCredentialsFromHelper(dispHostname, helperType string)

type MetadataFunctions

type MetadataFunctions interface {
	Diagnostics(diags tfdiags.Diagnostics)
	// PrintFunctions returns true if it managed to print the functions and false otherwise.
	PrintFunctions() bool
}

func NewMetadataFunctions

func NewMetadataFunctions(view *View) MetadataFunctions

NewMetadataFunctions returns an initialized MetadataFunctions implementation for the given ViewType. In case of this command, the returned MetadataFunctions will always print the diagnostics in human format and the functions in JSON format.

type MetadataFunctionsMixed

type MetadataFunctionsMixed struct {
	// contains filtered or unexported fields
}

func (*MetadataFunctionsMixed) Diagnostics

func (v *MetadataFunctionsMixed) Diagnostics(diags tfdiags.Diagnostics)

func (*MetadataFunctionsMixed) PrintFunctions

func (v *MetadataFunctionsMixed) PrintFunctions() bool

type ModuleVersion

type ModuleVersion struct {
	Source  string `json:"source"`
	Version string `json:"version,omitempty"`
}

type Operation

type Operation interface {
	Interrupted()
	FatalInterrupt()
	Stopping()
	Cancelled(planMode plans.Mode)

	EmergencyDumpState(stateFile *statefile.File, enc encryption.StateEncryption) error

	PlannedChange(change *plans.ResourceInstanceChangeSrc)
	Plan(plan *plans.Plan, schemas *tofu.Schemas)
	PlanNextStep(planPath string, genConfigPath string)

	Diagnostics(diags tfdiags.Diagnostics)
}

Operation provides information for the main operations, like plan, apply, etc.

This makes use of the View.runningInAutomation to know when it's executed by an automated system rather than directly by a command prompt. This is a hint not to produce messages that expect that a user can run a follow-up command, perhaps because Bogform is running in some sort of workflow automation tool that abstracts away the exact commands that are being run.

func NewOperation

func NewOperation(vt arguments.ViewType, view *View) Operation

type OperationHuman

type OperationHuman struct {
	// contains filtered or unexported fields
}

func (*OperationHuman) Cancelled

func (v *OperationHuman) Cancelled(planMode plans.Mode)

func (*OperationHuman) Diagnostics

func (v *OperationHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*OperationHuman) EmergencyDumpState

func (v *OperationHuman) EmergencyDumpState(stateFile *statefile.File, enc encryption.StateEncryption) error

func (*OperationHuman) FatalInterrupt

func (v *OperationHuman) FatalInterrupt()

func (*OperationHuman) Interrupted

func (v *OperationHuman) Interrupted()

func (*OperationHuman) Plan

func (v *OperationHuman) Plan(plan *plans.Plan, schemas *tofu.Schemas)

func (*OperationHuman) PlanNextStep

func (v *OperationHuman) PlanNextStep(planPath string, genConfigPath string)

PlanNextStep gives the user some next-steps, unless we're running in an automation tool which is presumed to provide its own UI for further actions.

func (*OperationHuman) PlannedChange

func (v *OperationHuman) PlannedChange(change *plans.ResourceInstanceChangeSrc)

func (*OperationHuman) Stopping

func (v *OperationHuman) Stopping()

type OperationJSON

type OperationJSON struct {
	// contains filtered or unexported fields
}

func (*OperationJSON) Cancelled

func (v *OperationJSON) Cancelled(planMode plans.Mode)

func (*OperationJSON) Diagnostics

func (v *OperationJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*OperationJSON) EmergencyDumpState

func (v *OperationJSON) EmergencyDumpState(stateFile *statefile.File, enc encryption.StateEncryption) error

func (*OperationJSON) FatalInterrupt

func (v *OperationJSON) FatalInterrupt()

func (*OperationJSON) Interrupted

func (v *OperationJSON) Interrupted()

func (*OperationJSON) Plan

func (v *OperationJSON) Plan(plan *plans.Plan, schemas *tofu.Schemas)

Log a change summary and a series of "planned" messages for the changes in the plan.

func (*OperationJSON) PlanNextStep

func (v *OperationJSON) PlanNextStep(planPath string, genConfigPath string)

PlanNextStep does nothing for the JSON view as it is a hook for user-facing output only applicable to human-readable UI.

func (*OperationJSON) PlannedChange

func (v *OperationJSON) PlannedChange(change *plans.ResourceInstanceChangeSrc)

func (*OperationJSON) Stopping

func (v *OperationJSON) Stopping()

type OperationMulti

type OperationMulti []Operation

func (OperationMulti) Cancelled

func (o OperationMulti) Cancelled(planMode plans.Mode)

func (OperationMulti) Diagnostics

func (o OperationMulti) Diagnostics(diags tfdiags.Diagnostics)

func (OperationMulti) EmergencyDumpState

func (o OperationMulti) EmergencyDumpState(stateFile *statefile.File, enc encryption.StateEncryption) error

func (OperationMulti) FatalInterrupt

func (o OperationMulti) FatalInterrupt()

func (OperationMulti) Interrupted

func (o OperationMulti) Interrupted()

func (OperationMulti) Plan

func (o OperationMulti) Plan(plan *plans.Plan, schemas *tofu.Schemas)

func (OperationMulti) PlanNextStep

func (o OperationMulti) PlanNextStep(planPath string, genConfigPath string)

func (OperationMulti) PlannedChange

func (o OperationMulti) PlannedChange(change *plans.ResourceInstanceChangeSrc)

func (OperationMulti) Stopping

func (o OperationMulti) Stopping()

type Output

type Output interface {
	Output(name string, outputs map[string]*states.OutputValue) tfdiags.Diagnostics
	Diagnostics(diags tfdiags.Diagnostics)
}

The Output view renders either one or all outputs, depending on whether or not the name argument is empty.

func NewOutput

func NewOutput(args *arguments.View, view *View) Output

NewOutput returns an initialized Output implementation for the given ViewType.

type OutputHuman

type OutputHuman struct {
	// contains filtered or unexported fields
}

The OutputHuman implementation renders outputs in a format equivalent to HCL source. This uses the same formatting logic as in the console REPL.

func (*OutputHuman) Diagnostics

func (v *OutputHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*OutputHuman) Output

func (v *OutputHuman) Output(name string, outputs map[string]*states.OutputValue) tfdiags.Diagnostics

type OutputJSON

type OutputJSON struct {
	// contains filtered or unexported fields
}

The OutputJSON implementation renders outputs as JSON values. When rendering a single output, only the value is displayed. When rendering all outputs, the result is a JSON object with keys matching the output names and object values including type and sensitivity metadata.

func (*OutputJSON) Diagnostics

func (v *OutputJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*OutputJSON) Output

func (v *OutputJSON) Output(name string, outputs map[string]*states.OutputValue) tfdiags.Diagnostics

type OutputMulti

type OutputMulti []Output

func (OutputMulti) Diagnostics

func (m OutputMulti) Diagnostics(diags tfdiags.Diagnostics)

func (OutputMulti) Output

func (m OutputMulti) Output(name string, outputs map[string]*states.OutputValue) tfdiags.Diagnostics

type OutputRaw

type OutputRaw struct {
	// contains filtered or unexported fields
}

The OutputRaw implementation renders single string, number, or boolean output values directly and without quotes or other formatting. This is intended for use in shell scripting or other environments where the exact type of an output value is not important.

func (*OutputRaw) Diagnostics

func (v *OutputRaw) Diagnostics(diags tfdiags.Diagnostics)

func (*OutputRaw) Output

func (v *OutputRaw) Output(name string, outputs map[string]*states.OutputValue) tfdiags.Diagnostics

type Plan

type Plan interface {
	Operation() Operation
	Hooks() []tofu.Hook

	Diagnostics(diags tfdiags.Diagnostics)
	HelpPrompt()

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

The Plan view is used for the plan command.

func NewPlan

func NewPlan(args *arguments.View, view *View) Plan

NewPlan returns an initialized Plan implementation for the given ViewType.

type PlanHuman

type PlanHuman struct {
	// contains filtered or unexported fields
}

The PlanHuman implementation renders human-readable text logs, suitable for a scrolling terminal.

func (*PlanHuman) Backend

func (v *PlanHuman) Backend() Backend

func (*PlanHuman) Diagnostics

func (v *PlanHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*PlanHuman) HelpPrompt

func (v *PlanHuman) HelpPrompt()

func (*PlanHuman) Hooks

func (v *PlanHuman) Hooks() []tofu.Hook

func (*PlanHuman) Operation

func (v *PlanHuman) Operation() Operation

type PlanJSON

type PlanJSON struct {
	// contains filtered or unexported fields
}

The PlanJSON implementation renders streaming JSON logs, suitable for integrating with other software.

func (*PlanJSON) Backend

func (v *PlanJSON) Backend() Backend

func (*PlanJSON) Diagnostics

func (v *PlanJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*PlanJSON) HelpPrompt

func (v *PlanJSON) HelpPrompt()

func (*PlanJSON) Hooks

func (v *PlanJSON) Hooks() []tofu.Hook

func (*PlanJSON) Operation

func (v *PlanJSON) Operation() Operation

type PlanMulti

type PlanMulti []Plan

func (PlanMulti) Backend

func (m PlanMulti) Backend() Backend

func (PlanMulti) Diagnostics

func (m PlanMulti) Diagnostics(diags tfdiags.Diagnostics)

func (PlanMulti) HelpPrompt

func (m PlanMulti) HelpPrompt()

func (PlanMulti) Hooks

func (m PlanMulti) Hooks() []tofu.Hook

func (PlanMulti) Operation

func (m PlanMulti) Operation() Operation

type Providers

type Providers interface {
	Diagnostics(diags tfdiags.Diagnostics)
	ModuleRequirements(cfg *configs.ModuleRequirements)
	StateRequirements(stateReqs getproviders.Requirements)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewProviders

func NewProviders(view *View) Providers

NewProviders returns an initialized Providers implementation for the given ViewType.

type ProvidersHuman

type ProvidersHuman struct {
	// contains filtered or unexported fields
}

func (*ProvidersHuman) Backend

func (v *ProvidersHuman) Backend() Backend

func (*ProvidersHuman) Diagnostics

func (v *ProvidersHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersHuman) ModuleRequirements

func (v *ProvidersHuman) ModuleRequirements(reqs *configs.ModuleRequirements)

func (*ProvidersHuman) StateRequirements

func (v *ProvidersHuman) StateRequirements(stateReqs getproviders.Requirements)

type ProvidersLock

type ProvidersLock interface {
	Diagnostics(diags tfdiags.Diagnostics)
	InstallationFetching(provider string, version string, platform string)
	FetchPackageSuccess(keyID string, provider string, version string, platform string, auth string)
	LockUpdateNewProvider(provider string, platform string)
	LockUpdateNewHashForProvider(provider string, platform string)
	LockUpdateNoChange(provider string, platform string)
	UpdatedSuccessfully(madeAnyChange bool)
}

func NewProvidersLock

func NewProvidersLock(args *arguments.View, view *View) ProvidersLock

NewProvidersLock returns an initialized ProvidersLock implementation for the given ViewType.

type ProvidersLockHuman

type ProvidersLockHuman struct {
	// contains filtered or unexported fields
}

func (*ProvidersLockHuman) Diagnostics

func (v *ProvidersLockHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersLockHuman) FetchPackageSuccess

func (v *ProvidersLockHuman) FetchPackageSuccess(keyID string, provider string, version string, platform string, auth string)

func (*ProvidersLockHuman) InstallationFetching

func (v *ProvidersLockHuman) InstallationFetching(provider string, version string, platform string)

func (*ProvidersLockHuman) LockUpdateNewHashForProvider

func (v *ProvidersLockHuman) LockUpdateNewHashForProvider(provider string, platform string)

func (*ProvidersLockHuman) LockUpdateNewProvider

func (v *ProvidersLockHuman) LockUpdateNewProvider(provider string, platform string)

func (*ProvidersLockHuman) LockUpdateNoChange

func (v *ProvidersLockHuman) LockUpdateNoChange(provider string, platform string)

func (*ProvidersLockHuman) UpdatedSuccessfully

func (v *ProvidersLockHuman) UpdatedSuccessfully(madeAnyChange bool)

type ProvidersLockJSON

type ProvidersLockJSON struct {
	// contains filtered or unexported fields
}

func (*ProvidersLockJSON) Diagnostics

func (v *ProvidersLockJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersLockJSON) FetchPackageSuccess

func (v *ProvidersLockJSON) FetchPackageSuccess(keyID string, provider string, version string, platform string, auth string)

func (*ProvidersLockJSON) InstallationFetching

func (v *ProvidersLockJSON) InstallationFetching(provider string, version string, platform string)

func (*ProvidersLockJSON) LockUpdateNewHashForProvider

func (v *ProvidersLockJSON) LockUpdateNewHashForProvider(provider string, platform string)

func (*ProvidersLockJSON) LockUpdateNewProvider

func (v *ProvidersLockJSON) LockUpdateNewProvider(provider string, platform string)

func (*ProvidersLockJSON) LockUpdateNoChange

func (v *ProvidersLockJSON) LockUpdateNoChange(provider string, platform string)

func (*ProvidersLockJSON) UpdatedSuccessfully

func (v *ProvidersLockJSON) UpdatedSuccessfully(madeAnyChange bool)

type ProvidersLockMulti

type ProvidersLockMulti []ProvidersLock

func (ProvidersLockMulti) Diagnostics

func (m ProvidersLockMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ProvidersLockMulti) FetchPackageSuccess

func (m ProvidersLockMulti) FetchPackageSuccess(keyID string, provider string, version string, platform string, auth string)

func (ProvidersLockMulti) InstallationFetching

func (m ProvidersLockMulti) InstallationFetching(provider string, version string, platform string)

func (ProvidersLockMulti) LockUpdateNewHashForProvider

func (m ProvidersLockMulti) LockUpdateNewHashForProvider(provider string, platform string)

func (ProvidersLockMulti) LockUpdateNewProvider

func (m ProvidersLockMulti) LockUpdateNewProvider(provider string, platform string)

func (ProvidersLockMulti) LockUpdateNoChange

func (m ProvidersLockMulti) LockUpdateNoChange(provider string, platform string)

func (ProvidersLockMulti) UpdatedSuccessfully

func (m ProvidersLockMulti) UpdatedSuccessfully(madeAnyChange bool)

type ProvidersMirror

type ProvidersMirror interface {
	Diagnostics(diags tfdiags.Diagnostics)
	ProviderSkipped(provider string)
	MirroringProvider(provider string)
	ProviderVersionSelectedToMatchLockfile(provider string, version string)
	ProviderVersionSelectedToMatchConstraints(provider string, version string, constraints string)
	ProviderVersionSelectedWithNoConstraints(provider string, version string)
	DownloadingPackageFor(provider string, version string, platform string)
	PackageAuthenticated(provider string, version string, platform string, authResult string)
}

func NewProvidersMirror

func NewProvidersMirror(args *arguments.View, view *View) ProvidersMirror

NewProvidersMirror returns an initialized ProvidersMirror implementation for the given ViewType.

type ProvidersMirrorHuman

type ProvidersMirrorHuman struct {
	// contains filtered or unexported fields
}

func (*ProvidersMirrorHuman) Diagnostics

func (v *ProvidersMirrorHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersMirrorHuman) DownloadingPackageFor

func (v *ProvidersMirrorHuman) DownloadingPackageFor(_ string, _ string, platform string)

func (*ProvidersMirrorHuman) MirroringProvider

func (v *ProvidersMirrorHuman) MirroringProvider(provider string)

func (*ProvidersMirrorHuman) PackageAuthenticated

func (v *ProvidersMirrorHuman) PackageAuthenticated(_, _, _ string, authResult string)

func (*ProvidersMirrorHuman) ProviderSkipped

func (v *ProvidersMirrorHuman) ProviderSkipped(provider string)

func (*ProvidersMirrorHuman) ProviderVersionSelectedToMatchConstraints

func (v *ProvidersMirrorHuman) ProviderVersionSelectedToMatchConstraints(_ string, version string, constraints string)

func (*ProvidersMirrorHuman) ProviderVersionSelectedToMatchLockfile

func (v *ProvidersMirrorHuman) ProviderVersionSelectedToMatchLockfile(_ string, version string)

func (*ProvidersMirrorHuman) ProviderVersionSelectedWithNoConstraints

func (v *ProvidersMirrorHuman) ProviderVersionSelectedWithNoConstraints(_ string, version string)

type ProvidersMirrorJSON

type ProvidersMirrorJSON struct {
	// contains filtered or unexported fields
}

func (*ProvidersMirrorJSON) Diagnostics

func (v *ProvidersMirrorJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersMirrorJSON) DownloadingPackageFor

func (v *ProvidersMirrorJSON) DownloadingPackageFor(provider string, version string, platform string)

func (*ProvidersMirrorJSON) MirroringProvider

func (v *ProvidersMirrorJSON) MirroringProvider(provider string)

func (*ProvidersMirrorJSON) PackageAuthenticated

func (v *ProvidersMirrorJSON) PackageAuthenticated(provider string, version string, platform string, authResult string)

func (*ProvidersMirrorJSON) ProviderSkipped

func (v *ProvidersMirrorJSON) ProviderSkipped(provider string)

func (*ProvidersMirrorJSON) ProviderVersionSelectedToMatchConstraints

func (v *ProvidersMirrorJSON) ProviderVersionSelectedToMatchConstraints(provider string, version string, constraints string)

func (*ProvidersMirrorJSON) ProviderVersionSelectedToMatchLockfile

func (v *ProvidersMirrorJSON) ProviderVersionSelectedToMatchLockfile(provider string, version string)

func (*ProvidersMirrorJSON) ProviderVersionSelectedWithNoConstraints

func (v *ProvidersMirrorJSON) ProviderVersionSelectedWithNoConstraints(provider string, version string)

type ProvidersMirrorMulti

type ProvidersMirrorMulti []ProvidersMirror

func (ProvidersMirrorMulti) Diagnostics

func (m ProvidersMirrorMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ProvidersMirrorMulti) DownloadingPackageFor

func (m ProvidersMirrorMulti) DownloadingPackageFor(provider string, version string, platform string)

func (ProvidersMirrorMulti) MirroringProvider

func (m ProvidersMirrorMulti) MirroringProvider(provider string)

func (ProvidersMirrorMulti) PackageAuthenticated

func (m ProvidersMirrorMulti) PackageAuthenticated(provider string, version string, platform string, authResult string)

func (ProvidersMirrorMulti) ProviderSkipped

func (m ProvidersMirrorMulti) ProviderSkipped(provider string)

func (ProvidersMirrorMulti) ProviderVersionSelectedToMatchConstraints

func (m ProvidersMirrorMulti) ProviderVersionSelectedToMatchConstraints(provider string, version string, constraints string)

func (ProvidersMirrorMulti) ProviderVersionSelectedToMatchLockfile

func (m ProvidersMirrorMulti) ProviderVersionSelectedToMatchLockfile(provider string, version string)

func (ProvidersMirrorMulti) ProviderVersionSelectedWithNoConstraints

func (m ProvidersMirrorMulti) ProviderVersionSelectedWithNoConstraints(provider string, version string)

type ProvidersSchema

type ProvidersSchema interface {
	// Diagnostics is used to render diagnostic messages out to the user.
	Diagnostics(diags tfdiags.Diagnostics)

	// UnsupportedLocalOp is used to output a message to the user that the current operation is unsupported locally.
	UnsupportedLocalOp()

	// Output is used to display the final JSON output of the providers schema map.
	Output(json string)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

ProvidersSchema is the interface for the providers schema view.

func NewProvidersSchema

func NewProvidersSchema(v *View) ProvidersSchema

NewProvidersSchema creates a new ProvidersSchema view.

type ProvidersSchemaMixed

type ProvidersSchemaMixed struct {
	// contains filtered or unexported fields
}

func (*ProvidersSchemaMixed) Backend

func (v *ProvidersSchemaMixed) Backend() Backend

func (*ProvidersSchemaMixed) Diagnostics

func (v *ProvidersSchemaMixed) Diagnostics(diags tfdiags.Diagnostics)

func (*ProvidersSchemaMixed) Output

func (v *ProvidersSchemaMixed) Output(json string)

func (*ProvidersSchemaMixed) UnsupportedLocalOp

func (v *ProvidersSchemaMixed) UnsupportedLocalOp()

type Refresh

type Refresh interface {
	Outputs(outputValues map[string]*states.OutputValue)

	Operation() Operation
	Hooks() []tofu.Hook

	Diagnostics(diags tfdiags.Diagnostics)
	HelpPrompt()

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

The Refresh view is used for the refresh command.

func NewRefresh

func NewRefresh(args *arguments.View, view *View) Refresh

NewRefresh returns an initialized Refresh implementation for the given ViewType.

type RefreshHuman

type RefreshHuman struct {
	// contains filtered or unexported fields
}

The RefreshHuman implementation renders human-readable text logs, suitable for a scrolling terminal.

func (*RefreshHuman) Backend

func (v *RefreshHuman) Backend() Backend

func (*RefreshHuman) Diagnostics

func (v *RefreshHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*RefreshHuman) HelpPrompt

func (v *RefreshHuman) HelpPrompt()

func (*RefreshHuman) Hooks

func (v *RefreshHuman) Hooks() []tofu.Hook

func (*RefreshHuman) Operation

func (v *RefreshHuman) Operation() Operation

func (*RefreshHuman) Outputs

func (v *RefreshHuman) Outputs(outputValues map[string]*states.OutputValue)

type RefreshJSON

type RefreshJSON struct {
	// contains filtered or unexported fields
}

The RefreshJSON implementation renders streaming JSON logs, suitable for integrating with other software.

func (*RefreshJSON) Backend

func (v *RefreshJSON) Backend() Backend

func (*RefreshJSON) Diagnostics

func (v *RefreshJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*RefreshJSON) HelpPrompt

func (v *RefreshJSON) HelpPrompt()

func (*RefreshJSON) Hooks

func (v *RefreshJSON) Hooks() []tofu.Hook

func (*RefreshJSON) Operation

func (v *RefreshJSON) Operation() Operation

func (*RefreshJSON) Outputs

func (v *RefreshJSON) Outputs(outputValues map[string]*states.OutputValue)

type RefreshMulti

type RefreshMulti []Refresh

func (RefreshMulti) Backend

func (m RefreshMulti) Backend() Backend

func (RefreshMulti) Diagnostics

func (m RefreshMulti) Diagnostics(diags tfdiags.Diagnostics)

func (RefreshMulti) HelpPrompt

func (m RefreshMulti) HelpPrompt()

func (RefreshMulti) Hooks

func (m RefreshMulti) Hooks() []tofu.Hook

func (RefreshMulti) Operation

func (m RefreshMulti) Operation() Operation

func (RefreshMulti) Outputs

func (m RefreshMulti) Outputs(outputValues map[string]*states.OutputValue)

type Root

type Root struct {
	// contains filtered or unexported fields
}

Root is the view that is meant to be used strictly during the initialisation of the process and offers methods to print errors as raw as possible.

func NewRoot

func NewRoot(view *View) *Root

func (*Root) Diagnostics

func (v *Root) Diagnostics(diagnostics tfdiags.Diagnostics)

func (*Root) Error

func (v *Root) Error(msg string)

type Show

type Show interface {
	// DisplayState renders the given state snapshot, returning a status code for "bogform show" to return.
	DisplayState(ctx context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

	// DisplayPlan renders the given plan, returning a status code for "bogform show" to return.
	DisplayPlan(ctx context.Context, plan *plans.Plan, config *configs.Config, priorStateFile *statefile.File, schemas *tofu.Schemas) int

	// DisplayConfig renders the given configuration, returning a status code for "bogform show" to return.
	DisplayConfig(config *configs.Config, schemas *tofu.Schemas) int

	// DisplaySingleModule renders just one module, in a format that's a subset
	// of that used by [Show.DisplayConfig] which we can produce without
	// schema or child module information.
	DisplaySingleModule(module *configs.Module) int

	// Diagnostics renders early diagnostics, resulting from argument parsing.
	Diagnostics(diags tfdiags.Diagnostics)
}

func NewShow

func NewShow(args *arguments.View, view *View) Show

type ShowHuman

type ShowHuman struct {
	// contains filtered or unexported fields
}

func (*ShowHuman) Diagnostics

func (v *ShowHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ShowHuman) DisplayConfig

func (v *ShowHuman) DisplayConfig(config *configs.Config, schemas *tofu.Schemas) int

func (*ShowHuman) DisplayPlan

func (v *ShowHuman) DisplayPlan(_ context.Context, plan *plans.Plan, config *configs.Config, priorStateFile *statefile.File, schemas *tofu.Schemas) int

func (*ShowHuman) DisplaySingleModule

func (v *ShowHuman) DisplaySingleModule(_ *configs.Module) int

func (*ShowHuman) DisplayState

func (v *ShowHuman) DisplayState(_ context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

type ShowJSON

type ShowJSON struct {
	// contains filtered or unexported fields
}

func (*ShowJSON) Diagnostics

func (v *ShowJSON) Diagnostics(diags tfdiags.Diagnostics)

Diagnostics should only be called if show cannot be executed. In this case, we choose to render human-readable diagnostic output, primarily for backwards compatibility.

func (*ShowJSON) DisplayConfig

func (v *ShowJSON) DisplayConfig(config *configs.Config, schemas *tofu.Schemas) int

func (*ShowJSON) DisplayPlan

func (v *ShowJSON) DisplayPlan(_ context.Context, plan *plans.Plan, config *configs.Config, priorStateFile *statefile.File, schemas *tofu.Schemas) int

func (*ShowJSON) DisplaySingleModule

func (v *ShowJSON) DisplaySingleModule(module *configs.Module) int

func (*ShowJSON) DisplayState

func (v *ShowJSON) DisplayState(_ context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

type ShowMulti

type ShowMulti []Show

func (ShowMulti) Diagnostics

func (m ShowMulti) Diagnostics(diags tfdiags.Diagnostics)

func (ShowMulti) DisplayConfig

func (m ShowMulti) DisplayConfig(config *configs.Config, schemas *tofu.Schemas) int

func (ShowMulti) DisplayPlan

func (m ShowMulti) DisplayPlan(ctx context.Context, plan *plans.Plan, config *configs.Config, priorStateFile *statefile.File, schemas *tofu.Schemas) int

func (ShowMulti) DisplaySingleModule

func (m ShowMulti) DisplaySingleModule(module *configs.Module) int

func (ShowMulti) DisplayState

func (m ShowMulti) DisplayState(ctx context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

type State

type State interface {
	Diagnostics(diags tfdiags.Diagnostics)

	// General `state` output
	StateNotFound()
	StateLoadingFailure(baseError string)
	StateSavingError(baseError string)

	// `bogform state list` specific
	StateListAddr(resAddr addrs.AbsResourceInstance)

	// `bogform state mv` specific
	ErrorMovingToAlreadyExistingDst()
	ResourceMoveStatus(dryRun bool, src, dest string)
	DryRunMovedStatus(moved int)
	MoveFinalStatus(moved int)

	// `bogform state pull` specific
	PrintPulledState(state string)

	// `bogform state replace-provider` specific
	NoMatchingResourcesForProviderReplacement()
	ReplaceProviderOverview(from, to addrs.Provider, willReplace []*states.Resource)
	ReplaceProviderCancelled()
	ProviderReplaced(forResources int)

	// `bogform state rm` specific
	ResourceRemoveStatus(dryRun bool, target string)
	DryRunRemovedStatus(removed int)
	RemoveFinalStatus(count int)

	// `bogform state show` specific
	UnsupportedLocalOp()
	AddressParsingError(resAddr string)
	NoInstanceFoundError()
	ShowResourceState(ctx context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewState

func NewState(args *arguments.View, view *View) State

NewState returns an initialized State implementation for the given ViewType.

type StateHuman

type StateHuman struct {
	// contains filtered or unexported fields
}

func (*StateHuman) AddressParsingError

func (v *StateHuman) AddressParsingError(resAddr string)

func (*StateHuman) Backend

func (v *StateHuman) Backend() Backend

func (*StateHuman) Diagnostics

func (v *StateHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*StateHuman) DryRunMovedStatus

func (v *StateHuman) DryRunMovedStatus(moved int)

func (*StateHuman) DryRunRemovedStatus

func (v *StateHuman) DryRunRemovedStatus(removed int)

func (*StateHuman) ErrorMovingToAlreadyExistingDst

func (v *StateHuman) ErrorMovingToAlreadyExistingDst()

func (*StateHuman) MoveFinalStatus

func (v *StateHuman) MoveFinalStatus(moved int)

func (*StateHuman) NoInstanceFoundError

func (v *StateHuman) NoInstanceFoundError()

func (*StateHuman) NoMatchingResourcesForProviderReplacement

func (v *StateHuman) NoMatchingResourcesForProviderReplacement()

func (*StateHuman) PrintPulledState

func (v *StateHuman) PrintPulledState(state string)

func (*StateHuman) ProviderReplaced

func (v *StateHuman) ProviderReplaced(forResources int)

func (*StateHuman) RemoveFinalStatus

func (v *StateHuman) RemoveFinalStatus(count int)

func (*StateHuman) ReplaceProviderCancelled

func (v *StateHuman) ReplaceProviderCancelled()

func (*StateHuman) ReplaceProviderOverview

func (v *StateHuman) ReplaceProviderOverview(from, to addrs.Provider, willReplace []*states.Resource)

func (*StateHuman) ResourceMoveStatus

func (v *StateHuman) ResourceMoveStatus(dryRun bool, src, dest string)

func (*StateHuman) ResourceRemoveStatus

func (v *StateHuman) ResourceRemoveStatus(dryRun bool, target string)

func (*StateHuman) ShowResourceState

func (v *StateHuman) ShowResourceState(_ context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

func (*StateHuman) StateListAddr

func (v *StateHuman) StateListAddr(resAddr addrs.AbsResourceInstance)

func (*StateHuman) StateLoadingFailure

func (v *StateHuman) StateLoadingFailure(baseError string)

func (*StateHuman) StateNotFound

func (v *StateHuman) StateNotFound()

func (*StateHuman) StateSavingError

func (v *StateHuman) StateSavingError(baseError string)

func (*StateHuman) UnsupportedLocalOp

func (v *StateHuman) UnsupportedLocalOp()

type StateJSON

type StateJSON struct {
	// contains filtered or unexported fields
}

func (*StateJSON) AddressParsingError

func (v *StateJSON) AddressParsingError(resAddr string)

func (*StateJSON) Backend

func (v *StateJSON) Backend() Backend

func (*StateJSON) Diagnostics

func (v *StateJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*StateJSON) DryRunMovedStatus

func (v *StateJSON) DryRunMovedStatus(moved int)

func (*StateJSON) DryRunRemovedStatus

func (v *StateJSON) DryRunRemovedStatus(removed int)

func (*StateJSON) ErrorMovingToAlreadyExistingDst

func (v *StateJSON) ErrorMovingToAlreadyExistingDst()

func (*StateJSON) MoveFinalStatus

func (v *StateJSON) MoveFinalStatus(moved int)

func (*StateJSON) NoInstanceFoundError

func (v *StateJSON) NoInstanceFoundError()

func (*StateJSON) NoMatchingResourcesForProviderReplacement

func (v *StateJSON) NoMatchingResourcesForProviderReplacement()

func (*StateJSON) PrintPulledState

func (v *StateJSON) PrintPulledState(_ string)

func (*StateJSON) ProviderReplaced

func (v *StateJSON) ProviderReplaced(forResources int)

func (*StateJSON) RemoveFinalStatus

func (v *StateJSON) RemoveFinalStatus(count int)

func (*StateJSON) ReplaceProviderCancelled

func (v *StateJSON) ReplaceProviderCancelled()

func (*StateJSON) ReplaceProviderOverview

func (v *StateJSON) ReplaceProviderOverview(from, to addrs.Provider, willReplace []*states.Resource)

func (*StateJSON) ResourceMoveStatus

func (v *StateJSON) ResourceMoveStatus(dryRun bool, src, dest string)

func (*StateJSON) ResourceRemoveStatus

func (v *StateJSON) ResourceRemoveStatus(dryRun bool, target string)

func (*StateJSON) ShowResourceState

func (v *StateJSON) ShowResourceState(_ context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

func (*StateJSON) StateListAddr

func (v *StateJSON) StateListAddr(resAddr addrs.AbsResourceInstance)

func (*StateJSON) StateLoadingFailure

func (v *StateJSON) StateLoadingFailure(baseError string)

func (*StateJSON) StateNotFound

func (v *StateJSON) StateNotFound()

func (*StateJSON) StateSavingError

func (v *StateJSON) StateSavingError(baseError string)

func (*StateJSON) UnsupportedLocalOp

func (v *StateJSON) UnsupportedLocalOp()

type StateLocker

type StateLocker interface {
	Locking()
	Unlocking()
}

The StateLocker view is used to display locking/unlocking status messages if the state lock process takes longer than expected.

type StateLockerHuman

type StateLockerHuman struct {
	// contains filtered or unexported fields
}

StateLockerHuman is an implementation of StateLocker which prints status to a terminal.

func (*StateLockerHuman) Locking

func (v *StateLockerHuman) Locking()

func (*StateLockerHuman) Unlocking

func (v *StateLockerHuman) Unlocking()

type StateLockerJSON

type StateLockerJSON struct {
	// contains filtered or unexported fields
}

StateLockerJSON is an implementation of StateLocker which prints the state lock status to a terminal in machine-readable JSON form.

func (*StateLockerJSON) Locking

func (v *StateLockerJSON) Locking()

func (*StateLockerJSON) Unlocking

func (v *StateLockerJSON) Unlocking()

type StateLockerMulti

type StateLockerMulti []StateLocker

func (StateLockerMulti) Locking

func (m StateLockerMulti) Locking()

func (StateLockerMulti) Unlocking

func (m StateLockerMulti) Unlocking()

type StateMulti

type StateMulti []State

func (StateMulti) AddressParsingError

func (m StateMulti) AddressParsingError(resAddr string)

func (StateMulti) Backend

func (m StateMulti) Backend() Backend

func (StateMulti) Diagnostics

func (m StateMulti) Diagnostics(diags tfdiags.Diagnostics)

func (StateMulti) DryRunMovedStatus

func (m StateMulti) DryRunMovedStatus(moved int)

func (StateMulti) DryRunRemovedStatus

func (m StateMulti) DryRunRemovedStatus(removed int)

func (StateMulti) ErrorMovingToAlreadyExistingDst

func (m StateMulti) ErrorMovingToAlreadyExistingDst()

func (StateMulti) MoveFinalStatus

func (m StateMulti) MoveFinalStatus(moved int)

func (StateMulti) NoInstanceFoundError

func (m StateMulti) NoInstanceFoundError()

func (StateMulti) NoMatchingResourcesForProviderReplacement

func (m StateMulti) NoMatchingResourcesForProviderReplacement()

func (StateMulti) PrintPulledState

func (m StateMulti) PrintPulledState(state string)

func (StateMulti) ProviderReplaced

func (m StateMulti) ProviderReplaced(forResources int)

func (StateMulti) RemoveFinalStatus

func (m StateMulti) RemoveFinalStatus(count int)

func (StateMulti) ReplaceProviderCancelled

func (m StateMulti) ReplaceProviderCancelled()

func (StateMulti) ReplaceProviderOverview

func (m StateMulti) ReplaceProviderOverview(from, to addrs.Provider, willReplace []*states.Resource)

func (StateMulti) ResourceMoveStatus

func (m StateMulti) ResourceMoveStatus(dryRun bool, src, dest string)

func (StateMulti) ResourceRemoveStatus

func (m StateMulti) ResourceRemoveStatus(dryRun bool, target string)

func (StateMulti) ShowResourceState

func (m StateMulti) ShowResourceState(ctx context.Context, stateFile *statefile.File, schemas *tofu.Schemas) int

func (StateMulti) StateListAddr

func (m StateMulti) StateListAddr(resAddr addrs.AbsResourceInstance)

func (StateMulti) StateLoadingFailure

func (m StateMulti) StateLoadingFailure(baseError string)

func (StateMulti) StateNotFound

func (m StateMulti) StateNotFound()

func (StateMulti) StateSavingError

func (m StateMulti) StateSavingError(baseError string)

func (StateMulti) UnsupportedLocalOp

func (m StateMulti) UnsupportedLocalOp()

type Taint

type Taint interface {
	Diagnostics(diags tfdiags.Diagnostics)
	TaintedSuccessfully(addr addrs.AbsResourceInstance)
	UntaintedSuccessfully(addr addrs.AbsResourceInstance)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewTaint

func NewTaint(args *arguments.View, view *View) Taint

NewTaint returns an initialized Taint implementation for the given ViewType.

type TaintHuman

type TaintHuman struct {
	// contains filtered or unexported fields
}

func (*TaintHuman) Backend

func (v *TaintHuman) Backend() Backend

func (*TaintHuman) Diagnostics

func (v *TaintHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*TaintHuman) TaintedSuccessfully

func (v *TaintHuman) TaintedSuccessfully(addr addrs.AbsResourceInstance)

func (*TaintHuman) UntaintedSuccessfully

func (v *TaintHuman) UntaintedSuccessfully(addr addrs.AbsResourceInstance)

type TaintJSON

type TaintJSON struct {
	// contains filtered or unexported fields
}

func (*TaintJSON) Backend

func (v *TaintJSON) Backend() Backend

func (*TaintJSON) Diagnostics

func (v *TaintJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*TaintJSON) TaintedSuccessfully

func (v *TaintJSON) TaintedSuccessfully(addr addrs.AbsResourceInstance)

func (*TaintJSON) UntaintedSuccessfully

func (v *TaintJSON) UntaintedSuccessfully(addr addrs.AbsResourceInstance)

type TaintMulti

type TaintMulti []Taint

func (TaintMulti) Backend

func (m TaintMulti) Backend() Backend

func (TaintMulti) Diagnostics

func (m TaintMulti) Diagnostics(diags tfdiags.Diagnostics)

func (TaintMulti) TaintedSuccessfully

func (m TaintMulti) TaintedSuccessfully(addr addrs.AbsResourceInstance)

func (TaintMulti) UntaintedSuccessfully

func (m TaintMulti) UntaintedSuccessfully(addr addrs.AbsResourceInstance)

type Test

type Test interface {
	// Abstract should print an early summary of the tests that will be
	// executed. This will be called before the tests have been executed so
	// the status for everything within suite will be test.Pending.
	//
	// This should be used to state what is going to be tested.
	Abstract(suite *moduletest.Suite)

	// Conclusion should print out a summary of the tests including their
	// completed status.
	Conclusion(suite *moduletest.Suite)

	// File prints out the summary for an entire test file.
	File(file *moduletest.File)

	// Run prints out the summary for a single test run block.
	Run(run *moduletest.Run, file *moduletest.File)

	// DestroySummary prints out the summary of the destroy step of each test
	// file. If everything goes well, this should be empty.
	DestroySummary(diags tfdiags.Diagnostics, run *moduletest.Run, file *moduletest.File, state *states.State)

	// Diagnostics prints out the provided diagnostics.
	Diagnostics(run *moduletest.Run, file *moduletest.File, diags tfdiags.Diagnostics)

	// Interrupted prints out a message stating that an interrupt has been
	// received and testing will stop.
	Interrupted()

	// FatalInterrupt prints out a message stating that a hard interrupt has
	// been received and testing will stop and cleanup will be skipped.
	FatalInterrupt()

	// FatalInterruptSummary prints out the resources that were held in state
	// and were being created at the time the FatalInterrupt was received.
	//
	// This will typically be called in place of DestroySummary, as there is no
	// guarantee that this function will be called during a FatalInterrupt. In
	// addition, this function prints additional details about the current
	// operation alongside the current state as the state will be missing newly
	// created resources that also need to be handled manually.
	FatalInterruptSummary(run *moduletest.Run, file *moduletest.File, states map[*moduletest.Run]*states.State, created []*plans.ResourceInstanceChangeSrc)
}

Test renders outputs for test executions.

func NewTest

func NewTest(args *arguments.View, view *View) Test

type TestHuman

type TestHuman struct {
	// contains filtered or unexported fields
}

func (*TestHuman) Abstract

func (t *TestHuman) Abstract(_ *moduletest.Suite)

func (*TestHuman) Conclusion

func (t *TestHuman) Conclusion(suite *moduletest.Suite)

func (*TestHuman) DestroySummary

func (t *TestHuman) DestroySummary(diags tfdiags.Diagnostics, run *moduletest.Run, file *moduletest.File, state *states.State)

func (*TestHuman) Diagnostics

func (t *TestHuman) Diagnostics(_ *moduletest.Run, _ *moduletest.File, diags tfdiags.Diagnostics)

func (*TestHuman) FatalInterrupt

func (t *TestHuman) FatalInterrupt()

func (*TestHuman) FatalInterruptSummary

func (t *TestHuman) FatalInterruptSummary(run *moduletest.Run, file *moduletest.File, existingStates map[*moduletest.Run]*states.State, created []*plans.ResourceInstanceChangeSrc)

func (*TestHuman) File

func (t *TestHuman) File(file *moduletest.File)

func (*TestHuman) Interrupted

func (t *TestHuman) Interrupted()

func (*TestHuman) Run

func (t *TestHuman) Run(run *moduletest.Run, file *moduletest.File)

type TestJSON

type TestJSON struct {
	// contains filtered or unexported fields
}

func (*TestJSON) Abstract

func (t *TestJSON) Abstract(suite *moduletest.Suite)

func (*TestJSON) Conclusion

func (t *TestJSON) Conclusion(suite *moduletest.Suite)

func (*TestJSON) DestroySummary

func (t *TestJSON) DestroySummary(diags tfdiags.Diagnostics, run *moduletest.Run, file *moduletest.File, state *states.State)

func (*TestJSON) Diagnostics

func (t *TestJSON) Diagnostics(run *moduletest.Run, file *moduletest.File, diags tfdiags.Diagnostics)

func (*TestJSON) FatalInterrupt

func (t *TestJSON) FatalInterrupt()

func (*TestJSON) FatalInterruptSummary

func (t *TestJSON) FatalInterruptSummary(run *moduletest.Run, file *moduletest.File, existingStates map[*moduletest.Run]*states.State, created []*plans.ResourceInstanceChangeSrc)

func (*TestJSON) File

func (t *TestJSON) File(file *moduletest.File)

func (*TestJSON) Interrupted

func (t *TestJSON) Interrupted()

func (*TestJSON) Run

func (t *TestJSON) Run(run *moduletest.Run, file *moduletest.File)

type TestMulti

type TestMulti []Test

func (TestMulti) Abstract

func (m TestMulti) Abstract(suite *moduletest.Suite)

func (TestMulti) Conclusion

func (m TestMulti) Conclusion(suite *moduletest.Suite)

func (TestMulti) DestroySummary

func (m TestMulti) DestroySummary(diags tfdiags.Diagnostics, run *moduletest.Run, file *moduletest.File, state *states.State)

func (TestMulti) Diagnostics

func (m TestMulti) Diagnostics(run *moduletest.Run, file *moduletest.File, diags tfdiags.Diagnostics)

func (TestMulti) FatalInterrupt

func (m TestMulti) FatalInterrupt()

func (TestMulti) FatalInterruptSummary

func (m TestMulti) FatalInterruptSummary(run *moduletest.Run, file *moduletest.File, states map[*moduletest.Run]*states.State, created []*plans.ResourceInstanceChangeSrc)

func (TestMulti) File

func (m TestMulti) File(file *moduletest.File)

func (TestMulti) Interrupted

func (m TestMulti) Interrupted()

func (TestMulti) Run

func (m TestMulti) Run(run *moduletest.Run, file *moduletest.File)

type Ui

type Ui interface {
	Output(string)
}

func NewViewUI

func NewViewUI(args *arguments.View, view *View, oldUi Ui) Ui

type UiHook

type UiHook struct {
	tofu.NilHook
	// contains filtered or unexported fields
}

func NewUiHook

func NewUiHook(view *View) *UiHook

func (*UiHook) Deferred

func (h *UiHook) Deferred(addr addrs.AbsResourceInstance, reason string) (tofu.HookAction, error)

func (*UiHook) PostApply

func (h *UiHook) PostApply(addr addrs.AbsResourceInstance, gen states.Generation, newState cty.Value, applyerr error) (tofu.HookAction, error)

func (*UiHook) PostApplyImport

func (h *UiHook) PostApplyImport(addr addrs.AbsResourceInstance, importing plans.ImportingSrc) (tofu.HookAction, error)

func (*UiHook) PostClose

func (h *UiHook) PostClose(addr addrs.AbsResourceInstance, _ error) (tofu.HookAction, error)

func (*UiHook) PostImportState

func (h *UiHook) PostImportState(addr addrs.AbsResourceInstance, imported []providers.ImportedResource) (tofu.HookAction, error)

func (*UiHook) PostOpen

func (h *UiHook) PostOpen(addr addrs.AbsResourceInstance, _ error) (tofu.HookAction, error)

func (*UiHook) PostRenew

func (h *UiHook) PostRenew(addr addrs.AbsResourceInstance, _ error) (tofu.HookAction, error)

func (*UiHook) PreApply

func (h *UiHook) PreApply(addr addrs.AbsResourceInstance, gen states.Generation, action plans.Action, priorState, plannedNewState cty.Value) (tofu.HookAction, error)

func (*UiHook) PreApplyImport

func (h *UiHook) PreApplyImport(addr addrs.AbsResourceInstance, importing plans.ImportingSrc) (tofu.HookAction, error)

func (*UiHook) PreClose

func (h *UiHook) PreClose(addr addrs.AbsResourceInstance) (tofu.HookAction, error)

func (*UiHook) PreImportState

func (h *UiHook) PreImportState(addr addrs.AbsResourceInstance, importID string) (tofu.HookAction, error)

func (*UiHook) PreOpen

func (h *UiHook) PreOpen(addr addrs.AbsResourceInstance) (tofu.HookAction, error)

func (*UiHook) PrePlanImport

func (h *UiHook) PrePlanImport(addr addrs.AbsResourceInstance, target providers.ImportTarget) (tofu.HookAction, error)

func (*UiHook) PreProvisionInstanceStep

func (h *UiHook) PreProvisionInstanceStep(addr addrs.AbsResourceInstance, typeName string) (tofu.HookAction, error)

func (*UiHook) PreRefresh

func (h *UiHook) PreRefresh(addr addrs.AbsResourceInstance, gen states.Generation, priorState cty.Value) (tofu.HookAction, error)

func (*UiHook) PreRenew

func (h *UiHook) PreRenew(addr addrs.AbsResourceInstance) (tofu.HookAction, error)

func (*UiHook) ProvisionOutput

func (h *UiHook) ProvisionOutput(addr addrs.AbsResourceInstance, typeName string, msg string, configMarks cty.ValueMarks)

type Unlock

type Unlock interface {
	Diagnostics(diags tfdiags.Diagnostics)
	LockingDisabledForBackend()
	CannotUnlockByAnotherProcess()
	ForceUnlockCancelled()
	ForceUnlockSucceeded()

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewUnlock

func NewUnlock(args *arguments.View, view *View) Unlock

NewUnlock returns an initialized Unlock implementation for the given ViewType.

type UnlockHuman

type UnlockHuman struct {
	// contains filtered or unexported fields
}

func (*UnlockHuman) Backend

func (v *UnlockHuman) Backend() Backend

func (*UnlockHuman) CannotUnlockByAnotherProcess

func (v *UnlockHuman) CannotUnlockByAnotherProcess()

func (*UnlockHuman) Diagnostics

func (v *UnlockHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*UnlockHuman) ForceUnlockCancelled

func (v *UnlockHuman) ForceUnlockCancelled()

func (*UnlockHuman) ForceUnlockSucceeded

func (v *UnlockHuman) ForceUnlockSucceeded()

func (*UnlockHuman) LockingDisabledForBackend

func (v *UnlockHuman) LockingDisabledForBackend()

type UnlockJSON

type UnlockJSON struct {
	// contains filtered or unexported fields
}

func (*UnlockJSON) Backend

func (v *UnlockJSON) Backend() Backend

func (*UnlockJSON) CannotUnlockByAnotherProcess

func (v *UnlockJSON) CannotUnlockByAnotherProcess()

func (*UnlockJSON) Diagnostics

func (v *UnlockJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*UnlockJSON) ForceUnlockCancelled

func (v *UnlockJSON) ForceUnlockCancelled()

func (*UnlockJSON) ForceUnlockSucceeded

func (v *UnlockJSON) ForceUnlockSucceeded()

func (*UnlockJSON) LockingDisabledForBackend

func (v *UnlockJSON) LockingDisabledForBackend()

type UnlockMulti

type UnlockMulti []Unlock

func (UnlockMulti) Backend

func (m UnlockMulti) Backend() Backend

func (UnlockMulti) CannotUnlockByAnotherProcess

func (m UnlockMulti) CannotUnlockByAnotherProcess()

func (UnlockMulti) Diagnostics

func (m UnlockMulti) Diagnostics(diags tfdiags.Diagnostics)

func (UnlockMulti) ForceUnlockCancelled

func (m UnlockMulti) ForceUnlockCancelled()

func (UnlockMulti) ForceUnlockSucceeded

func (m UnlockMulti) ForceUnlockSucceeded()

func (UnlockMulti) LockingDisabledForBackend

func (m UnlockMulti) LockingDisabledForBackend()

type Validate

type Validate interface {
	// Results renders the diagnostics returned from a validation walk, and
	// returns a CLI exit code: 0 if there are no errors, 1 otherwise
	Results(diags tfdiags.Diagnostics) int

	// Diagnostics renders early diagnostics, resulting from argument parsing.
	Diagnostics(diags tfdiags.Diagnostics)
}

The Validate is used for the validate command.

func NewValidate

func NewValidate(args *arguments.View, view *View) Validate

NewValidate returns an initialized Validate implementation for the given ViewType.

type ValidateHuman

type ValidateHuman struct {
	// contains filtered or unexported fields
}

The ValidateHuman implementation renders diagnostics in a human-readable form, along with a success/failure message if Bogform is able to execute the validation walk.

func (*ValidateHuman) Diagnostics

func (v *ValidateHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*ValidateHuman) Results

func (v *ValidateHuman) Results(diags tfdiags.Diagnostics) int

type ValidateJSON

type ValidateJSON struct {
	// contains filtered or unexported fields
}

The ValidateJSON implementation renders validation results as a JSON object. This object includes top-level fields summarizing the result, and an array of JSON diagnostic objects.

func (*ValidateJSON) Diagnostics

func (v *ValidateJSON) Diagnostics(diags tfdiags.Diagnostics)

Diagnostics should only be called if the validation walk cannot be executed. In this case, we choose to render human-readable diagnostic output, primarily for backwards compatibility.

func (*ValidateJSON) Results

func (v *ValidateJSON) Results(diags tfdiags.Diagnostics) int

type ValidateMulti

type ValidateMulti []Validate

func (ValidateMulti) Diagnostics

func (m ValidateMulti) Diagnostics(diags tfdiags.Diagnostics)

Diagnostics renders early diagnostics, resulting from argument parsing.

func (ValidateMulti) Results

func (m ValidateMulti) Results(diags tfdiags.Diagnostics) int

Results renders the diagnostics returned from a validation walk, and returns a CLI exit code: 0 if there are no errors, 1 otherwise

type Version

type Version interface {
	Diagnostics(diags tfdiags.Diagnostics)
	// PrintVersion returns true if the printing has been done successfully and false otherwise.
	PrintVersion(version string, versionPrerelease string, platform string, fipsEnabled bool, providerVersions map[string]string, moduleVersions []ModuleVersion) bool
}

func NewVersion

func NewVersion(args *arguments.View, view *View) Version

NewVersion returns an initialized Version implementation for the given ViewType. This view behaves differently from the general approach since the JSON format is not meant to follow the general JSON format. Instead, the view that is returned will always print diagnostics in human format while Version.PrintVersion will return different results based on the [arguments.View#ViewType].

type VersionMixed

type VersionMixed struct {
	// contains filtered or unexported fields
}

func (*VersionMixed) Diagnostics

func (v *VersionMixed) Diagnostics(diags tfdiags.Diagnostics)

func (*VersionMixed) PrintVersion

func (v *VersionMixed) PrintVersion(version string, versionPrerelease string, platform string, fipsEnabled bool, providerVersions map[string]string, moduleVersions []ModuleVersion) bool

type View

type View struct {

	// ModuleDeprecationWarnLvl is used to filter out deprecation warnings for outputs and variables as requested by the user.
	ModuleDeprecationWarnLvl arguments.DeprecationWarningLevel
	// contains filtered or unexported fields
}

View is the base layer for command views, encapsulating a set of I/O streams, a colorize implementation, and implementing a human friendly view for diagnostics.

func NewView

func NewView(streams *terminal.Streams) *View

Initialize a View with the given streams, a disabled colorize object, and a no-op configSources callback.

func (*View) Colorize

func (v *View) Colorize() *colorstring.Colorize

Colorize returns the colorstring.Colorize object within to be used in other places. TODO meta-refactor: this is a temporary solution. This should not be exposed. Whoever needs to use this

should do it through a View implementation instead.

func (*View) Configure

func (v *View) Configure(view *arguments.View)

Configure applies the global view configuration flags.

func (*View) DeprecationDiagnosticAllowed

func (v *View) DeprecationDiagnosticAllowed(diag tfdiags.Diagnostic, seen DeprecationDiagnosticAllowedSeen) bool

DeprecationDiagnosticAllowed is used to determine if a diagnostic generated by a deprecation check against an output or a variable should be allowed to be shown to the user based on the given DeprecationWarningLevel. This is making use of tfdiags.Diagnostic#ExtraInfo() to figure out if the diagnostic is generated by a deprecation check.

func (*View) DeprecationKeyExtra

func (v *View) DeprecationKeyExtra(diag tfdiags.Diagnostic) string

func (*View) Diagnostics

func (v *View) Diagnostics(diags tfdiags.Diagnostics)

Diagnostics renders a set of warnings and errors in human-readable form. Warnings are printed to stdout, and errors to stderr.

func (*View) DiagsWithNewline

func (v *View) DiagsWithNewline()

func (*View) HelpPrompt

func (v *View) HelpPrompt(command string)

HelpPrompt is intended to be called from commands which fail to parse all of their CLI arguments successfully. It refers users to the full help output rather than rendering it directly, which can be overwhelming and confusing.

func (*View) RunningInAutomation

func (v *View) RunningInAutomation() bool

func (*View) SetConfigSources

func (v *View) SetConfigSources(cb func() map[string]*hcl.File)

SetConfigSources overrides the default no-op callback with a new function pointer, and should be called when the config loader is initialized.

func (*View) SetIsRemoteModuleSource

func (v *View) SetIsRemoteModuleSource(cb func(addrs.Module) bool)

func (*View) SetModuleSourceAddrs

func (v *View) SetModuleSourceAddrs(cb func(addrs.Module) addrs.ModuleSource)

func (*View) SetRunningInAutomation

func (v *View) SetRunningInAutomation(new bool) *View

SetRunningInAutomation modifies the view's "running in automation" flag, which causes some slight adjustments to certain messages that would normally suggest specific Bogform commands to run, to make more conceptual gestures instead for situations where the user isn't running Bogform directly.

For convenient use during initialization (in conjunction with NewView), SetRunningInAutomation returns the receiver after modifying it.

func (*View) StdinPiped

func (v *View) StdinPiped() bool

StdinPiped returns true if the input is piped.

type ViewUiHuman

type ViewUiHuman struct {
	// contains filtered or unexported fields
}

ViewUiHuman is a Ui implementation that colors its output according to the given color schemes for the given type of output.

func (*ViewUiHuman) Output

func (u *ViewUiHuman) Output(message string)

type ViewUiJSON

type ViewUiJSON struct {
	// contains filtered or unexported fields
}

ViewUiJSON is a Ui implementation that colors its output according to the given color schemes for the given type of output.

func (*ViewUiJSON) Output

func (u *ViewUiJSON) Output(message string)

type ViewUiMulti

type ViewUiMulti []Ui

ViewUiMulti is a Ui implementation that colors its output according to the given color schemes for the given type of output.

func (ViewUiMulti) Output

func (u ViewUiMulti) Output(message string)

type Workspace

type Workspace interface {
	Diagnostics(diags tfdiags.Diagnostics)

	// General workspace messages
	WorkspaceDoesNotExist(name string)
	WorkspaceInvalidName(name string)
	WorkspaceCreated(name string)
	WarnWhenUsedAsEnvCmd(usedAsEnvCmd bool)

	// `bogform workspace new` specific
	WorkspaceAlreadyExists(name string)
	WorkspaceIsOverriddenNewError()

	// `bogform workspace list` specific
	ListWorkspaces(workspaces []string, current string)
	WorkspaceOverwrittenByEnvVarWarn()

	// `bogform workspace select` specific
	WorkspaceChanged(name string)
	WorkspaceIsOverriddenSelectError()

	// `bogform workspace delete` specific
	WorkspaceDeleted(name string)
	DeletedWorkspaceNotEmpty(name string)
	CannotDeleteCurrentWorkspace(name string)

	// `bogform workspace show` specific
	WorkspaceShow(name string)

	// Backend returns the non-command view that contains methods to provide
	// progress output for the backend operations.
	Backend() Backend
}

func NewWorkspace

func NewWorkspace(args *arguments.View, view *View) Workspace

NewWorkspace returns an initialized Workspace implementation for the given ViewType.

type WorkspaceHuman

type WorkspaceHuman struct {
	// contains filtered or unexported fields
}

func (*WorkspaceHuman) Backend

func (v *WorkspaceHuman) Backend() Backend

func (*WorkspaceHuman) CannotDeleteCurrentWorkspace

func (v *WorkspaceHuman) CannotDeleteCurrentWorkspace(name string)

func (*WorkspaceHuman) DeletedWorkspaceNotEmpty

func (v *WorkspaceHuman) DeletedWorkspaceNotEmpty(name string)

func (*WorkspaceHuman) Diagnostics

func (v *WorkspaceHuman) Diagnostics(diags tfdiags.Diagnostics)

func (*WorkspaceHuman) ListWorkspaces

func (v *WorkspaceHuman) ListWorkspaces(workspaces []string, current string)

func (*WorkspaceHuman) WarnWhenUsedAsEnvCmd

func (v *WorkspaceHuman) WarnWhenUsedAsEnvCmd(usedAsEnvCmd bool)

func (*WorkspaceHuman) WorkspaceAlreadyExists

func (v *WorkspaceHuman) WorkspaceAlreadyExists(name string)

func (*WorkspaceHuman) WorkspaceChanged

func (v *WorkspaceHuman) WorkspaceChanged(name string)

func (*WorkspaceHuman) WorkspaceCreated

func (v *WorkspaceHuman) WorkspaceCreated(name string)

func (*WorkspaceHuman) WorkspaceDeleted

func (v *WorkspaceHuman) WorkspaceDeleted(name string)

func (*WorkspaceHuman) WorkspaceDoesNotExist

func (v *WorkspaceHuman) WorkspaceDoesNotExist(name string)

func (*WorkspaceHuman) WorkspaceInvalidName

func (v *WorkspaceHuman) WorkspaceInvalidName(name string)

func (*WorkspaceHuman) WorkspaceIsOverriddenNewError

func (v *WorkspaceHuman) WorkspaceIsOverriddenNewError()

func (*WorkspaceHuman) WorkspaceIsOverriddenSelectError

func (v *WorkspaceHuman) WorkspaceIsOverriddenSelectError()

func (*WorkspaceHuman) WorkspaceOverwrittenByEnvVarWarn

func (v *WorkspaceHuman) WorkspaceOverwrittenByEnvVarWarn()

func (*WorkspaceHuman) WorkspaceShow

func (v *WorkspaceHuman) WorkspaceShow(name string)

type WorkspaceJSON

type WorkspaceJSON struct {
	// contains filtered or unexported fields
}

func (*WorkspaceJSON) Backend

func (v *WorkspaceJSON) Backend() Backend

func (*WorkspaceJSON) CannotDeleteCurrentWorkspace

func (v *WorkspaceJSON) CannotDeleteCurrentWorkspace(name string)

func (*WorkspaceJSON) DeletedWorkspaceNotEmpty

func (v *WorkspaceJSON) DeletedWorkspaceNotEmpty(name string)

func (*WorkspaceJSON) Diagnostics

func (v *WorkspaceJSON) Diagnostics(diags tfdiags.Diagnostics)

func (*WorkspaceJSON) ListWorkspaces

func (v *WorkspaceJSON) ListWorkspaces(workspaces []string, current string)

func (*WorkspaceJSON) WarnWhenUsedAsEnvCmd

func (v *WorkspaceJSON) WarnWhenUsedAsEnvCmd(usedAsEnvCmd bool)

func (*WorkspaceJSON) WorkspaceAlreadyExists

func (v *WorkspaceJSON) WorkspaceAlreadyExists(name string)

func (*WorkspaceJSON) WorkspaceChanged

func (v *WorkspaceJSON) WorkspaceChanged(name string)

func (*WorkspaceJSON) WorkspaceCreated

func (v *WorkspaceJSON) WorkspaceCreated(name string)

func (*WorkspaceJSON) WorkspaceDeleted

func (v *WorkspaceJSON) WorkspaceDeleted(name string)

func (*WorkspaceJSON) WorkspaceDoesNotExist

func (v *WorkspaceJSON) WorkspaceDoesNotExist(name string)

func (*WorkspaceJSON) WorkspaceInvalidName

func (v *WorkspaceJSON) WorkspaceInvalidName(name string)

func (*WorkspaceJSON) WorkspaceIsOverriddenNewError

func (v *WorkspaceJSON) WorkspaceIsOverriddenNewError()

func (*WorkspaceJSON) WorkspaceIsOverriddenSelectError

func (v *WorkspaceJSON) WorkspaceIsOverriddenSelectError()

func (*WorkspaceJSON) WorkspaceOverwrittenByEnvVarWarn

func (v *WorkspaceJSON) WorkspaceOverwrittenByEnvVarWarn()

func (*WorkspaceJSON) WorkspaceShow

func (v *WorkspaceJSON) WorkspaceShow(name string)

type WorkspaceMulti

type WorkspaceMulti []Workspace

func (WorkspaceMulti) Backend

func (m WorkspaceMulti) Backend() Backend

func (WorkspaceMulti) CannotDeleteCurrentWorkspace

func (m WorkspaceMulti) CannotDeleteCurrentWorkspace(name string)

func (WorkspaceMulti) DeletedWorkspaceNotEmpty

func (m WorkspaceMulti) DeletedWorkspaceNotEmpty(name string)

func (WorkspaceMulti) Diagnostics

func (m WorkspaceMulti) Diagnostics(diags tfdiags.Diagnostics)

func (WorkspaceMulti) ListWorkspaces

func (m WorkspaceMulti) ListWorkspaces(workspaces []string, current string)

func (WorkspaceMulti) WarnWhenUsedAsEnvCmd

func (m WorkspaceMulti) WarnWhenUsedAsEnvCmd(usedAsEnvCmd bool)

func (WorkspaceMulti) WorkspaceAlreadyExists

func (m WorkspaceMulti) WorkspaceAlreadyExists(name string)

func (WorkspaceMulti) WorkspaceChanged

func (m WorkspaceMulti) WorkspaceChanged(name string)

func (WorkspaceMulti) WorkspaceCreated

func (m WorkspaceMulti) WorkspaceCreated(name string)

func (WorkspaceMulti) WorkspaceDeleted

func (m WorkspaceMulti) WorkspaceDeleted(name string)

func (WorkspaceMulti) WorkspaceDoesNotExist

func (m WorkspaceMulti) WorkspaceDoesNotExist(name string)

func (WorkspaceMulti) WorkspaceInvalidName

func (m WorkspaceMulti) WorkspaceInvalidName(name string)

func (WorkspaceMulti) WorkspaceIsOverriddenNewError

func (m WorkspaceMulti) WorkspaceIsOverriddenNewError()

func (WorkspaceMulti) WorkspaceIsOverriddenSelectError

func (m WorkspaceMulti) WorkspaceIsOverriddenSelectError()

func (WorkspaceMulti) WorkspaceOverwrittenByEnvVarWarn

func (m WorkspaceMulti) WorkspaceOverwrittenByEnvVarWarn()

func (WorkspaceMulti) WorkspaceShow

func (m WorkspaceMulti) WorkspaceShow(name string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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