Skip to content

Commit

Permalink
Updates from GitHub Actions Format Code workflow (#4712)
Browse files Browse the repository at this point in the history
Co-authored-by: modernisation-platform-ci <[email protected]>
  • Loading branch information
1 parent 2fdb51b commit fc96a9e
Show file tree
Hide file tree
Showing 19 changed files with 173 additions and 173 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
"configureZshAsDefaultShell": true,
},
"./features/src/base": {},
"./features/src/aws": {},
"./features/src/static-analysis": {},
"./features/src/terraform": {}
"./features/src/terraform": {},
},
"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers/features/common-utils",
"./features/src/base"
]
"./features/src/base",
],
}
26 changes: 13 additions & 13 deletions terraform/environments/cdpt-chaps/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#-----------------------------------------------------------------------------

resource "aws_db_instance" "database" {
allocated_storage = local.application_data.accounts[local.environment].db_allocated_storage
storage_type = "gp2"
engine = "sqlserver-web"
engine_version = "14.00.3381.3.v1"
instance_class = local.application_data.accounts[local.environment].db_instance_class
identifier = local.application_data.accounts[local.environment].db_instance_identifier
username = local.application_data.accounts[local.environment].db_user
password = aws_secretsmanager_secret_version.db_password.secret_string
vpc_security_group_ids = [aws_security_group.db.id]
depends_on = [aws_security_group.db]
snapshot_identifier = local.application_data.accounts[local.environment].db_snapshot_identifier
db_subnet_group_name = aws_db_subnet_group.db.id
allocated_storage = local.application_data.accounts[local.environment].db_allocated_storage
storage_type = "gp2"
engine = "sqlserver-web"
engine_version = "14.00.3381.3.v1"
instance_class = local.application_data.accounts[local.environment].db_instance_class
identifier = local.application_data.accounts[local.environment].db_instance_identifier
username = local.application_data.accounts[local.environment].db_user
password = aws_secretsmanager_secret_version.db_password.secret_string
vpc_security_group_ids = [aws_security_group.db.id]
depends_on = [aws_security_group.db]
snapshot_identifier = local.application_data.accounts[local.environment].db_snapshot_identifier
db_subnet_group_name = aws_db_subnet_group.db.id
final_snapshot_identifier = "final-snapshot-${formatdate("YYYYMMDDhhmmss", timestamp())}"
publicly_accessible = true
publicly_accessible = true
}

