diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 6432bf38..ef927ccb 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -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 }} diff --git a/infrastructure/terraform/lambda/fast-api/main.tf b/infrastructure/terraform/lambda/fast-api/main.tf index 0cfd09f7..c9058fb7 100644 --- a/infrastructure/terraform/lambda/fast-api/main.tf +++ b/infrastructure/terraform/lambda/fast-api/main.tf @@ -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"