From 41120face9d26b44c664510024a3cd1fcbd9a48e Mon Sep 17 00:00:00 2001 From: Avrohom Gottlieb Date: Thu, 21 Nov 2024 16:32:27 -0500 Subject: [PATCH 1/3] change aws provider version to 4.0.0 --- infrastructure/provider.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/provider.tf b/infrastructure/provider.tf index 1e3ed619..19bde577 100644 --- a/infrastructure/provider.tf +++ b/infrastructure/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "5.12.0" + version = "4.0.0" } } From fe5260c669c2f16709677d16188cc1cc4ad9cc9b Mon Sep 17 00:00:00 2001 From: Avrohom Gottlieb Date: Thu, 21 Nov 2024 16:33:24 -0500 Subject: [PATCH 2/3] comment out batch to go around new feature usages while changing aws provider version --- infrastructure/batch.tf | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/infrastructure/batch.tf b/infrastructure/batch.tf index 79eab75c..75c0cd06 100644 --- a/infrastructure/batch.tf +++ b/infrastructure/batch.tf @@ -1,24 +1,24 @@ -module "batch" { - source = "./batch" +# module "batch" { +# source = "./batch" # networking - scpca_portal_vpc = aws_vpc.scpca_portal_vpc - scpca_portal_subnet_1a = aws_subnet.scpca_portal_1a +# scpca_portal_vpc = aws_vpc.scpca_portal_vpc +# scpca_portal_subnet_1a = aws_subnet.scpca_portal_1a # job_definition envars - dockerhub_account = var.dockerhub_account - django_secret_key = var.django_secret_key - database_password = var.database_password - region = var.region - scpca_portal_bucket = aws_s3_bucket.scpca_portal_bucket - sentry_dsn = var.sentry_dsn - postgres_db = aws_db_instance.postgres_db +# dockerhub_account = var.dockerhub_account +# django_secret_key = var.django_secret_key +# database_password = var.database_password +# region = var.region +# scpca_portal_bucket = aws_s3_bucket.scpca_portal_bucket +# sentry_dsn = var.sentry_dsn +# postgres_db = aws_db_instance.postgres_db # security - scpca_portal_db_security_group = aws_security_group.scpca_portal_db +# scpca_portal_db_security_group = aws_security_group.scpca_portal_db # general configuration - user = var.user - stage = var.stage - default_tags = var.default_tags -} +# user = var.user +# stage = var.stage +# default_tags = var.default_tags +#} From 28ee16f1262a9fee1aaa5d72313cd0ba3432fc17 Mon Sep 17 00:00:00 2001 From: Avrohom Gottlieb Date: Thu, 21 Nov 2024 16:39:29 -0500 Subject: [PATCH 3/3] comment out batch module output vars and add TODOs to uncomment later --- infrastructure/api.tf | 5 +++-- infrastructure/batch.tf | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/infrastructure/api.tf b/infrastructure/api.tf index a9395dcf..3399cc92 100644 --- a/infrastructure/api.tf +++ b/infrastructure/api.tf @@ -52,8 +52,9 @@ resource "aws_instance" "api_server_1" { database_user = aws_db_instance.postgres_db.username database_name = aws_db_instance.postgres_db.db_name database_password = var.database_password - aws_batch_job_queue_name = module.batch.job_queue_name - aws_batch_job_definition_name = module.batch.job_definition_name + # TODO: enable batch + # aws_batch_job_queue_name = module.batch.job_queue_name + # aws_batch_job_definition_name = module.batch.job_definition_name aws_region = var.region aws_s3_bucket_name = aws_s3_bucket.scpca_portal_bucket.id sentry_dsn = var.sentry_dsn diff --git a/infrastructure/batch.tf b/infrastructure/batch.tf index 75c0cd06..810d4b23 100644 --- a/infrastructure/batch.tf +++ b/infrastructure/batch.tf @@ -1,3 +1,4 @@ +# TODO: enable batch # module "batch" { # source = "./batch"