Skip to content

Commit

Permalink
Updates from GitHub Actions Format Code workflow (#8772)
Browse files Browse the repository at this point in the history
Co-authored-by: modernisation-platform-ci <[email protected]>
Co-authored-by: dms1981 <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent 7c1c05e commit 82eb9d6
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 81 deletions.
72 changes: 36 additions & 36 deletions terraform/environments/corporate-information-system/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,44 +74,44 @@ resource "aws_iam_role_policy" "cis_s3fs_policy" {
Version = "2012-10-17"
Statement = [
{
"Action": [
"s3:*"
"Action" : [
"s3:*"
],
"Resource": [
"arn:aws:s3:::laa-software-bucket2",
"arn:aws:s3:::laa-software-bucket2/*",
"arn:aws:s3:::laa-software-library",
"arn:aws:s3:::laa-software-library/*",
"arn:aws:s3:::laa-cis-inbound-production",
"arn:aws:s3:::laa-cis-inbound-production/*",
"arn:aws:s3:::laa-cis-outbound-production",
"arn:aws:s3:::laa-cis-outbound-production/*",
"arn:aws:s3:::laa-ccms-outbound-production",
"arn:aws:s3:::laa-ccms-outbound-production/*",
"arn:aws:s3:::laa-ccms-inbound-production",
"arn:aws:s3:::laa-ccms-inbound-production/*"
"Resource" : [
"arn:aws:s3:::laa-software-bucket2",
"arn:aws:s3:::laa-software-bucket2/*",
"arn:aws:s3:::laa-software-library",
"arn:aws:s3:::laa-software-library/*",
"arn:aws:s3:::laa-cis-inbound-production",
"arn:aws:s3:::laa-cis-inbound-production/*",
"arn:aws:s3:::laa-cis-outbound-production",
"arn:aws:s3:::laa-cis-outbound-production/*",
"arn:aws:s3:::laa-ccms-outbound-production",
"arn:aws:s3:::laa-ccms-outbound-production/*",
"arn:aws:s3:::laa-ccms-inbound-production",
"arn:aws:s3:::laa-ccms-inbound-production/*"
],
"Effect": "Allow"
},
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:DescribeLogStreams",
"logs:PutRetentionPolicy",
"logs:PutLogEvents",
"ec2:DescribeInstances"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ec2:CreateTags"
],
"Resource": "*",
"Effect": "Allow"
}
"Effect" : "Allow"
},
{
"Action" : [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:DescribeLogStreams",
"logs:PutRetentionPolicy",
"logs:PutLogEvents",
"ec2:DescribeInstances"
],
"Resource" : "*",
"Effect" : "Allow"
},
{
"Action" : [
"ec2:CreateTags"
],
"Resource" : "*",
"Effect" : "Allow"
}
]
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@
"setup_sonatype_secrets": true,
"setup_scheduled_action_iam_role": true,
"setup_redshift_schedule": true,
"dps_domains": [
"dps-activities",
"dps-case-notes"
],
"dps_domains": ["dps-activities", "dps-case-notes"],
"alarms": {
"setup_cw_alarms": true,
"redshift": {
Expand Down Expand Up @@ -272,10 +269,7 @@
"setup_sonatype_secrets": false,
"setup_scheduled_action_iam_role": true,
"setup_redshift_schedule": true,
"dps_domains": [
"dps-activities",
"dps-case-notes"
],
"dps_domains": ["dps-activities", "dps-case-notes"],
"alarms": {
"setup_cw_alarms": true,
"redshift": {
Expand Down Expand Up @@ -452,10 +446,7 @@
"setup_scheduled_action_iam_role": true,
"setup_redshift_schedule": true,
"enable_redshift_health_check": true,
"dps_domains": [
"dps-activities",
"dps-case-notes"
],
"dps_domains": ["dps-activities", "dps-case-notes"],
"alarms": {
"setup_cw_alarms": true,
"redshift": {
Expand Down Expand Up @@ -648,10 +639,7 @@
"setup_sonatype_secrets": false,
"setup_scheduled_action_iam_role": false,
"setup_redshift_schedule": false,
"dps_domains": [
"dps-activities",
"dps-case-notes"
],
"dps_domains": ["dps-activities", "dps-case-notes"],
"alarms": {
"setup_cw_alarms": true,
"redshift": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}

template = {
source = "hashicorp/template"
source = "hashicorp/template"
version = "~> 2.2"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ variable "identifier" {
#--------------------------------------------------------------

variable "target_backup_retention_period" {
type = string
type = string
# Days
default = "30"
description = "Retention of RDS backups"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ resource "aws_s3_bucket_lifecycle_configuration" "lifecycle" {
# - Transitions objects to STANDARD_IA after 30 days (cost-effective storage for infrequent access).
# - Deletes objects after 90 days.
dynamic "transition" {
for_each = var.lifecycle_category == "short_term" ? [ { days = 30, storage_class = "STANDARD_IA" } ] : []
for_each = var.lifecycle_category == "short_term" ? [{ days = 30, storage_class = "STANDARD_IA" }] : []
content {
days = transition.value.days
storage_class = transition.value.storage_class
}
}

dynamic "expiration" {
for_each = var.lifecycle_category == "short_term" ? [ { days = 90 } ] : (
var.lifecycle_category == "temporary" ? [ { days = 30 } ] : [])
for_each = var.lifecycle_category == "short_term" ? [{ days = 90 }] : (
var.lifecycle_category == "temporary" ? [{ days = 30 }] : [])
content {
days = expiration.value.days
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/environments/edw/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ EOF
####### IAM role #######

resource "aws_iam_role" "edw_ec2_role" {
name = "${local.application_name}-ec2-instance-role"
name = "${local.application_name}-ec2-instance-role"
tags = merge(
local.tags,
{
Expand Down
6 changes: 3 additions & 3 deletions terraform/environments/electronic-monitoring-data/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ locals {
"production" = null
"preproduction" = {
"account_number" = 173142358744
"role_name" = "juniper-datatransfer-lambda-role"
"role_name" = "juniper-datatransfer-lambda-role"
}
"test" = {
"account_number" = 173142358744
"role_name" = "dev-datatransfer-lambda-role"
"role_name" = "dev-datatransfer-lambda-role"
}
"development" = {
"account_number" = 173142358744
"role_name" = "dev-datatransfer-lambda-role"
"role_name" = "dev-datatransfer-lambda-role"
}
}
}
Expand Down
28 changes: 14 additions & 14 deletions terraform/environments/ppud/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1183,20 +1183,20 @@ resource "aws_iam_policy" "iam_policy_for_lambda_cloudwatch_get_metric_data_dev"
]
},
{
"Sid" : "SQSPolicy",
"Effect" : "Allow",
"Action" : [
"sqs:ChangeMessageVisibility",
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ListQueueTags",
"sqs:ReceiveMessage",
"sqs:SendMessage"
],
"Resource" : [
"arn:aws:sqs:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:Lambda-Queue-Production"
]
"Sid" : "SQSPolicy",
"Effect" : "Allow",
"Action" : [
"sqs:ChangeMessageVisibility",
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl",
"sqs:ListQueueTags",
"sqs:ReceiveMessage",
"sqs:SendMessage"
],
"Resource" : [
"arn:aws:sqs:eu-west-2:${local.environment_management.account_ids["ppud-production"]}:Lambda-Queue-Production"
]
},
{
"Sid" : "SESPolicy",
Expand Down
12 changes: 6 additions & 6 deletions terraform/environments/tribunals/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ resource "aws_cloudfront_distribution" "tribunals_distribution" {
origin_id = "tribunalsOrigin"

custom_origin_config {
http_port = 80
https_port = 443
origin_protocol_policy = "https-only"
origin_ssl_protocols = ["TLSv1.2"]
http_port = 80
https_port = 443
origin_protocol_policy = "https-only"
origin_ssl_protocols = ["TLSv1.2"]
origin_keepalive_timeout = 60
origin_read_timeout = 60
origin_read_timeout = 60
}

custom_header {
Expand All @@ -27,7 +27,7 @@ resource "aws_cloudfront_distribution" "tribunals_distribution" {
default_cache_behavior {
target_origin_id = "tribunalsOrigin"

cache_policy_id = data.aws_cloudfront_cache_policy.caching_disabled.id
cache_policy_id = data.aws_cloudfront_cache_policy.caching_disabled.id
origin_request_policy_id = data.aws_cloudfront_origin_request_policy.all_viewer.id

viewer_protocol_policy = "redirect-to-https"
Expand Down

0 comments on commit 82eb9d6

Please sign in to comment.