diff --git a/README.md b/README.md index 52f8359..6568389 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# terraformbuttler \ No newline at end of file +# Terrabuttler \ No newline at end of file diff --git a/main.py b/main.py index ec7890f..106d117 100755 --- a/main.py +++ b/main.py @@ -7,23 +7,23 @@ import click from colorama import Fore from os import path -from app.env import ( +from terrabuttler.env import ( create_env, delete_env, get_current_env, set_current_env, get_available_envs ) -from app.tf import ( +from terrabuttler.tf import ( terraform_args_print, terraform_command_runner ) -from app.settings import ( +from terrabuttler.settings import ( check_settings, get_settings, validate_settings ) -from app.inception import ( +from terrabuttler.inception import ( inception_init, inception_init_needed ) diff --git a/app/env.py b/terrabuttler/env.py similarity index 95% rename from app/env.py rename to terrabuttler/env.py index 13d76b9..d59783d 100644 --- a/app/env.py +++ b/terrabuttler/env.py @@ -1,5 +1,5 @@ -from app.settings import get_settings -from app.tf import terraform_init_all_sites +from terrabuttler.settings import get_settings +from terrabuttler.tf import terraform_init_all_sites from click import confirm from colorama import Fore import boto3 @@ -16,9 +16,9 @@ def create_env(env, confirmation, temporary, apply, s3): - from app.settings import write_settings - from app.tf import terraform_apply_all_sites - from app.variables import generate_var_files + from terrabuttler.settings import write_settings + from terrabuttler.tf import terraform_apply_all_sites + from terrabuttler.variables import generate_var_files available_envs = get_available_envs(s3) if env in available_envs: @@ -52,7 +52,7 @@ def create_env(env, confirmation, temporary, apply, s3): def delete_env(env, confirmation, destroy, s3): - from app.tf import terraform_destroy_all_sites + from terrabuttler.tf import terraform_destroy_all_sites available_envs = get_available_envs(s3) current_env = get_current_env() org = get_settings()["general"]["organization"] diff --git a/app/inception.py b/terrabuttler/inception.py similarity index 94% rename from app/inception.py rename to terrabuttler/inception.py index 4f3dabc..0a1a505 100644 --- a/app/inception.py +++ b/terrabuttler/inception.py @@ -21,8 +21,8 @@ def inception_init_needed(): def inception_init(): - from app.env import reload_direnv - from app.settings import get_settings + from terrabuttler.env import reload_direnv + from terrabuttler.settings import get_settings site_dir = path.realpath(get_settings()["locations"]["inception_dir"]) backend_dir = path.realpath(get_settings()["locations"]["backend_dir"]) diff --git a/app/settings.py b/terrabuttler/settings.py similarity index 100% rename from app/settings.py rename to terrabuttler/settings.py diff --git a/app/tf.py b/terrabuttler/tf.py similarity index 96% rename from app/tf.py rename to terrabuttler/tf.py index c6d03e4..2f6c715 100644 --- a/app/tf.py +++ b/terrabuttler/tf.py @@ -2,7 +2,7 @@ import signal import subprocess from colorama import Fore -from app.settings import get_settings +from terrabuttler.settings import get_settings # Values from Config backend_dir = os.path.realpath(get_settings()["locations"]["backend_dir"]) @@ -45,7 +45,7 @@ def terraform_args_builder(needed_args, site, backend_dir, var_dir): """ Create array of needed arguments for backend or var files """ - from app.env import get_current_env + from terrabuttler.env import get_current_env env = get_current_env() if needed_args == "backend": @@ -83,7 +83,7 @@ def terraform_command_runner(command, args, needed_args, site): """ Run tfenv and run the terraform command """ - from app.env import get_current_env + from terrabuttler.env import get_current_env site_dir = os.path.realpath(f"site_{site}") env = get_current_env() diff --git a/app/variables.py b/terrabuttler/variables.py similarity index 98% rename from app/variables.py rename to terrabuttler/variables.py index db6ea00..48a864d 100644 --- a/app/variables.py +++ b/terrabuttler/variables.py @@ -13,7 +13,7 @@ ascii_letters, digits ) -from app.settings import get_settings +from terrabuttler.settings import get_settings REGION = get_settings()["environments"]["default"]["region"]