resource "aws_db_instance_role_association" "database" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "efs" {
provisioned_throughput_in_mibps = var.ldap_config.efs_provisioned_throughput
tags = var.tags

vpc_id = var.account_config.shared_vpc_id
vpc_id = var.account_config.shared_vpc_id
subnet_ids = var.account_config.private_subnet_ids
vpc_cidr = var.account_config.shared_vpc_cidr
vpc_cidr = var.account_config.shared_vpc_cidr
}
22 changes: 11 additions & 11 deletions terraform/environments/delius-core/modules/components/ldap/nlb.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
module "nlb" {
source = "../../nlb"

providers = {
providers = {
aws = aws
aws.bucket-replication = aws
aws.core-vpc = aws.core-vpc
aws.core-network-services = aws.core-network-services
}
app_name = var.app_name
env_name = var.env_name
internal = true
tags = var.tags
port = 389
protocol = "TCP"
subnet_ids = var.account_config.private_subnet_ids
vpc_cidr = var.account_config.shared_vpc_cidr
vpc_id = var.account_config.shared_vpc_id
zone_id = var.account_config.route53_inner_zone_info.zone_id
app_name = var.app_name
env_name = var.env_name
internal = true
tags = var.tags
port = 389
protocol = "TCP"
subnet_ids = var.account_config.private_subnet_ids
vpc_cidr = var.account_config.shared_vpc_cidr
vpc_id = var.account_config.shared_vpc_id
zone_id = var.account_config.route53_inner_zone_info.zone_id
mp_application_name = var.account_info.application_name
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module "s3_bucket_app_deployment" {

source = "github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.0.0"

bucket_prefix = "${var.app_name}-${var.env_name}-deployment-state"
bucket_prefix = "${var.app_name}-${var.env_name}-deployment-state"
versioning_enabled = true

providers = {
Expand Down
2 changes: 1 addition & 1 deletion terraform/environments/delius-core/modules/efs/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_efs_file_system" "this" {
}

# module for mount target
resource "aws_efs_mount_target" this {
resource "aws_efs_mount_target" "this" {
for_each = toset(var.subnet_ids)
file_system_id = aws_efs_file_system.this.id
subnet_id = each.value
Expand Down
12 changes: 6 additions & 6 deletions terraform/environments/delius-core/modules/efs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ variable "throughput_mode" {

variable "tags" {
description = "tags to add for all resources"
type = map(string)
type = map(string)
default = {
}
}

variable source_security_group_id {
variable "source_security_group_id" {
description = "sg of source"
type = string
default = null
type = string
default = null
}

variable "vpc_id" {
Expand All @@ -59,6 +59,6 @@ variable "subnet_ids" {
}

variable "vpc_cidr" {
description = "vpc cidr"
type = string
description = "vpc cidr"
type = string
}
40 changes: 20 additions & 20 deletions terraform/environments/delius-core/modules/nlb/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ variable "load_balancer_type" {
}

variable "drop_invalid_header_fields" {
type = bool
default = true
type = bool
default = true
}

variable "enable_deletion_protection" {
type = bool
default = false
type = bool
default = false
}

variable "env_name" {
Expand All @@ -26,13 +26,13 @@ variable "env_name" {
}

variable "target_type" {
type = string
default = "ip"
type = string
default = "ip"
}

variable "deregistration_delay" {
type = string
default = "30"
type = string
default = "30"
}

variable "tags" {
Expand All @@ -50,31 +50,31 @@ variable "subnet_ids" {
}

variable "vpc_cidr" {
description = "vpc cidr"
type = string
description = "vpc cidr"
type = string
}

variable "port" {
description = "port"
type = number
description = "port"
type = number
}

variable "protocol" {
description = "protocol"
type = string
description = "protocol"
type = string
}

variable "mp_application_name" {
description = "mp_application_name"
type = string
description = "mp_application_name"
type = string
}

variable "zone_id" {
description = "zone_id"
type = string
description = "zone_id"
type = string
}

variable "app_name" {
description = "app_name"
type = string
description = "app_name"
type = string
}
6 changes: 3 additions & 3 deletions terraform/environments/digital-prison-reporting/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ locals {
s3_file_transfer_lambda_runtime = "java11"
s3_file_transfer_lambda_tracing = "Active"

scheduled_s3_file_transfer_retention_days = local.application_data.accounts[local.environment].scheduled_s3_file_transfer_retention_days
scheduled_s3_file_transfer_schedule = local.application_data.accounts[local.environment].scheduled_s3_file_transfer_schedule
enable_s3_file_transfer_trigger = local.application_data.accounts[local.environment].enable_s3_file_transfer_trigger
scheduled_s3_file_transfer_retention_days = local.application_data.accounts[local.environment].scheduled_s3_file_transfer_retention_days
scheduled_s3_file_transfer_schedule = local.application_data.accounts[local.environment].scheduled_s3_file_transfer_schedule
enable_s3_file_transfer_trigger = local.application_data.accounts[local.environment].enable_s3_file_transfer_trigger

s3_file_transfer_lambda_policies = [
"arn:aws:iam::${local.account_id}:policy/${local.s3_all_object_actions_policy}",
Expand Down
66 changes: 33 additions & 33 deletions terraform/environments/digital-prison-reporting/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ module "glue_hive_table_creation_job" {
)

arguments = {
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.HiveTableCreationJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.HiveTableCreationJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
"--dpr.raw.archive.s3.path" = "s3://${module.s3_raw_archive_bucket.bucket_id}"
"--dpr.structured.s3.path" = "s3://${module.s3_structured_bucket.bucket_id}"
"--dpr.curated.s3.path" = "s3://${module.s3_curated_bucket.bucket_id}"
Expand Down Expand Up @@ -289,11 +289,11 @@ module "glue_s3_file_transfer_job" {
)

arguments = {
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.S3FileTransferJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Optional) config key, when provided, the job will only transfer data belonging to config otherwise all data will be transferred"
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.S3FileTransferJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Optional) config key, when provided, the job will only transfer data belonging to config otherwise all data will be transferred"
"--dpr.file.transfer.source.bucket" = module.s3_raw_bucket.bucket_id
"--dpr.file.transfer.destination.bucket" = module.s3_raw_archive_bucket.bucket_id
"--dpr.file.transfer.retention.days" = tostring(local.scheduled_s3_file_transfer_retention_days)
Expand Down Expand Up @@ -355,16 +355,16 @@ module "glue_switch_prisons_hive_data_location_job" {
)

arguments = {
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.SwitchHiveTableJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
# "--dpr.prisons.data.switch.target.s3.path" = "(Required) s3 path to point the prisons data to"
"--dpr.prisons.database" = module.glue_prisons_database.db_name
"--dpr.contract.registryName" = module.s3_schema_registry_bucket.bucket_id
"--dpr.schema.cache.max.size" = local.hive_table_creation_job_schema_cache_max_size
"--dpr.log.level" = local.refresh_job_log_level
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.SwitchHiveTableJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
# "--dpr.prisons.data.switch.target.s3.path" = "(Required) s3 path to point the prisons data to"
"--dpr.prisons.database" = module.glue_prisons_database.db_name
"--dpr.contract.registryName" = module.s3_schema_registry_bucket.bucket_id
"--dpr.schema.cache.max.size" = local.hive_table_creation_job_schema_cache_max_size
"--dpr.log.level" = local.refresh_job_log_level
}

depends_on = [
Expand Down Expand Up @@ -416,14 +416,14 @@ module "glue_s3_data_deletion_job" {
)

arguments = {
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.S3DataDeletionJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
# "--dpr.file.deletion.buckets" = "(Required) comma separated set of s3 buckets from which to delete data from"
"--dpr.allowed.s3.file.extensions" = "*"
"--dpr.log.level" = local.refresh_job_log_level
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.S3DataDeletionJob"
"--dpr.aws.region" = local.account_region
"--dpr.config.s3.bucket" = module.s3_glue_job_bucket.bucket_id,
# "--dpr.config.key" = "(Required) config key. Will be specified at point of call in the reload step-functions"
# "--dpr.file.deletion.buckets" = "(Required) comma separated set of s3 buckets from which to delete data from"
"--dpr.allowed.s3.file.extensions" = "*"
"--dpr.log.level" = local.refresh_job_log_level
}

depends_on = [
Expand Down Expand Up @@ -471,11 +471,11 @@ module "glue_stop_glue_instance_job" {
)

arguments = {
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.StopGlueInstanceJob"
"--dpr.aws.region" = local.account_region
# "--dpr.stop.glue.instance.job.name" = "(Required) name of the glue job whose running instance is to be stopped"
"--dpr.log.level" = local.refresh_job_log_level
"--extra-jars" = local.glue_jobs_latest_jar_location
"--class" = "uk.gov.justice.digital.job.StopGlueInstanceJob"
"--dpr.aws.region" = local.account_region
# "--dpr.stop.glue.instance.job.name" = "(Required) name of the glue job whose running instance is to be stopped"
"--dpr.log.level" = local.refresh_job_log_level
}
}

Expand Down
Loading

0 comments on commit fc96a9e

Please sign in to comment.