Skip to content

Commit

Permalink
PRMP-914: Revert prod changes to disable individual user upload (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbas-khan10 authored Sep 17, 2024
1 parent c931afb commit 0dbd36b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
10 changes: 4 additions & 6 deletions infrastructure/lambda-create-doc-ref.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ module "create-doc-ref-lambda" {
aws_iam_policy.ssm_access_policy.arn,
module.ndr-app-config.app_config_policy_arn,
]
rest_api_id = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = local.is_production ? null : module.create-doc-ref-gateway.gateway_resource_id
api_execution_arn = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
is_gateway_integration_needed = local.is_production ? false : true
is_invoked_from_gateway = local.is_production ? false : true
http_methods = ["POST"]
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.create-doc-ref-gateway.gateway_resource_id
http_methods = ["POST"]
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
10 changes: 4 additions & 6 deletions infrastructure/lambda-update-upload-state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ module "update-upload-state-lambda" {
"arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy",
module.ndr-app-config.app_config_policy_arn,
]
rest_api_id = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = local.is_production ? null : module.update-upload-state-gateway.gateway_resource_id
api_execution_arn = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
is_gateway_integration_needed = local.is_production ? false : true
is_invoked_from_gateway = local.is_production ? false : true
http_methods = ["POST"]
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.update-upload-state-gateway.gateway_resource_id
http_methods = ["POST"]
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
Expand Down
10 changes: 4 additions & 6 deletions infrastructure/lambda-upload-confirm-result.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@ module "upload_confirm_result_lambda" {
module.document_reference_dynamodb_table.dynamodb_policy,
module.lloyd_george_reference_dynamodb_table.dynamodb_policy,
]
rest_api_id = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = local.is_production ? null : module.upload_confirm_result_gateway.gateway_resource_id
api_execution_arn = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
is_gateway_integration_needed = local.is_production ? false : true
is_invoked_from_gateway = local.is_production ? false : true
http_methods = ["POST"]
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.upload_confirm_result_gateway.gateway_resource_id
http_methods = ["POST"]
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
Expand Down
10 changes: 4 additions & 6 deletions infrastructure/lambda-virus-scan-result.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ module "virus_scan_result_lambda" {
module.document_reference_dynamodb_table.dynamodb_policy,
module.lloyd_george_reference_dynamodb_table.dynamodb_policy,
]
rest_api_id = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = local.is_production ? null : module.virus_scan_result_gateway.gateway_resource_id
api_execution_arn = local.is_production ? null : aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
is_gateway_integration_needed = local.is_production ? false : true
is_invoked_from_gateway = local.is_production ? false : true
http_methods = ["POST"]
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.virus_scan_result_gateway.gateway_resource_id
http_methods = ["POST"]
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
Expand Down

0 comments on commit 0dbd36b

Please sign in to comment.