Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions Code Formatter workflow #5101

Merged
merged 1 commit into from
Feb 19, 2024
Merged
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"integrity": "sha256:ee331ef839de0479888df2049da48aaf980be9887e5ce90937ba5273105b2032"
}
}
}
}
12 changes: 6 additions & 6 deletions terraform/environments/cdpt-chaps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ The Ministerial Correspondence Unit (MCU) receives correspondence from MP on beh

### **Service URLs:**

Prod: https://correspondence-handling-and-processing.service.justice.gov.uk/
Staging: https://cdpt-chaps.hq-preproduction.modernisation-platform.service.justice.gov.uk/
Dev: https://cdpt-chaps.hq-development.modernisation-platform.service.justice.gov.uk/
Prod: <https://correspondence-handling-and-processing.service.justice.gov.uk/>
Staging: <https://cdpt-chaps.hq-preproduction.modernisation-platform.service.justice.gov.uk/>
Dev: <https://cdpt-chaps.hq-development.modernisation-platform.service.justice.gov.uk/>

### **Incident response hours:**

Office Hours, usually 9am - 6pm Monday to Friday

### **Incident contact details:**

Email: [email protected] Slack: #cdpt-chaps
Email: <[email protected]> Slack: #cdpt-chaps

### **Service team contact:**

Email: [email protected] Slack: #cdpt-chaps
Email: <[email protected]> Slack: #cdpt-chaps

### **Hosting environment:**

Expand All @@ -41,4 +41,4 @@ Modernisation Platform

### **Other URLs:**

GitHub repo: https://github.com/ministryofjustice/CHAPS
GitHub repo: <https://github.com/ministryofjustice/CHAPS>
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@
}
}
}

