Documentation
¶
Index ¶
- func AllTerraformCompatFlags() map[string]compat.CompatibilityFlag
- func ApplyCompatFlags() map[string]compat.CompatibilityFlag
- func BackendExecutionFlags() *flags.FlagRegistry
- func CommonSubcommandFlags() map[string]compat.CompatibilityFlag
- func ConsoleCompatFlags() map[string]compat.CompatibilityFlag
- func DestroyCompatFlags() map[string]compat.CompatibilityFlag
- func ExecuteVarfileGeneration(config *VarfileConfig) error
- func FmtCompatFlags() map[string]compat.CompatibilityFlag
- func ForceUnlockCompatFlags() map[string]compat.CompatibilityFlag
- func GetCompatFlags() map[string]compat.CompatibilityFlag
- func GraphCompatFlags() map[string]compat.CompatibilityFlag
- func ImportCompatFlags() map[string]compat.CompatibilityFlag
- func InitCompatFlags() map[string]compat.CompatibilityFlag
- func OutputCompatFlags() map[string]compat.CompatibilityFlag
- func PlanCompatFlags() map[string]compat.CompatibilityFlag
- func ProvidersCompatFlags() map[string]compat.CompatibilityFlag
- func ProvidersLockCompatFlags() map[string]compat.CompatibilityFlag
- func ProvidersMirrorCompatFlags() map[string]compat.CompatibilityFlag
- func ProvidersSchemaCompatFlags() map[string]compat.CompatibilityFlag
- func RefreshCompatFlags() map[string]compat.CompatibilityFlag
- func RegisterProviderFlags(config *schema.AtmosConfiguration, args []string) error
- func RegisterTerraformCompletions(tfCmd *cobra.Command)
- func ShowCompatFlags() map[string]compat.CompatibilityFlag
- func StateCompatFlags() map[string]compat.CompatibilityFlag
- func StateListCompatFlags() map[string]compat.CompatibilityFlag
- func StateMvCompatFlags() map[string]compat.CompatibilityFlag
- func StatePullCompatFlags() map[string]compat.CompatibilityFlag
- func StatePushCompatFlags() map[string]compat.CompatibilityFlag
- func StateReplaceProviderCompatFlags() map[string]compat.CompatibilityFlag
- func StateRmCompatFlags() map[string]compat.CompatibilityFlag
- func StateShowCompatFlags() map[string]compat.CompatibilityFlag
- func TaintCompatFlags() map[string]compat.CompatibilityFlag
- func TerraformAffectedFlags() *flags.FlagRegistry
- func TerraformFlags() *flags.FlagRegistry
- func TerraformGlobalCompatFlags() map[string]compat.CompatibilityFlag
- func TestCompatFlags() map[string]compat.CompatibilityFlag
- func UntaintCompatFlags() map[string]compat.CompatibilityFlag
- func ValidateCompatFlags() map[string]compat.CompatibilityFlag
- func ValidateVarfileConfig(config *VarfileConfig) error
- func WithBackendExecutionFlags() flags.Option
- func WithTerraformAffectedFlags() flags.Option
- func WithTerraformFlags() flags.Option
- func WorkspaceCompatFlags() map[string]compat.CompatibilityFlag
- func WorkspaceDeleteCompatFlags() map[string]compat.CompatibilityFlag
- func WorkspaceListCompatFlags() map[string]compat.CompatibilityFlag
- func WorkspaceNewCompatFlags() map[string]compat.CompatibilityFlag
- func WorkspaceSelectCompatFlags() map[string]compat.CompatibilityFlag
- func WorkspaceShowCompatFlags() map[string]compat.CompatibilityFlag
- type TerraformCommandProvider
- func (t *TerraformCommandProvider) GetAliases() []internal.CommandAlias
- func (t *TerraformCommandProvider) GetCommand() *cobra.Command
- func (t *TerraformCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag
- func (t *TerraformCommandProvider) GetFlagsBuilder() flags.Builder
- func (t *TerraformCommandProvider) GetGroup() string
- func (t *TerraformCommandProvider) GetName() string
- func (t *TerraformCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder
- func (t *TerraformCommandProvider) IsExperimental() bool
- type TerraformRunOptions
- type VarfileConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllTerraformCompatFlags ¶
func AllTerraformCompatFlags() map[string]compat.CompatibilityFlag
AllTerraformCompatFlags returns a combined set of all terraform compatibility flags. This is used for preprocessing in Execute() to identify terraform pass-through flags. Before Cobra parses the command line, we combine all possible flags so we can correctly separate pass-through flags regardless of which subcommand is being called.
func ApplyCompatFlags ¶
func ApplyCompatFlags() map[string]compat.CompatibilityFlag
ApplyCompatFlags returns compatibility flags specific to terraform apply.
func BackendExecutionFlags ¶ added in v1.202.1
func BackendExecutionFlags() *flags.FlagRegistry
BackendExecutionFlags returns flags for commands that generate backend files or run init. These flags are used by: init, workspace, plan, apply, deploy.
func CommonSubcommandFlags ¶
func CommonSubcommandFlags() map[string]compat.CompatibilityFlag
CommonSubcommandFlags returns flags that are common across many terraform subcommands. These are NOT global terraform options - they only apply to specific subcommands like plan, apply, destroy. These flags are NOT parsed by Cobra but are passed through to terraform/tofu.
func ConsoleCompatFlags ¶
func ConsoleCompatFlags() map[string]compat.CompatibilityFlag
ConsoleCompatFlags returns compatibility flags specific to terraform console.
func DestroyCompatFlags ¶
func DestroyCompatFlags() map[string]compat.CompatibilityFlag
DestroyCompatFlags returns compatibility flags specific to terraform destroy.
func ExecuteVarfileGeneration ¶
func ExecuteVarfileGeneration(config *VarfileConfig) error
ExecuteVarfileGeneration executes the varfile generation with the given config.
func FmtCompatFlags ¶
func FmtCompatFlags() map[string]compat.CompatibilityFlag
FmtCompatFlags returns compatibility flags specific to terraform fmt.
func ForceUnlockCompatFlags ¶
func ForceUnlockCompatFlags() map[string]compat.CompatibilityFlag
ForceUnlockCompatFlags returns compatibility flags specific to terraform force-unlock.
func GetCompatFlags ¶
func GetCompatFlags() map[string]compat.CompatibilityFlag
GetCompatFlags returns compatibility flags specific to terraform get.
func GraphCompatFlags ¶
func GraphCompatFlags() map[string]compat.CompatibilityFlag
GraphCompatFlags returns compatibility flags specific to terraform graph.
func ImportCompatFlags ¶
func ImportCompatFlags() map[string]compat.CompatibilityFlag
ImportCompatFlags returns compatibility flags specific to terraform import.
func InitCompatFlags ¶
func InitCompatFlags() map[string]compat.CompatibilityFlag
InitCompatFlags returns compatibility flags specific to terraform init.
func OutputCompatFlags ¶
func OutputCompatFlags() map[string]compat.CompatibilityFlag
OutputCompatFlags returns compatibility flags specific to terraform output.
func PlanCompatFlags ¶
func PlanCompatFlags() map[string]compat.CompatibilityFlag
PlanCompatFlags returns compatibility flags specific to terraform plan.
func ProvidersCompatFlags ¶
func ProvidersCompatFlags() map[string]compat.CompatibilityFlag
ProvidersCompatFlags returns compatibility flags specific to terraform providers. Note: terraform providers has no special flags beyond standard terraform flags.
func ProvidersLockCompatFlags ¶ added in v1.205.1
func ProvidersLockCompatFlags() map[string]compat.CompatibilityFlag
ProvidersLockCompatFlags returns compatibility flags specific to terraform providers lock.
func ProvidersMirrorCompatFlags ¶ added in v1.205.1
func ProvidersMirrorCompatFlags() map[string]compat.CompatibilityFlag
ProvidersMirrorCompatFlags returns compatibility flags specific to terraform providers mirror.
func ProvidersSchemaCompatFlags ¶ added in v1.205.1
func ProvidersSchemaCompatFlags() map[string]compat.CompatibilityFlag
ProvidersSchemaCompatFlags returns compatibility flags specific to terraform providers schema.
func RefreshCompatFlags ¶
func RefreshCompatFlags() map[string]compat.CompatibilityFlag
RefreshCompatFlags returns compatibility flags specific to terraform refresh.
func RegisterProviderFlags ¶
func RegisterProviderFlags(config *schema.AtmosConfiguration, args []string) error
RegisterProviderFlags adds the options that enabled configuration providers declare in their package metadata to the terraform subcommands they apply to. It reads static metadata only, so no plugin starts, and it runs before Cobra parses the command line.
func RegisterTerraformCompletions ¶
RegisterTerraformCompletions registers all completion functions for a terraform subcommand. This includes:
- Component positional arg completion (first arg)
- Identity flag completion
Note: Stack flag completion is handled by the flag handler's registerPersistentCompletions() method in pkg/flags/standard.go. Custom completion functions are configured in the flag definition.
func ShowCompatFlags ¶
func ShowCompatFlags() map[string]compat.CompatibilityFlag
ShowCompatFlags returns compatibility flags specific to terraform show.
func StateCompatFlags ¶
func StateCompatFlags() map[string]compat.CompatibilityFlag
StateCompatFlags returns compatibility flags specific to terraform state commands.
func StateListCompatFlags ¶ added in v1.205.1
func StateListCompatFlags() map[string]compat.CompatibilityFlag
StateListCompatFlags returns compatibility flags specific to terraform state list.
func StateMvCompatFlags ¶ added in v1.205.1
func StateMvCompatFlags() map[string]compat.CompatibilityFlag
StateMvCompatFlags returns compatibility flags specific to terraform state mv. Note: terraform's -dry-run is intentionally excluded to avoid conflict with Atmos --dry-run.
func StatePullCompatFlags ¶ added in v1.205.1
func StatePullCompatFlags() map[string]compat.CompatibilityFlag
StatePullCompatFlags returns compatibility flags specific to terraform state pull. State pull has no native flags beyond standard terraform flags.
func StatePushCompatFlags ¶ added in v1.205.1
func StatePushCompatFlags() map[string]compat.CompatibilityFlag
StatePushCompatFlags returns compatibility flags specific to terraform state push.
func StateReplaceProviderCompatFlags ¶ added in v1.205.1
func StateReplaceProviderCompatFlags() map[string]compat.CompatibilityFlag
StateReplaceProviderCompatFlags returns compatibility flags specific to terraform state replace-provider.
func StateRmCompatFlags ¶ added in v1.205.1
func StateRmCompatFlags() map[string]compat.CompatibilityFlag
StateRmCompatFlags returns compatibility flags specific to terraform state rm. Note: terraform's -dry-run is intentionally excluded to avoid conflict with Atmos --dry-run.
func StateShowCompatFlags ¶ added in v1.205.1
func StateShowCompatFlags() map[string]compat.CompatibilityFlag
StateShowCompatFlags returns compatibility flags specific to terraform state show.
func TaintCompatFlags ¶
func TaintCompatFlags() map[string]compat.CompatibilityFlag
TaintCompatFlags returns compatibility flags specific to terraform taint.
func TerraformAffectedFlags ¶
func TerraformAffectedFlags() *flags.FlagRegistry
TerraformAffectedFlags returns a registry with flags for affected component detection. These flags are used by commands that support --affected mode.
func TerraformFlags ¶
func TerraformFlags() *flags.FlagRegistry
TerraformFlags returns a registry with flags specific to Terraform commands. Includes common flags plus Terraform-specific flags.
func TerraformGlobalCompatFlags ¶
func TerraformGlobalCompatFlags() map[string]compat.CompatibilityFlag
TerraformGlobalCompatFlags returns TRUE global terraform flags. These can be used before any subcommand (e.g., `terraform -chdir=./foo plan`). These flags are NOT parsed by Cobra but are passed through to terraform/tofu.
func TestCompatFlags ¶
func TestCompatFlags() map[string]compat.CompatibilityFlag
TestCompatFlags returns compatibility flags specific to terraform test.
func UntaintCompatFlags ¶
func UntaintCompatFlags() map[string]compat.CompatibilityFlag
UntaintCompatFlags returns compatibility flags specific to terraform untaint.
func ValidateCompatFlags ¶
func ValidateCompatFlags() map[string]compat.CompatibilityFlag
ValidateCompatFlags returns compatibility flags specific to terraform validate.
func ValidateVarfileConfig ¶
func ValidateVarfileConfig(config *VarfileConfig) error
ValidateVarfileConfig validates the varfile configuration.
func WithBackendExecutionFlags ¶ added in v1.202.1
WithBackendExecutionFlags returns a flags.Option that adds backend execution flags.
func WithTerraformAffectedFlags ¶
WithTerraformAffectedFlags returns a flags.Option that adds affected component detection flags.
func WithTerraformFlags ¶
WithTerraformFlags returns a flags.Option that adds all Terraform-specific flags.
func WorkspaceCompatFlags ¶
func WorkspaceCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceCompatFlags returns compatibility flags specific to terraform workspace commands.
func WorkspaceDeleteCompatFlags ¶ added in v1.205.1
func WorkspaceDeleteCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceDeleteCompatFlags returns compatibility flags specific to terraform workspace delete.
func WorkspaceListCompatFlags ¶ added in v1.205.1
func WorkspaceListCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceListCompatFlags returns compatibility flags specific to terraform workspace list. Workspace list has no native flags beyond standard terraform flags.
func WorkspaceNewCompatFlags ¶ added in v1.205.1
func WorkspaceNewCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceNewCompatFlags returns compatibility flags specific to terraform workspace new.
func WorkspaceSelectCompatFlags ¶ added in v1.205.1
func WorkspaceSelectCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceSelectCompatFlags returns compatibility flags specific to terraform workspace select.
func WorkspaceShowCompatFlags ¶ added in v1.205.1
func WorkspaceShowCompatFlags() map[string]compat.CompatibilityFlag
WorkspaceShowCompatFlags returns compatibility flags specific to terraform workspace show. Workspace show has no native flags beyond standard terraform flags.
Types ¶
type TerraformCommandProvider ¶
type TerraformCommandProvider struct{}
TerraformCommandProvider implements the CommandProvider interface.
func (*TerraformCommandProvider) GetAliases ¶
func (t *TerraformCommandProvider) GetAliases() []internal.CommandAlias
GetAliases returns command aliases.
func (*TerraformCommandProvider) GetCommand ¶
func (t *TerraformCommandProvider) GetCommand() *cobra.Command
GetCommand returns the terraform command.
func (*TerraformCommandProvider) GetCompatibilityFlags ¶
func (t *TerraformCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag
GetCompatibilityFlags returns compatibility flags for this command.
func (*TerraformCommandProvider) GetFlagsBuilder ¶
func (t *TerraformCommandProvider) GetFlagsBuilder() flags.Builder
GetFlagsBuilder returns the flags builder for this command.
func (*TerraformCommandProvider) GetGroup ¶
func (t *TerraformCommandProvider) GetGroup() string
GetGroup returns the command group for help organization.
func (*TerraformCommandProvider) GetName ¶
func (t *TerraformCommandProvider) GetName() string
GetName returns the command name.
func (*TerraformCommandProvider) GetPositionalArgsBuilder ¶
func (t *TerraformCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder
GetPositionalArgsBuilder returns the positional args builder for this command.
func (*TerraformCommandProvider) IsExperimental ¶ added in v1.205.0
func (t *TerraformCommandProvider) IsExperimental() bool
IsExperimental returns whether this command is experimental.
type TerraformRunOptions ¶
type TerraformRunOptions = shared.RunOptions
TerraformRunOptions contains shared flags from terraformParser. Used by simple subcommands that only need the base terraform flags.
func ParseTerraformRunOptions ¶
ParseTerraformRunOptions parses and validates shared terraform flags from Viper. Pass cmd to also detect if --ui flag was explicitly set (for tri-state logic: unset vs true vs false); omit it (or pass nil) when UI tri-state detection isn't needed.
type VarfileConfig ¶
type VarfileConfig struct {
Component string
Stack string
File string
ProcessTemplates bool
ProcessFunctions bool
Skip []string
}
VarfileConfig holds the configuration for varfile generation.
func ParseVarfileFlags ¶
func ParseVarfileFlags(v *viper.Viper) VarfileConfig
ParseVarfileFlags extracts varfile configuration from Viper after flag binding.
Source Files
¶
- apply.go
- clean.go
- compat_flags.go
- completion.go
- console.go
- deploy.go
- destroy.go
- flags.go
- fmt.go
- force_unlock.go
- get.go
- graph.go
- help.go
- hooks_kinds.go
- import.go
- init.go
- lint.go
- login.go
- logout.go
- metadata.go
- modules.go
- options.go
- output.go
- plan.go
- plan_diff.go
- providers.go
- refresh.go
- shell.go
- show.go
- stack_lifecycle.go
- state.go
- taint.go
- terraform.go
- test.go
- untaint.go
- utils.go
- validate.go
- varfile.go
- version_cmd.go
- workspace.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cache provides the `atmos terraform cache` command group for inspecting and managing the Terraform registry cache.
|
Package cache provides the `atmos terraform cache` command group for inspecting and managing the Terraform registry cache. |
|
required_providers
Package required_providers provides CLI commands for generating Terraform required_providers blocks.
|
Package required_providers provides CLI commands for generating Terraform required_providers blocks. |
|
Package shared provides utilities shared between terraform and its subpackages.
|
Package shared provides utilities shared between terraform and its subpackages. |
|
Package source provides CLI commands for managing terraform component sources.
|
Package source provides CLI commands for managing terraform component sources. |