Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions azure/azure-pr-teardown-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: 'AWS-ECS'
vmImage: 'ubuntu-latest'
steps:
- checkout: self
- checkout: git://NHSDigital/immunisation-fhir-api@master

- bash: |
echo $(action_pr_number)
Expand Down Expand Up @@ -51,4 +51,4 @@ jobs:
terraform workspace select $(WORKSPACE)
make init && make destroy aws_account_no=${account_id} environment=$(WORKSPACE)
displayName: Destroy terraform PR workspace and linked resources
retryCountOnTaskFailure: 2
retryCountOnTaskFailure: 2
3 changes: 2 additions & 1 deletion terraform/ack_lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_ecr_repository" "ack_lambda_repository" {
scan_on_push = true
}
name = "${local.short_prefix}-ack-repo"
force_delete = local.is_temp
}

# Module for building and pushing Docker image to ECR
Expand Down Expand Up @@ -220,7 +221,7 @@ resource "aws_lambda_function" "ack_processor_lambda" {
}
}

reserved_concurrent_executions = startswith(local.environment, "pr-") ? -1 : 20
reserved_concurrent_executions = local.is_temp ? -1 : 20
depends_on = [
aws_cloudwatch_log_group.ack_lambda_log_group
]
Expand Down
1 change: 1 addition & 0 deletions terraform/delta.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource "aws_ecr_repository" "delta_lambda_repository" {
scan_on_push = true
}
name = "${local.prefix}-delta-lambda-repo"
force_delete = local.is_temp
}

module "delta_docker_image" {
Expand Down
1 change: 1 addition & 0 deletions terraform/ecs_batch_processor_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ resource "aws_ecr_repository" "processing_repository" {
scan_on_push = true
}
name = "${local.short_prefix}-processing-repo"
force_delete = local.is_temp
}

# Build and Push Docker Image to ECR (Reusing the existing module)
Expand Down
3 changes: 2 additions & 1 deletion terraform/file_name_processor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_ecr_repository" "file_name_processor_lambda_repository" {
scan_on_push = true
}
name = "${local.short_prefix}-filenameproc-repo"
force_delete = local.is_temp
}

# Module for building and pushing Docker image to ECR
Expand Down Expand Up @@ -295,7 +296,7 @@ resource "aws_lambda_function" "file_processor_lambda" {
}
}
kms_key_arn = data.aws_kms_key.existing_lambda_encryption_key.arn
reserved_concurrent_executions = startswith(local.environment, "pr-") ? -1 : 20
reserved_concurrent_executions = local.is_temp ? -1 : 20
depends_on = [
aws_cloudwatch_log_group.file_name_processor_log_group,
aws_iam_policy.filenameprocessor_lambda_exec_policy
Expand Down
3 changes: 2 additions & 1 deletion terraform/forwarder_lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resource "aws_ecr_repository" "forwarder_lambda_repository" {
scan_on_push = true
}
name = "${local.short_prefix}-forwarding-repo"
force_delete = local.is_temp
}

module "forwarding_docker_image" {
Expand Down Expand Up @@ -217,7 +218,7 @@ resource "aws_lambda_function" "forwarding_lambda" {
aws_cloudwatch_log_group.forwarding_lambda_log_group
]

reserved_concurrent_executions = startswith(local.environment, "pr-") ? -1 : 20
reserved_concurrent_executions = local.is_temp ? -1 : 20
}

resource "aws_lambda_event_source_mapping" "kinesis_event_source_mapping_forwarder_lambda" {
Expand Down
1 change: 1 addition & 0 deletions terraform/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resource "aws_ecr_repository" "operation_lambda_repository" {
scan_on_push = true
}
name = "${local.prefix}-operation-lambda-repo"
force_delete = local.is_temp
}

#resource "docker_image" "lambda_function_docker" {
Expand Down
1 change: 1 addition & 0 deletions terraform/mesh_processor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_ecr_repository" "mesh_file_converter_lambda_repository" {
scan_on_push = true
}
name = "${local.short_prefix}-mesh_processor-repo"
force_delete = local.is_temp
}

# Module for building and pushing Docker image to ECR
Expand Down
Loading