Skip to content

Commit

Permalink
lengthen variable name as better description
Browse files Browse the repository at this point in the history
  • Loading branch information
strickvl committed Sep 21, 2023
1 parent e24de3f commit 8fd757c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/book/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ have already created, you can do so by passing the bucket name to the
`mlstacks deploy` command:

```bash
mlstacks deploy -f stack.yaml -b <BUCKET_NAME_GOES_HERE>
# e.g. mlstacks deploy -f stack.yaml -b s3://zenml-mlstacks-remote-state-3d3r6
mlstacks deploy -f stack.yaml -rb <BUCKET_NAME_GOES_HERE>
# e.g. mlstacks deploy -f stack.yaml -rb s3://zenml-mlstacks-remote-state-3d3r6
```

This will then connect to the remote state bucket and use that as the backend
Expand Down
14 changes: 7 additions & 7 deletions src/mlstacks/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def cli() -> None:
help="Path to the YAML file for deploy",
)
@click.option(
"-b",
"--bucket_name",
"bucket_name",
"--remote_state_bucket_name",
"-rb",
"remote_state_bucket_name",
type=click.STRING,
required=False,
help="Full URL of a pre-existing remote state bucket",
Expand All @@ -78,18 +78,18 @@ def cli() -> None:
)
def deploy(
file: str,
bucket_name: Optional[str] = None,
remote_state_bucket_name: Optional[str] = None,
debug: bool = False,
) -> None:
"""Deploys a stack based on a YAML file.
Args:
file (str): Path to the YAML file for deploy
bucket_name (str): URL of a pre-existing remote state bucket
remote_state_bucket_name (str): URL of a pre-existing remote state bucket
debug (bool): Flag to enable debug mode to view raw Terraform logging
"""
with analytics_client.EventHandler(AnalyticsEventsEnum.MLSTACKS_DEPLOY):
if not bucket_name:
if not remote_state_bucket_name:
# generate random bucket name
letters = string.ascii_lowercase + string.digits
random_bucket_suffix = "".join(
Expand All @@ -111,7 +111,7 @@ def deploy(
)
declare("Remote state successfully deployed!")
else:
deployed_bucket_url = bucket_name
deployed_bucket_url = remote_state_bucket_name
declare(f"Using '{deployed_bucket_url}' for remote state...")

# Stack deployment
Expand Down

0 comments on commit 8fd757c

Please sign in to comment.