diff --git a/terraform/environments/corporate-information-system/iam.tf b/terraform/environments/corporate-information-system/iam.tf index aa2fdb4a3b8..4a6865831b6 100644 --- a/terraform/environments/corporate-information-system/iam.tf +++ b/terraform/environments/corporate-information-system/iam.tf @@ -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" + } ] }) } \ No newline at end of file diff --git a/terraform/environments/digital-prison-reporting/application_variables.json b/terraform/environments/digital-prison-reporting/application_variables.json index 5ef69277647..18c80c7cd78 100644 --- a/terraform/environments/digital-prison-reporting/application_variables.json +++ b/terraform/environments/digital-prison-reporting/application_variables.json @@ -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": { @@ -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": { @@ -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": { @@ -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": { diff --git a/terraform/environments/digital-prison-reporting/modules/dms_s3_v2/versions.tf b/terraform/environments/digital-prison-reporting/modules/dms_s3_v2/versions.tf index d2163a87985..bf68a137672 100644 --- a/terraform/environments/digital-prison-reporting/modules/dms_s3_v2/versions.tf +++ b/terraform/environments/digital-prison-reporting/modules/dms_s3_v2/versions.tf @@ -6,7 +6,7 @@ terraform { } template = { - source = "hashicorp/template" + source = "hashicorp/template" version = "~> 2.2" } diff --git a/terraform/environments/digital-prison-reporting/modules/domains/dms-endpoints/variables.tf b/terraform/environments/digital-prison-reporting/modules/domains/dms-endpoints/variables.tf index aa7f9023442..a2dc57b6c98 100644 --- a/terraform/environments/digital-prison-reporting/modules/domains/dms-endpoints/variables.tf +++ b/terraform/environments/digital-prison-reporting/modules/domains/dms-endpoints/variables.tf @@ -117,7 +117,7 @@ variable "identifier" { #-------------------------------------------------------------- variable "target_backup_retention_period" { - type = string + type = string # Days default = "30" description = "Retention of RDS backups" diff --git a/terraform/environments/digital-prison-reporting/modules/s3_bucket/main.tf b/terraform/environments/digital-prison-reporting/modules/s3_bucket/main.tf index 4cf22f0992a..50c941d071e 100644 --- a/terraform/environments/digital-prison-reporting/modules/s3_bucket/main.tf +++ b/terraform/environments/digital-prison-reporting/modules/s3_bucket/main.tf @@ -46,7 +46,7 @@ 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 @@ -54,8 +54,8 @@ resource "aws_s3_bucket_lifecycle_configuration" "lifecycle" { } 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 } diff --git a/terraform/environments/edw/ec2.tf b/terraform/environments/edw/ec2.tf index 73dd891836b..67aab63cb4d 100644 --- a/terraform/environments/edw/ec2.tf +++ b/terraform/environments/edw/ec2.tf @@ -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, { diff --git a/terraform/environments/electronic-monitoring-data/s3.tf b/terraform/environments/electronic-monitoring-data/s3.tf index b9d23c5236b..a35631c8a09 100644 --- a/terraform/environments/electronic-monitoring-data/s3.tf +++ b/terraform/environments/electronic-monitoring-data/s3.tf @@ -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" } } } diff --git a/terraform/environments/ppud/iam.tf b/terraform/environments/ppud/iam.tf index 15ecce0c131..cd6af3eac6f 100644 --- a/terraform/environments/ppud/iam.tf +++ b/terraform/environments/ppud/iam.tf @@ -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", diff --git a/terraform/environments/tribunals/cloudfront.tf b/terraform/environments/tribunals/cloudfront.tf index 489a37f5dc1..c81f76104f9 100644 --- a/terraform/environments/tribunals/cloudfront.tf +++ b/terraform/environments/tribunals/cloudfront.tf @@ -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 { @@ -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"