awscfg

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package awscfg loads an AWS SDK config for truffle through the shared spore.host config base (libs/sporeconfig), so truffle resolves the AWS profile and default region the same way every other tool does: flag > env (SPORE_*/AWS_*) > ~/.config/spore/config.toml > default.

The CLI records its --profile flag value via SetFlags during PersistentPreRun (truffle's region handling is per-command via --regions, so only the profile and a shared default region flow through here). An unset profile/region means the ambient AWS chain, so truffle's behavior is unchanged unless the suite config is set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, defaultRegion string) (aws.Config, error)

Load builds an aws.Config applying the shared profile and region.

defaultRegion is a last-resort region used only if neither the shared config nor the ambient chain provides one (e.g. quota checks that must target a real region). Pass "" for no default. An empty resolved profile uses the ambient credential chain.

func Resolved

func Resolved() sporeconfig.Config

Resolved returns the shared config (profile/region/account/output) using the recorded flags plus env/file/default. A malformed config file is tolerated.

func SetFlags

func SetFlags(profile, region string)

SetFlags records the CLI flag values for shared-config resolution. Called once from the root command's PersistentPreRun. Empty fields fall through to env/file/default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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