yera.cli.resources.providers

Provider setup orchestration shared across CLI commands.

Symbols

def run_provider_setup — Orchestrates the end-to-end setup process for a provider connection.

run_provider_setup

run_provider_setup(
    handler: BaseProviderSetup,
    connection_name: str,
    console: Console,
    error_console: Console,
) → bool

Orchestrates the end-to-end setup process for a provider connection.

This function manages the workflow of acquiring provider configuration—first attempting automatic detection and falling back to interactive user prompts. If a configuration is obtained, it is validated using the handler's logic before being persisted to the global configuration storage.

Parameters

handler
type: BaseProviderSetup

An instance of a provider setup handler (e.g., Azure, AWS) that implements the detection and validation logic.

connection_name
type: str

The unique identifier to assign to this connection within the configuration file.

console
type: Console

A Rich Console instance used for printing success messages and progress updates.

error_console
type: Console

A Rich Console instance used for printing warnings, skips, and validation errors.

Returns

type: bool

True if the provider was successfully configured and saved to storage, False if the configuration was skipped or validation failed.