Class StateBackendWizard

java.lang.Object
cloud.kitelang.cli.interactive.StateBackendWizard

public class StateBackendWizard extends Object
Interactive wizard for configuring state backend per environment. Guides users through setting up PostgreSQL or Kite Cloud state storage.
  • Constructor Details

    • StateBackendWizard

      public StateBackendWizard(InteractivePrompt prompt, GlobalConfig config, String projectName)
      Creates a wizard with default environments.
    • StateBackendWizard

      public StateBackendWizard(InteractivePrompt prompt, GlobalConfig config, String projectName, List<String> environments)
      Creates a wizard with specific environments.
      Parameters:
      prompt - the interactive prompt
      config - the global config
      projectName - the project name for scoping credentials
      environments - the list of environments to configure
  • Method Details

    • run

      public boolean run() throws IOException
      Runs the state backend configuration wizard.
      Returns:
      true if configuration was saved, false if skipped or cancelled
      Throws:
      IOException
    • configureEnvironment

      public static void configureEnvironment(GlobalConfig config, String projectName, String environment, String url, String username, String password) throws IOException
      Runs the wizard for a specific environment (non-interactive mode).
      Parameters:
      config - the global config
      projectName - the project name
      environment - the target environment (dev, staging, prod)
      url - PostgreSQL connection URL
      username - database username
      password - database password (can be null, then env var is expected)
      Throws:
      IOException