2 changes: 1 addition & 1 deletion terraform/environments/cdpt-ifs/bastion_linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"acurtis": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7Z+QprFiensJ1Kw08i9shm5lfritcI3/71nrDu2S3H [email protected]"
}
}
}
}
38 changes: 19 additions & 19 deletions terraform/environments/cdpt-ifs/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ resource "aws_ecs_task_definition" "ifs_task_definition" {
value = "${local.application_data.accounts[local.environment].db_name}"
},
{
name = "CLIENT_ID"
name = "CLIENT_ID"
value = "${local.application_data.accounts[local.environment].client_id}"
}
]
Expand Down Expand Up @@ -309,22 +309,22 @@ resource "aws_security_group" "cluster_ec2" {
description = "controls access to the cluster ec2 instance"
vpc_id = data.aws_vpc.shared.id

ingress {
description = "allow access on HTTP from load balancer"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_groups = [aws_security_group.ifs_lb_sc.id]
}

ingress {
description = "Allow RDP ingress"
from_port = 3389
to_port = 3389
protocol = "tcp"
security_groups = [module.bastion_linux.bastion_security_group]
}
ingress {
description = "allow access on HTTP from load balancer"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_groups = [aws_security_group.ifs_lb_sc.id]
}

ingress {
description = "Allow RDP ingress"
from_port = 3389
to_port = 3389
protocol = "tcp"
security_groups = [module.bastion_linux.bastion_security_group]
}

egress {
description = "Cluster EC2 loadbalancer egress rule"
Expand All @@ -349,7 +349,7 @@ resource "aws_iam_instance_profile" "ec2_instance_profile" {
}

resource "aws_ecs_service" "ecs_service" {
depends_on = [aws_lb_listener.https_listener]
depends_on = [aws_lb_listener.https_listener]
name = var.networking[0].application
cluster = aws_ecs_cluster.ecs_cluster.id
task_definition = aws_ecs_task_definition.ifs_task_definition.arn
Expand Down Expand Up @@ -444,7 +444,7 @@ resource "aws_key_pair" "ec2-user" {
key_name = "${local.application_name}-ec2"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwVil3c3Nh/F6S1IzMFUMhykwj1SwQEXVvNghpUW5Ncm82ibJqtVccgCFW96HoHO7Bv8jt5O+TrfENlNI6yywASKEiJRDNUpBBK/UCqXQrYJ0KTvJ7FHegQjrxBOM/Lo3o3IniB2lNTe8hijBMrdaeKivWjB2YKTJxLFdUdLFjBop5uH0gL5Or6+P5/CyKmkIftn3Wazyq4Oe3mYQhB9Gr45/T8/UZCPnWWZ/p7AB3hH5jVO3BqHsB0t3YqJrbCV3Uo85xM62BBBV0AcWXNADY2f4A+6zcUX6j6BIfgAmYP3EQCZBxFq0BgxurF7xIh7CIjl4iIMQJ0sz3uoyLdh9f alistair.curtis@MJ004521"
tags = local.tags
}
}

resource "aws_security_group" "ecs_service" {
name_prefix = "ecs-service-sg-"
Expand Down
6 changes: 3 additions & 3 deletions terraform/environments/cdpt-ifs/locals.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {

domain_types = { for dvo in aws_acm_certificate.external.domain_validation_options : dvo.domain_name => {
domain_types = { for dvo in aws_acm_certificate.external.domain_validation_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
Expand All @@ -14,9 +14,9 @@ domain_types = { for dvo in aws_acm_certificate.external.domain_validation_optio
domain_type_main = [for k, v in local.domain_types : v.type if k == "modernisation-platform.service.justice.gov.uk"]
domain_type_sub = [for k, v in local.domain_types : v.type if k != "modernisation-platform.service.justice.gov.uk"]

ecr_url = "${local.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/cdpt-ifs-ecr-repo"
ecr_url = "${local.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/cdpt-ifs-ecr-repo"

user_data = base64encode(templatefile("user_data.txt", {
user_data = base64encode(templatefile("user_data.txt", {
cluster_name = "${local.application_name}-ecs-cluster"
}))

Expand Down
14 changes: 7 additions & 7 deletions terraform/environments/corporate-staff-rostering/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ data "aws_iam_policy_document" "lambda_assume_role_policy" {
}

resource "aws_iam_role" "lambda-ad-role" {
name = "LambdaFunctionADObjectCleanUp"
tags = local.tags
name = "LambdaFunctionADObjectCleanUp"
tags = local.tags

assume_role_policy = data.aws_iam_policy_document.lambda_assume_role_policy.json
}
Expand All @@ -68,12 +68,12 @@ resource "aws_iam_policy" "lambda_eventbridge_policy" {
description = "Policy allowing Lambda to be triggered by EventBridge"

policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
"Version" : "2012-10-17",
"Statement" : [
{
"Effect": "Allow",
"Action": "lambda:InvokeFunction",
"Resource": module.ad-clean-up-lambda.lambda_function_arn
"Effect" : "Allow",
"Action" : "lambda:InvokeFunction",
"Resource" : module.ad-clean-up-lambda.lambda_function_arn
}
]
})
Expand Down
10 changes: 5 additions & 5 deletions terraform/environments/corporate-staff-rostering/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ data "archive_file" "ad-cleanup-lambda" {
resource "aws_cloudwatch_event_rule" "ec2_state_change_terminated" {
name = "Ec2StateChangedTerminated"
description = "Rule to trigger Lambda on EC2 state change"

event_pattern = jsonencode({
"source": ["aws.ec2"],
"detail-type": ["EC2 Instance State-change Notification for EC2 termination event"],
"detail": {
"state": ["terminated"]
"source" : ["aws.ec2"],
"detail-type" : ["EC2 Instance State-change Notification for EC2 termination event"],
"detail" : {
"state" : ["terminated"]
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ locals {
},
{
instance-or-cloudwatch-agent-stopped = merge(module.baseline_presets.cloudwatch_metric_alarms_by_sns_topic["csr_pagerduty"].ec2_instance_or_cwagent_stopped_linux["instance-or-cloudwatch-agent-stopped"], {
threshold = "0"
threshold = "0"
evaluation_periods = "5"
datapoints_to_alarm = "2"
period = "60"
Expand All @@ -42,7 +42,7 @@ locals {
module.baseline_presets.cloudwatch_metric_alarms.ec2_cwagent_windows,
{
instance-or-cloudwatch-agent-stopped = merge(module.baseline_presets.cloudwatch_metric_alarms_by_sns_topic["csr_pagerduty"].ec2_instance_or_cwagent_stopped_windows["instance-or-cloudwatch-agent-stopped"], {
threshold = "0"
threshold = "0"
evaluation_periods = "5"
datapoints_to_alarm = "2"
period = "60"
Expand All @@ -55,7 +55,7 @@ locals {
module.baseline_presets.cloudwatch_metric_alarms_by_sns_topic["csr_pagerduty"].ec2_cwagent_windows,
{
instance-or-cloudwatch-agent-stopped = merge(module.baseline_presets.cloudwatch_metric_alarms_by_sns_topic["csr_pagerduty"].ec2_instance_or_cwagent_stopped_windows["instance-or-cloudwatch-agent-stopped"], {
threshold = "0"
threshold = "0"
evaluation_periods = "5"
datapoints_to_alarm = "2"
period = "60"
Expand Down
Loading
Loading