Skip to content

Commit

Permalink
Merge pull request #8384 from ministryofjustice/code_formatter_2024_1…
Browse files Browse the repository at this point in the history
…0_30_15_38

GitHub Actions Code Formatter workflow
  • Loading branch information
Khatraf authored Oct 30, 2024
2 parents 0e54046 + dd2476b commit f32e9c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions terraform/environments/cooker/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
{ "source-code" = "https://github.com/ministryofjustice/modernisation-platform" }
)

environment = "sandbox"
environment = "sandbox"
vpc_name = var.networking[0].business-unit
subnet_set = var.networking[0].set
vpc_all = "${local.vpc_name}-${local.environment}"
Expand All @@ -34,4 +34,3 @@ locals {
# example_data = local.application_data.accounts[local.environment].example_var
application_data = fileexists("./application_variables.json") ? jsondecode(file("./application_variables.json")) : {}
}

10 changes: 5 additions & 5 deletions terraform/environments/sprinkler/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ locals {

# This takes the name of the Terraform workspace (e.g. core-vpc-production), strips out the application name (e.g. core-vpc), and checks if
# the string leftover is `-production`, if it isn't (e.g. core-vpc-non-production => -non-production) then it sets the var to false.
is-production = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-production"
is-production = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-production"

is-preproduction = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-preproduction"

is-test = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-test"

is-development = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-development"
is-test = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-test"

is-development = substr(terraform.workspace, length(local.application_name), length(terraform.workspace)) == "-development"

# Merge tags from the environment json file with additional ones
tags = merge(
Expand All @@ -23,7 +23,7 @@ locals {

)

environment = "sandbox"
environment = "sandbox"
vpc_name = var.networking[0].business-unit
subnet_set = var.networking[0].set
vpc_all = "${local.vpc_name}-${local.environment}"
Expand Down
2 changes: 1 addition & 1 deletion terraform/environments/sprinkler/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data "aws_ssm_parameter" "modernisation_platform_account_id" {

# Get secret by arn for environment management
data "aws_secretsmanager_secret" "environment_management" {
provider = aws.modernisation-platform
provider = aws.modernisation-platform
name = "environment_management"
}

Expand Down

0 comments on commit f32e9c6

Please sign in to comment.