Documentation
¶
Index ¶
- Constants
- func ActiveCloud(ctx context.Context, azEnv []string) (string, error)
- func BuildCloudConfig(endpointURL string) (string, error)
- func BuildEndpoint(host string) string
- func ConfigDir(lstkConfigDir string) string
- func Env(azureConfigDir string) []string
- func IsHealthy(ctx context.Context, endpointURL string) error
- func IsSetUp(azureConfigDir string) bool
- func ListClouds(ctx context.Context, azEnv []string) ([]string, error)
- func RunSetup(ctx context.Context, sink output.Sink, containers []config.ContainerConfig, ...) error
- func Setup(ctx context.Context, sink output.Sink, endpointURL, azureConfigDir string) error
- func StartInterception(ctx context.Context, sink output.Sink, endpointURL string) error
- func StopInterception(ctx context.Context, sink output.Sink, targetCloud string) error
Constants ¶
const ( AzureSubdomain = "azure" CloudName = "LocalStack" )
const PublicCloudName = "AzureCloud"
PublicCloudName is the built-in Azure CLI cloud for public Azure. It is always registered, so it is the safe default to switch back to when stopping interception.
Variables ¶
This section is empty.
Functions ¶
func ActiveCloud ¶ added in v0.14.0
ActiveCloud returns the name of the currently active Azure CLI cloud.
func BuildCloudConfig ¶
BuildCloudConfig returns the JSON payload for `az cloud register/update --cloud-config`.
func BuildEndpoint ¶
func ListClouds ¶ added in v0.14.0
ListClouds returns the names of all clouds registered in the Azure CLI config selected by azEnv (built-ins like AzureCloud plus any custom-registered clouds).
func RunSetup ¶
func RunSetup(ctx context.Context, sink output.Sink, containers []config.ContainerConfig, localStackHost, lstkConfigDir string) error
RunSetup derives the LocalStack Azure endpoint from the configured containers and runs Setup against the isolated Azure CLI config dir under lstkConfigDir. It works with any sink, so it serves both the interactive (TUI) and non-interactive (plain) paths.
func Setup ¶
Setup registers the LocalStack custom cloud in an isolated AZURE_CONFIG_DIR, activates it, disables instance discovery, and logs in with a dummy SP.
func StartInterception ¶ added in v0.14.0
StartInterception registers and activates the LocalStack custom cloud in the user's global Azure CLI config (default ~/.azure — no AZURE_CONFIG_DIR override), so plain `az` commands in any terminal target the LocalStack Azure emulator until StopInterception is run. Unlike Setup, it does not touch the isolated `lstk az` config. The caller is expected to have verified the Azure CLI is installed (see azPreflight).
func StopInterception ¶ added in v0.14.0
StopInterception switches the global active Azure CLI cloud away from LocalStack back to targetCloud (defaulting to AzureCloud) and re-enables instance discovery. As a guard against clobbering an unrelated selection, it only changes the active cloud when LocalStack is currently active; otherwise it reports the current cloud and does nothing.
Types ¶
This section is empty.