mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #846 from Hestia-Homes/deploy-fastapi-with-terraform
Deploy fastapi with terraform: correct environment variables and policy definition
This commit is contained in:
commit
bfde130fb4
2 changed files with 2 additions and 9 deletions
4
.github/workflows/deploy_terraform.yml
vendored
4
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -341,8 +341,8 @@ jobs:
|
|||
TF_VAR_db_host: ${{ secrets.DEV_DB_HOST }}
|
||||
TF_VAR_db_name: ${{ secrets.DEV_DB_NAME }}
|
||||
TF_VAR_db_port: ${{ secrets.DEV_DB_PORT }}
|
||||
TF_VAR_api_key: ${{ secrets.DEV_API_KEY }}
|
||||
TF_VAR_secret_key: ${{ secrets.DEV_SECRET_KEY }}
|
||||
TF_VAR_api_key: ${{ secrets.FASTAPI_API_KEY }}
|
||||
TF_VAR_secret_key: ${{ secrets.NEXTAUTH_SECRET }}
|
||||
TF_VAR_domain_name: ${{ secrets.DEV_DOMAIN_NAME }}
|
||||
TF_VAR_epc_auth_token: ${{ secrets.DEV_EPC_AUTH_TOKEN }}
|
||||
TF_VAR_google_solar_api_key: ${{ secrets.DEV_GOOGLE_SOLAR_API_KEY }}
|
||||
|
|
|
|||
|
|
@ -109,8 +109,6 @@ module "fastapi" {
|
|||
HEATING_KWH_PREDICTIONS_BUCKET = data.terraform_remote_state.shared.outputs.retrofit_heating_kwh_predictions_bucket_name
|
||||
HOTWATER_KWH_PREDICTIONS_BUCKET = data.terraform_remote_state.shared.outputs.retrofit_hotwater_kwh_predictions_bucket_name
|
||||
ENERGY_ASSESSMENTS_BUCKET = data.terraform_remote_state.shared.outputs.retrofit_energy_assessments_bucket_name
|
||||
SECRET_KEY = data.terraform_remote_state.shared.outputs.secret_key
|
||||
API_KEY = data.terraform_remote_state.shared.outputs.api_key
|
||||
|
||||
ENGINE_SQS_URL = data.terraform_remote_state.engine.outputs.ara_engine_queue_url
|
||||
CATEGORISATION_SQS_URL = data.terraform_remote_state.categorisation.outputs.categorisation_queue_url
|
||||
|
|
@ -120,11 +118,6 @@ module "fastapi" {
|
|||
############################################
|
||||
# IAM policy attachments
|
||||
############################################
|
||||
resource "aws_iam_role_policy_attachment" "fast_api_s3_read" {
|
||||
role = module.fastapi.role_name
|
||||
policy_arn = data.terraform_remote_state.shared.outputs.fast_api_s3_read_arn
|
||||
}
|
||||
|
||||
module "fastapi_sqs_policy" {
|
||||
source = "../../modules/general_iam_policy"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue