From 955697cb3e52b0c3e94e06e854e8e3b6717dc146 Mon Sep 17 00:00:00 2001 From: exitflynn Date: Tue, 2 Apr 2024 00:41:34 +0530 Subject: [PATCH] add full names for cloud provider in guided init --- src/_nebari/subcommands/init.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/_nebari/subcommands/init.py b/src/_nebari/subcommands/init.py index f519b97f8f..979837b81e 100644 --- a/src/_nebari/subcommands/init.py +++ b/src/_nebari/subcommands/init.py @@ -75,6 +75,15 @@ LATEST = "latest" +CLOUD_PROVIDER_FULL_NAME = { + "Local": ProviderEnum.local.name, + "Existing": ProviderEnum.existing.name, + "Digital Ocean": ProviderEnum.do.name, + "Amazon Web Services": ProviderEnum.aws.name, + "Google Cloud Platform": ProviderEnum.gcp.name, + "Microsoft Azure": ProviderEnum.azure.name, +} + class GitRepoEnum(str, enum.Enum): github = "github.com" @@ -647,12 +656,14 @@ def guided_init_wizard(ctx: typer.Context, guided_init: str): ) ) # try: - inputs.cloud_provider = questionary.select( + cloud_provider: str = questionary.select( "Where would you like to deploy your Nebari cluster?", - choices=enum_to_list(ProviderEnum), + choices=CLOUD_PROVIDER_FULL_NAME.keys(), qmark=qmark, ).unsafe_ask() + inputs.cloud_provider = CLOUD_PROVIDER_FULL_NAME.get(cloud_provider) + if not disable_checks: check_cloud_provider_creds( cloud_provider=inputs.cloud_provider,