Skip to content

Commit

Permalink
Rename to Terrabuttler
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelNdeCarvalho committed May 9, 2022
1 parent b7c5b57 commit c9d3fc6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# terraformbuttler
# Terrabuttler
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
12 changes: 6 additions & 6 deletions app/env.py → terrabuttler/env.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions app/inception.py → terrabuttler/inception.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions app/tf.py → terrabuttler/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion app/variables.py → terrabuttler/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit c9d3fc6

Please sign in to comment.