Skip to content

Commit

Permalink
Merge pull request #8344 from ministryofjustice/date_2024_10_21
Browse files Browse the repository at this point in the history
GitHub Actions Code Formatter workflow
  • Loading branch information
ASTRobinson authored Oct 21, 2024
2 parents 9a576be + 976173d commit f9af9df
Show file tree
Hide file tree
Showing 10 changed files with 198 additions and 198 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ module "datasync_activation_nlb_security_group" {
vpc_id = module.connected_vpc.vpc_id

egress_cidr_blocks = ["${local.environment_configuration.datasync_instance_private_ip}/32"]
egress_rules = ["http-80-tcp",]
egress_rules = ["http-80-tcp", ]

ingress_cidr_blocks = ["${data.external.external_ip.result["ip"]}/32"]
ingress_rules = ["http-80-tcp"]
ingress_rules = ["http-80-tcp"]

tags = local.tags
}
Expand All @@ -110,7 +110,7 @@ module "datasync_vpc_endpoint_security_group" {
vpc_id = module.connected_vpc.vpc_id

egress_cidr_blocks = [module.connected_vpc.vpc_cidr_block]
egress_rules = ["all-all",]
egress_rules = ["all-all", ]

ingress_with_cidr_blocks = [
{
Expand Down
2 changes: 1 addition & 1 deletion terraform/environments/apex/backups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "aws_backup_vault_policy" "apex" {

resource "aws_backup_vault" "prod_apex" {
count = local.environment == "production" ? 1 : 0
name = "${local.application_name}-production-backup-vault"
name = "${local.application_name}-production-backup-vault"
tags = merge(
local.tags,
{ "Name" = "${local.application_name}-production-backup-vault" },
Expand Down
2 changes: 1 addition & 1 deletion terraform/environments/apex/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ locals {
app_db_password_name = "APP_APEX_DBPASSWORD_TAD"
db_hostname = "db.${local.application_name}"

backup_schedule_tags = local.environment == "production" ? { "snapshot-35-day-retention" = "yes" } : null
backup_schedule_tags = local.environment == "production" ? { "snapshot-35-day-retention" = "yes" } : null
database-instance-userdata = <<EOF
#!/bin/bash
cd /tmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "aws_dms_endpoint" "dms_user_target_endpoint_db" {
certificate_arn = aws_dms_certificate.empty_oracle_wallet.certificate_arn
# Ignore subsequent replacement with a valid wallet
lifecycle {
ignore_changes = [certificate_arn]
ignore_changes = [certificate_arn]
}
depends_on = [aws_dms_certificate.empty_oracle_wallet]
}
Expand All @@ -38,7 +38,7 @@ resource "aws_dms_endpoint" "dms_audit_target_endpoint_db" {
certificate_arn = aws_dms_certificate.empty_oracle_wallet.certificate_arn
# Ignore subsequent replacement with a valid wallet
lifecycle {
ignore_changes = [certificate_arn]
ignore_changes = [certificate_arn]
}
depends_on = [aws_dms_certificate.empty_oracle_wallet]
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "aws_security_group" "dms_s3_target_sec_group" {
to_port = 1521
protocol = "tcp"
cidr_blocks = var.vpc_cidr
}
}
egress {
from_port = 0
to_port = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,109 +176,109 @@ locals {
})
})

# No web instances built yet, not in use
# private = {
# drop_invalid_header_fields = false # https://me.sap.com/notes/0003348935
# enable_cross_zone_load_balancing = true
# enable_delete_protection = false
# idle_timeout = 3600
# internal_lb = true
# load_balancer_type = "application"
# security_groups = ["lb"]
# subnets = module.environment.subnets["private"].ids
# No web instances built yet, not in use
# private = {
# drop_invalid_header_fields = false # https://me.sap.com/notes/0003348935
# enable_cross_zone_load_balancing = true
# enable_delete_protection = false
# idle_timeout = 3600
# internal_lb = true
# load_balancer_type = "application"
# security_groups = ["lb"]
# subnets = module.environment.subnets["private"].ids

# instance_target_groups = {
# pp-onr-web-1-a = {
# port = 7777
# protocol = "HTTP"
# health_check = {
# enabled = true
# healthy_threshold = 3
# interval = 30
# matcher = "200-399"
# path = "/"
# port = 7777
# timeout = 5
# unhealthy_threshold = 5
# }
# stickiness = {
# enabled = true
# type = "lb_cookie"
# }
# attachments = [
# { ec2_instance_name = "pp-onr-web-1-a" },
# ]
# }
# }
# instance_target_groups = {
# pp-onr-web-1-a = {
# port = 7777
# protocol = "HTTP"
# health_check = {
# enabled = true
# healthy_threshold = 3
# interval = 30
# matcher = "200-399"
# path = "/"
# port = 7777
# timeout = 5
# unhealthy_threshold = 5
# }
# stickiness = {
# enabled = true
# type = "lb_cookie"
# }
# attachments = [
# { ec2_instance_name = "pp-onr-web-1-a" },
# ]
# }
# }

# listeners = {
# http = {
# port = 7777
# protocol = "HTTP"
# listeners = {
# http = {
# port = 7777
# protocol = "HTTP"

# default_action = {
# type = "fixed-response"
# fixed_response = {
# content_type = "text/plain"
# message_body = "Not implemented"
# status_code = "501"
# }
# }
# rules = {
# pp-onr-web-1-a = {
# priority = 4000
# default_action = {
# type = "fixed-response"
# fixed_response = {
# content_type = "text/plain"
# message_body = "Not implemented"
# status_code = "501"
# }
# }
# rules = {
# pp-onr-web-1-a = {
# priority = 4000

# actions = [{
# type = "forward"
# target_group_name = "pp-onr-web-1-a"
# }]
# actions = [{
# type = "forward"
# target_group_name = "pp-onr-web-1-a"
# }]

# conditions = [{
# host_header = {
# values = [
# "pp-onr-web-1-a.oasys-national-reporting.hmpps-test.modernisation-platform.service.justice.gov.uk",
# ]
# }
# }]
# }
# }
# }
# https = {
# certificate_names_or_arns = ["oasys_national_reporting_wildcard_cert"]
# port = 443
# protocol = "HTTPS"
# ssl_policy = "ELBSecurityPolicy-2016-08"
# conditions = [{
# host_header = {
# values = [
# "pp-onr-web-1-a.oasys-national-reporting.hmpps-test.modernisation-platform.service.justice.gov.uk",
# ]
# }
# }]
# }
# }
# }
# https = {
# certificate_names_or_arns = ["oasys_national_reporting_wildcard_cert"]
# port = 443
# protocol = "HTTPS"
# ssl_policy = "ELBSecurityPolicy-2016-08"

# default_action = {
# type = "fixed-response"
# fixed_response = {
# content_type = "text/plain"
# message_body = "Not implemented"
# status_code = "501"
# }
# }
# default_action = {
# type = "fixed-response"
# fixed_response = {
# content_type = "text/plain"
# message_body = "Not implemented"
# status_code = "501"
# }
# }

# rules = {
# pp-onr-web-1-a = {
# priority = 4580
# rules = {
# pp-onr-web-1-a = {
# priority = 4580

# actions = [{
# type = "forward"
# target_group_name = "pp-onr-web-1-a"
# }]
# actions = [{
# type = "forward"
# target_group_name = "pp-onr-web-1-a"
# }]

# conditions = [{
# host_header = {
# values = [
# "pp-onr-web-1-a.oasys-national-reporting.hmpps-preproduction.modernisation-platform.service.justice.gov.uk",
# ]
# }
# }]
# }
# }
# }
# }
# }
# conditions = [{
# host_header = {
# values = [
# "pp-onr-web-1-a.oasys-national-reporting.hmpps-preproduction.modernisation-platform.service.justice.gov.uk",
# ]
# }
# }]
# }
# }
# }
# }
# }
} # end of lbs

route53_zones = {
Expand Down
10 changes: 5 additions & 5 deletions terraform/environments/ppud/alb_external.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ resource "aws_lb" "PPUD-ALB" {
load_balancer_type = "application"
security_groups = [aws_security_group.PPUD-ALB.id]
subnets = [data.aws_subnet.public_subnets_b.id, data.aws_subnet.public_subnets_c.id]
# access_logs {
# bucket = aws_s3_bucket.moj-log-files-dev[0].id
# prefix = "alb-logs"
# enabled = true
# }
# access_logs {
# bucket = aws_s3_bucket.moj-log-files-dev[0].id
# prefix = "alb-logs"
# enabled = true
# }

enable_deletion_protection = true
drop_invalid_header_fields = true
Expand Down
12 changes: 6 additions & 6 deletions terraform/environments/ppud/cloudwatch_alarms_windows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-signature-update-failed" {
alarm_description = "Monitors for windows defender malware signature update failed events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareSignatureFailed = "MalwareSignatureFailed"
}
}
Expand All @@ -450,7 +450,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-state-detected" {
alarm_description = "Monitors for windows defender malware state detected events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareStateDetected = "MalwareStateDetected"
}
}
Expand All @@ -472,7 +472,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-scan-failed" {
alarm_description = "Monitors for windows defender malware scan failed events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareScanFailed = "MalwareScanFailed"
}
}
Expand All @@ -494,7 +494,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-engine-update-failed" {
alarm_description = "Monitors for windows defender malware engine update events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareEngineFailed = "MalwareEngineFailed"
}
}
Expand All @@ -516,7 +516,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-engine-out-of-date" {
alarm_description = "Monitors for windows defender malware engine out of date events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareEngineOutofDate = "MalwareEngineOutofDate"
}
}
Expand All @@ -538,7 +538,7 @@ resource "aws_cloudwatch_metric_alarm" "malware-event-behavior-detected" {
alarm_description = "Monitors for windows defender malware behavior detected events"
alarm_actions = [aws_sns_topic.cw_alerts[0].arn]
dimensions = {
Instance = each.key
Instance = each.key
MalwareBehaviorDetected = "MalwareBehaviorDetected"
}
}
Loading

0 comments on commit f9af9df

Please sign in to comment.