diff --git a/docs/usage.md b/docs/usage.md index 63f3e8f..0c04cd4 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -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" diff --git a/terrabutler/click.py b/terrabutler/click.py index 91b0c64..ff9f92e 100755 --- a/terrabutler/click.py +++ b/terrabutler/click.py @@ -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, @@ -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,