Skip to content

Commit

Permalink
Merge pull request #98 from angulo-solido/96-add-env-reload
Browse files Browse the repository at this point in the history
Add reload subcommand to ENV
  • Loading branch information
MiguelNdeCarvalho committed Oct 26, 2022
2 parents 6e15725 + 0a9417c commit 62ce4ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Subcommands:
- `delete`: "Delete an environment"
- `list`: "List environments"
- `new`: "Create a new environment"
- `reload`: "Reload the current environment"
- `select`: "Select a environment"
- `show`: "Show the name of the current environment"

Expand Down
8 changes: 7 additions & 1 deletion terrabutler/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
)
from terrabutler.tf import (
terraform_args_print,
terraform_command_runner
terraform_command_runner,
terraform_init_all_sites
)
from terrabutler.settings import (
get_settings,
Expand Down Expand Up @@ -119,6 +120,11 @@ def env_new_cli(name, y, t, a, s3):
create_env(name, y, t, a, s3)


@env_cli.command(name="reload", help="Reload the current environment")
def env_reload_cli():
terraform_init_all_sites()


@env_cli.command(name="select", help="Select a environment")
@click.argument('NAME')
@click.option("-init", default=True,
Expand Down

0 comments on commit 62ce4ae

Please sign in to comment.