diff --git a/jmeter/variables.tf b/jmeter/variables.tf index 0e3f7d0bdfd..8fb8449137f 100644 --- a/jmeter/variables.tf +++ b/jmeter/variables.tf @@ -1,6 +1,6 @@ variable "app_name" { default = null } -variable "cf_sso_passcode" { } +variable "cf_sso_passcode" {} variable "cf_space" { default = "bat-prod" } diff --git a/terraform/aks/application.tf b/terraform/aks/application.tf index 5e223351bfb..35b71266ae0 100644 --- a/terraform/aks/application.tf +++ b/terraform/aks/application.tf @@ -29,7 +29,7 @@ module "web_application" { namespace = var.namespace environment = local.app_name_suffix service_name = var.service_name - is_web = true + is_web = true docker_image = var.docker_image replicas = var.webapp_replicas max_memory = var.webapp_memory_max @@ -49,44 +49,44 @@ module "main_worker" { source = "./vendor/modules/aks//aks/application" depends_on = [module.web_application] - namespace = var.namespace - environment = local.app_name_suffix - service_name = var.service_name - name = "worker" - is_web = false - docker_image = var.docker_image - replicas = var.worker_replicas - max_memory = var.worker_memory_max - cluster_configuration_map = module.cluster_data.configuration_map - kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name - kubernetes_secret_name = module.application_configuration.kubernetes_secret_name - command = ["bundle", "exec", "sidekiq", "-c", "5", "-C", "config/sidekiq-main.yml"] - probe_command = ["pgrep", "-f", "sidekiq"] - enable_gcp_wif = true + namespace = var.namespace + environment = local.app_name_suffix + service_name = var.service_name + name = "worker" + is_web = false + docker_image = var.docker_image + replicas = var.worker_replicas + max_memory = var.worker_memory_max + cluster_configuration_map = module.cluster_data.configuration_map + kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name + kubernetes_secret_name = module.application_configuration.kubernetes_secret_name + command = ["bundle", "exec", "sidekiq", "-c", "5", "-C", "config/sidekiq-main.yml"] + probe_command = ["pgrep", "-f", "sidekiq"] + enable_gcp_wif = true enable_prometheus_monitoring = var.enable_prometheus_monitoring - enable_logit = var.enable_logit + enable_logit = var.enable_logit } module "secondary_worker" { source = "./vendor/modules/aks//aks/application" depends_on = [module.web_application] - is_web = false - namespace = var.namespace - environment = local.app_name_suffix - service_name = var.service_name - name = "secondary-worker" - docker_image = var.docker_image - replicas = var.secondary_worker_replicas - max_memory = var.secondary_worker_memory_max - cluster_configuration_map = module.cluster_data.configuration_map - kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name - kubernetes_secret_name = module.application_configuration.kubernetes_secret_name - command = ["bundle", "exec", "sidekiq", "-c", "5", "-C", "config/sidekiq-secondary.yml"] - probe_command = ["pgrep", "-f", "sidekiq"] - enable_gcp_wif = true + is_web = false + namespace = var.namespace + environment = local.app_name_suffix + service_name = var.service_name + name = "secondary-worker" + docker_image = var.docker_image + replicas = var.secondary_worker_replicas + max_memory = var.secondary_worker_memory_max + cluster_configuration_map = module.cluster_data.configuration_map + kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name + kubernetes_secret_name = module.application_configuration.kubernetes_secret_name + command = ["bundle", "exec", "sidekiq", "-c", "5", "-C", "config/sidekiq-secondary.yml"] + probe_command = ["pgrep", "-f", "sidekiq"] + enable_gcp_wif = true enable_prometheus_monitoring = var.enable_prometheus_monitoring - enable_logit = var.enable_logit + enable_logit = var.enable_logit } module "clock_worker" { diff --git a/terraform/aks/provider.tf b/terraform/aks/provider.tf index e2110dc7f70..86777c84983 100644 --- a/terraform/aks/provider.tf +++ b/terraform/aks/provider.tf @@ -10,7 +10,7 @@ terraform { version = "2.2.2" } kubernetes = { - source = "hashicorp/kubernetes" + source = "hashicorp/kubernetes" version = "2.32.0" } } diff --git a/terraform/aks/storage_account.tf b/terraform/aks/storage_account.tf index 8bfc713819f..594983cbe08 100644 --- a/terraform/aks/storage_account.tf +++ b/terraform/aks/storage_account.tf @@ -1,11 +1,11 @@ resource "azurerm_storage_account" "data_exports_sa" { - count = var.create_storage_account ? 1 : 0 - name = local.exp_storage_account_name - resource_group_name = local.app_resource_group_name - location = "UK South" - account_tier = "Standard" - account_replication_type = var.account_replication_type - allow_nested_items_to_be_public = false + count = var.create_storage_account ? 1 : 0 + name = local.exp_storage_account_name + resource_group_name = local.app_resource_group_name + location = "UK South" + account_tier = "Standard" + account_replication_type = var.account_replication_type + allow_nested_items_to_be_public = false cross_tenant_replication_enabled = false dynamic "blob_properties" { @@ -28,8 +28,8 @@ resource "azurerm_storage_account" "data_exports_sa" { } resource "azurerm_storage_container" "data_exports_container" { - count = var.create_storage_account ? 1 : 0 - name = "storage" - storage_account_name = azurerm_storage_account.data_exports_sa[count.index].name - container_access_type = "private" + count = var.create_storage_account ? 1 : 0 + name = "storage" + storage_account_name = azurerm_storage_account.data_exports_sa[count.index].name + container_access_type = "private" } diff --git a/terraform/custom_domains/environment_domains/monitoring.tf b/terraform/custom_domains/environment_domains/monitoring.tf index b5e23cab7e7..596d226533f 100644 --- a/terraform/custom_domains/environment_domains/monitoring.tf +++ b/terraform/custom_domains/environment_domains/monitoring.tf @@ -11,7 +11,7 @@ data "azurerm_monitor_action_group" "main" { } data "azurerm_cdn_frontdoor_profile" "zone" { - for_each = local.alertable_zone + for_each = local.alertable_zone name = var.hosted_zone[each.key].front_door_name resource_group_name = var.hosted_zone[each.key].resource_group_name @@ -21,7 +21,7 @@ data "azurerm_cdn_frontdoor_profile" "zone" { # aggregated over the last 5 minutes resource "azurerm_monitor_metric_alert" "fd_total_latency" { - for_each = local.alertable_zone + for_each = local.alertable_zone name = "${var.hosted_zone[each.key].front_door_name}-${var.hosted_zone[each.key].domains[0]}-latency" resource_group_name = var.hosted_zone[each.key].resource_group_name @@ -55,7 +55,7 @@ resource "azurerm_monitor_metric_alert" "fd_total_latency" { } resource "azurerm_monitor_metric_alert" "fd_percent_5xx" { - for_each = local.alertable_zone + for_each = local.alertable_zone name = "${var.hosted_zone[each.key].front_door_name}-${var.hosted_zone[each.key].domains[0]}-5xx" resource_group_name = var.hosted_zone[each.key].resource_group_name diff --git a/terraform/custom_domains/environment_domains/variables.tf b/terraform/custom_domains/environment_domains/variables.tf index e24dbf2204f..10194dd4cda 100644 --- a/terraform/custom_domains/environment_domains/variables.tf +++ b/terraform/custom_domains/environment_domains/variables.tf @@ -1,10 +1,10 @@ -variable hosted_zone { - type = map(any) +variable "hosted_zone" { + type = map(any) default = {} } variable "multiple_hosted_zones" { - type = bool + type = bool default = false } diff --git a/terraform/modules/statuscake/main.tf b/terraform/modules/statuscake/main.tf index 375fb4cdebf..c9e37ea86fa 100644 --- a/terraform/modules/statuscake/main.tf +++ b/terraform/modules/statuscake/main.tf @@ -14,14 +14,14 @@ resource "statuscake_uptime_check" "alert" { check_interval = each.value.check_rate confirmation = 2 trigger_rate = 0 - regions = [ "london", "dublin" ] + regions = ["london", "dublin"] contact_groups = each.value.contact_group http_check { follow_redirects = true timeout = 40 request_method = "HTTP" - status_codes = [ + status_codes = [ "204", "205", "206",