Class StateBackendWizard
java.lang.Object
cloud.kitelang.cli.interactive.StateBackendWizard
Interactive wizard for configuring state backend per environment.
Guides users through setting up PostgreSQL or Kite Cloud state storage.
-
Constructor Summary
ConstructorsConstructorDescriptionStateBackendWizard(InteractivePrompt prompt, GlobalConfig config, String projectName) Creates a wizard with default environments.StateBackendWizard(InteractivePrompt prompt, GlobalConfig config, String projectName, List<String> environments) Creates a wizard with specific environments. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigureEnvironment(GlobalConfig config, String projectName, String environment, String url, String username, String password) Runs the wizard for a specific environment (non-interactive mode).booleanrun()Runs the state backend configuration wizard.
-
Constructor Details
-
StateBackendWizard
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 promptconfig- the global configprojectName- the project name for scoping credentialsenvironments- the list of environments to configure
-
-
Method Details
-
run
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 configprojectName- the project nameenvironment- the target environment (dev, staging, prod)url- PostgreSQL connection URLusername- database usernamepassword- database password (can be null, then env var is expected)- Throws:
IOException
-