Documentation
¶
Overview ¶
Package configuration connects native configuration providers to Atmos stack definitions.
Index ¶
- type Loader
- type Provider
- type Session
- func (s *Session) ComponentFailure(ctx context.Context, stack, component string) error
- func (s *Session) Discover(ctx context.Context) (map[string]map[string]any, error)
- func (s *Session) ForRevision(root string) (schema.ComponentConfigurationRuntime, error)
- func (s *Session) ForValidation() schema.ComponentConfigurationRuntime
- func (s *Session) ImportComponents(ctx context.Context, uri string) (map[string]any, bool, error)
- func (s *Session) PlanIdentity(ctx context.Context, info *schema.ConfigAndStacksInfo, ...) (string, error)
- func (s *Session) Prepare(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.PreparedComponentConfiguration, error)
- func (s *Session) ProbeIAM(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.ComponentIAM, error)
- func (s *Session) ResolveDeferredSource(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.PreparedComponentConfiguration, error)
- func (s *Session) ResolveState(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.ComponentConfigurationState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
Loader resolves the requested configuration providers through package policy and locks.
type Provider ¶
type Provider interface {
ComponentType() string
Discover(context.Context, *pluginv1.DiscoverComponentsRequest) (*pluginv1.DiscoverComponentsResponse, error)
Prepare(context.Context, *pluginv1.ComponentRequest) (*pluginv1.PrepareComponentResponse, error)
ResolveState(context.Context, *pluginv1.ComponentRequest) (*pluginv1.ResolveComponentStateResponse, error)
}
Provider is the typed component capability boundary used by a discovery session.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds one command's discovery result; it is never a process-global cache.
func New ¶
func New(ctx context.Context, config *schema.AtmosConfiguration, command string, loader Loader) (*Session, error)
New snapshots the explicitly enabled scope without starting plugins or scanning directories.
func (*Session) ComponentFailure ¶
ComponentFailure returns the diagnostic of a unit that failed discovery, or nil for a healthy or unknown component. It waits for discovery so a bulk run can reject a broken unit before it runs any infrastructure command.
func (*Session) Discover ¶
Discover returns isolated definitions and shares only immutable evaluator results within this invocation.
func (*Session) ForRevision ¶
func (s *Session) ForRevision(root string) (schema.ComponentConfigurationRuntime, error)
ForRevision creates an independent inventory in a different checkout. The host's trusted plugin selection, discovery scope, environment, and cancellation remain fixed for the invocation; no cached definitions or evaluated HCL are reused.
func (*Session) ForValidation ¶
func (s *Session) ForValidation() schema.ComponentConfigurationRuntime
ForValidation shares cached imports but never registers additional executable units.
func (*Session) ImportComponents ¶
ImportComponents resolves an explicit provider import into Terraform components of the importing stack. The provider evaluates only the imported roots; automatic discovery scope (included_paths and excluded_paths) never filters an explicit import. The units keep their provider names but drop the provider's derived stack, so the same unit can be imported by several stacks, or through a mixin, and each stack gets its own component.
func (*Session) PlanIdentity ¶
func (s *Session) PlanIdentity(ctx context.Context, info *schema.ConfigAndStacksInfo, sources []schema.ComponentConfigurationSource) (string, error)
PlanIdentity fingerprints provider/options and watched source bytes without preparing the unit.
func (*Session) Prepare ¶
func (s *Session) Prepare(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.PreparedComponentConfiguration, error)
Prepare reevaluates only the selected instance, after the scheduler's dependencies.
func (*Session) ProbeIAM ¶
func (s *Session) ProbeIAM(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.ComponentIAM, error)
ProbeIAM reads only the Terragrunt flags before full evaluation. It must not run infrastructure commands or return a module configuration.
func (*Session) ResolveDeferredSource ¶
func (s *Session) ResolveDeferredSource(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.PreparedComponentConfiguration, error)
ResolveDeferredSource prepares the unit again once the host has run its read-config after hooks, so that the provider resolves the registry source the first preparation left as written. The provider applies the same exclusion guard and errors policies as in a single preparation. Warnings were printed by the first preparation and are not repeated.
func (*Session) ResolveState ¶
func (s *Session) ResolveState(ctx context.Context, info *schema.ConfigAndStacksInfo) (*schema.ComponentConfigurationState, error)
ResolveState locates state with no evaluator commands, writes, network, or output reads.