Skip to content

Commit

Permalink
add full names for cloud providers in guided init (#2375)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovilla authored Apr 4, 2024
2 parents 6a83ada + 5c03e88 commit 97c5991
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/_nebari/subcommands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 97c5991

Please sign in to comment.