icenet-ai / icenet-etl

Infrastructure for storing IceNet predictions and importing them into a database
MIT License
1 stars 1 forks source link

Runthrough highlighting some hardcodes #28

Closed JimCircadian closed 1 year ago

JimCircadian commented 1 year ago

In running setup_terraform.py noticed that some hardcoding was present thanks to reliance on terraform/backends.tf for defaults on the storage account.

JimCircadian commented 1 year ago

Updated for invocation of the initial terraform state via:

./setup_terraform.py -v \
  -i [[redacted]] \
  -s [[redacted]] \
  -g [[redacted]] \
  -rg [[redacted]] \
  -sa [[accountname]] \
  -sc [[containername]]

terraform init -backend-config=backend.secrets \
  -backend-config='storage_account_name=[[accountname]]' \
  -backend-config='container_name=[[containername]]'

It doesn't really simplify things, but means that out of the box runs will work. I'll add this to the readme.

JimCircadian commented 1 year ago

Removing the use of the common module, which is hardcoding resource names and locations. The absence of global vars is intentional, and this is an antipattern for achieving the same result across modules which is now tripping up portability to another tenant.