From c3c235e53c4c3bfb1a6818736c9223198bf1e21b Mon Sep 17 00:00:00 2001 From: modernisation-platform-ci Date: Mon, 16 Dec 2024 05:00:21 +0000 Subject: [PATCH] Updates from GitHub Actions Format Code workflow --- .../application_variables.json | 32 +++++++++++++-- .../environments/mojfin/mojfin-networking.tf | 40 +++++++++---------- terraform/environments/oas/ec2.tf | 8 ++-- terraform/environments/ppud/lambda.tf | 12 +++--- .../environments/tribunals/asg-shared.tf | 6 +-- .../environments/tribunals/load_balancer.tf | 4 +- .../tribunals/load_balancer_sftp.tf | 4 +- 7 files changed, 65 insertions(+), 41 deletions(-) diff --git a/terraform/environments/digital-prison-reporting/application_variables.json b/terraform/environments/digital-prison-reporting/application_variables.json index 26051fbd192..a4aae9b6b0d 100644 --- a/terraform/environments/digital-prison-reporting/application_variables.json +++ b/terraform/environments/digital-prison-reporting/application_variables.json @@ -94,7 +94,13 @@ "setup_sonatype_secrets": true, "setup_scheduled_action_iam_role": true, "setup_redshift_schedule": true, - "dps_domains": ["dps-activities", "dps-case-notes", "dps-basm", "dps-inc-reporting", "dps-csip"], + "dps_domains": [ + "dps-activities", + "dps-case-notes", + "dps-basm", + "dps-inc-reporting", + "dps-csip" + ], "alarms": { "setup_cw_alarms": true, "redshift": { @@ -270,7 +276,13 @@ "setup_sonatype_secrets": false, "setup_scheduled_action_iam_role": true, "setup_redshift_schedule": true, - "dps_domains": ["dps-activities", "dps-case-notes", "dps-basm", "dps-inc-reporting", "dps-csip"], + "dps_domains": [ + "dps-activities", + "dps-case-notes", + "dps-basm", + "dps-inc-reporting", + "dps-csip" + ], "alarms": { "setup_cw_alarms": true, "redshift": { @@ -448,7 +460,13 @@ "setup_scheduled_action_iam_role": true, "setup_redshift_schedule": true, "enable_redshift_health_check": true, - "dps_domains": ["dps-activities", "dps-case-notes", "dps-basm", "dps-inc-reporting", "dps-csip"], + "dps_domains": [ + "dps-activities", + "dps-case-notes", + "dps-basm", + "dps-inc-reporting", + "dps-csip" + ], "alarms": { "setup_cw_alarms": true, "redshift": { @@ -642,7 +660,13 @@ "setup_sonatype_secrets": false, "setup_scheduled_action_iam_role": false, "setup_redshift_schedule": false, - "dps_domains": ["dps-activities", "dps-case-notes", "dps-basm", "dps-inc-reporting", "dps-csip"], + "dps_domains": [ + "dps-activities", + "dps-case-notes", + "dps-basm", + "dps-inc-reporting", + "dps-csip" + ], "alarms": { "setup_cw_alarms": true, "redshift": { diff --git a/terraform/environments/mojfin/mojfin-networking.tf b/terraform/environments/mojfin/mojfin-networking.tf index e5d94166faf..b6db5d10889 100644 --- a/terraform/environments/mojfin/mojfin-networking.tf +++ b/terraform/environments/mojfin/mojfin-networking.tf @@ -25,11 +25,11 @@ resource "aws_security_group" "mojfin" { dynamic "ingress" { for_each = local.environment == "preproduction" ? [] : [local.cidr_ire_workspace] content { - description = "Ireland Shared Services Inbound - Workspaces etc" - from_port = 1521 - to_port = 1521 - protocol = "tcp" - cidr_blocks = [ingress.value] + description = "Ireland Shared Services Inbound - Workspaces etc" + from_port = 1521 + to_port = 1521 + protocol = "tcp" + cidr_blocks = [ingress.value] } } @@ -44,22 +44,22 @@ resource "aws_security_group" "mojfin" { dynamic "ingress" { for_each = local.environment == "preproduction" ? [] : [local.cp_vpc_cidr] content { - description = "Cloud Platform VPC Internal Traffic inbound" - from_port = 1521 - to_port = 1521 - protocol = "tcp" - cidr_blocks = [ingress.value] + description = "Cloud Platform VPC Internal Traffic inbound" + from_port = 1521 + to_port = 1521 + protocol = "tcp" + cidr_blocks = [ingress.value] } } dynamic "ingress" { for_each = local.environment == "preproduction" ? [] : [local.analytic_platform_cidr] content { - description = "Connectivity Analytic Platform (Airflow) use of Transit Gateway to MoJFin" - from_port = 1521 - to_port = 1521 - protocol = "tcp" - cidr_blocks = [ingress.value] + description = "Connectivity Analytic Platform (Airflow) use of Transit Gateway to MoJFin" + from_port = 1521 + to_port = 1521 + protocol = "tcp" + cidr_blocks = [ingress.value] } } @@ -74,11 +74,11 @@ resource "aws_security_group" "mojfin" { dynamic "ingress" { for_each = local.environment == "preproduction" ? [] : [local.lz_vpc] content { - description = "Temp rule for DBlinks, remove rule once the other DBs have been migrated to MP" - from_port = 1521 - to_port = 1521 - protocol = "tcp" - cidr_blocks = [ingress.value] + description = "Temp rule for DBlinks, remove rule once the other DBs have been migrated to MP" + from_port = 1521 + to_port = 1521 + protocol = "tcp" + cidr_blocks = [ingress.value] } } diff --git a/terraform/environments/oas/ec2.tf b/terraform/environments/oas/ec2.tf index a7b2f8da0b2..fbbbc7f0da8 100644 --- a/terraform/environments/oas/ec2.tf +++ b/terraform/environments/oas/ec2.tf @@ -142,10 +142,10 @@ resource "aws_security_group" "ec2" { cidr_blocks = [local.application_data.accounts[local.environment].inbound_cidr_lz] } ingress { - description = "SSH from the Bastion" - from_port = 22 - to_port = 22 - protocol = "tcp" + description = "SSH from the Bastion" + from_port = 22 + to_port = 22 + protocol = "tcp" security_groups = [module.bastion_linux.bastion_security_group] } diff --git a/terraform/environments/ppud/lambda.tf b/terraform/environments/ppud/lambda.tf index ab1bbda3585..82ef0bb6e61 100644 --- a/terraform/environments/ppud/lambda.tf +++ b/terraform/environments/ppud/lambda.tf @@ -410,7 +410,7 @@ resource "aws_lambda_function" "terraform_lambda_func_send_cpu_graph_dev" { reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-development"]}:code-signing-config:csc-0c7136ccff2de748f" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_dev[0].arn + target_arn = aws_sqs_queue.lambda_queue_dev[0].arn } tracing_config { mode = "Active" @@ -468,7 +468,7 @@ resource "aws_lambda_function" "terraform_lambda_func_send_cpu_graph_prod" { reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:code-signing-config:csc-0bafee04a642a41c1" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_prod[0].arn + target_arn = aws_sqs_queue.lambda_queue_prod[0].arn } tracing_config { mode = "Active" @@ -531,7 +531,7 @@ resource "aws_lambda_function" "terraform_lambda_func_ppud_email_report_prod" { reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:code-signing-config:csc-0bafee04a642a41c1" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_prod[0].arn + target_arn = aws_sqs_queue.lambda_queue_prod[0].arn } tracing_config { mode = "Active" @@ -687,7 +687,7 @@ resource "aws_lambda_function" "terraform_lambda_func_send_memory_graph_prod" { reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:code-signing-config:csc-0bafee04a642a41c1" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_prod[0].arn + target_arn = aws_sqs_queue.lambda_queue_prod[0].arn } tracing_config { mode = "Active" @@ -739,7 +739,7 @@ resource "aws_lambda_function" "terraform_lambda_func_disk_info_report_prod" { reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:code-signing-config:csc-0bafee04a642a41c1" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_prod[0].arn + target_arn = aws_sqs_queue.lambda_queue_prod[0].arn } tracing_config { mode = "Active" @@ -791,7 +791,7 @@ resource "aws_lambda_function" "terraform_lambda_func_disk_read_write_report_pro reserved_concurrent_executions = 5 # code_signing_config_arn = "arn:aws:lambda:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:code-signing-config:csc-0bafee04a642a41c1" dead_letter_config { - target_arn = aws_sqs_queue.lambda_queue_prod[0].arn + target_arn = aws_sqs_queue.lambda_queue_prod[0].arn } tracing_config { mode = "Active" diff --git a/terraform/environments/tribunals/asg-shared.tf b/terraform/environments/tribunals/asg-shared.tf index 791daf85e3b..b6eaf67cef0 100644 --- a/terraform/environments/tribunals/asg-shared.tf +++ b/terraform/environments/tribunals/asg-shared.tf @@ -264,9 +264,9 @@ resource "aws_instance" "tribunals_backup" { } tags = { - Environment = local.environment - Name = "tribunals-backup-instance" - Role = "Backup" + Environment = local.environment + Name = "tribunals-backup-instance" + Role = "Backup" } } diff --git a/terraform/environments/tribunals/load_balancer.tf b/terraform/environments/tribunals/load_balancer.tf index c235bdf2383..e8785853655 100644 --- a/terraform/environments/tribunals/load_balancer.tf +++ b/terraform/environments/tribunals/load_balancer.tf @@ -114,8 +114,8 @@ resource "aws_lb_target_group_attachment" "tribunals_target_group_attachment" { for_each = aws_lb_target_group.tribunals_target_group target_group_arn = each.value.arn # target_id points to primary ec2 instance, change "primary_instance" to "backup_instance" in order to point at backup ec2 instance - target_id = data.aws_instances.primary_instance.ids[0] - port = each.value.port + target_id = data.aws_instances.primary_instance.ids[0] + port = each.value.port } resource "aws_lb_listener" "tribunals_lb" { diff --git a/terraform/environments/tribunals/load_balancer_sftp.tf b/terraform/environments/tribunals/load_balancer_sftp.tf index 74b94b7136d..6d61d386a73 100644 --- a/terraform/environments/tribunals/load_balancer_sftp.tf +++ b/terraform/environments/tribunals/load_balancer_sftp.tf @@ -71,6 +71,6 @@ resource "aws_lb_target_group_attachment" "tribunals_target_group_attachment_sft for_each = aws_lb_target_group.tribunals_target_group_sftp target_group_arn = each.value.arn # target_id points to primary ec2 instance, change "primary_instance" to "backup_instance" in order to point at backup ec2 instance - target_id = data.aws_instances.primary_instance.ids[0] - port = each.value.port + target_id = data.aws_instances.primary_instance.ids[0] + port = each.value.port }