diff --git a/terraform/environments/planetfm/locals_development.tf b/terraform/environments/planetfm/locals_development.tf index 954fd4c9d73..e0daab878fd 100644 --- a/terraform/environments/planetfm/locals_development.tf +++ b/terraform/environments/planetfm/locals_development.tf @@ -9,24 +9,25 @@ locals { # } } - # baseline_lbs = { + baseline_lbs = { - # private = { - # internal_lb = true - # enable_delete_protection = false - # loadbalancer_type = "application" - # idle_timeout = 3600 - # security_groups = ["loadbalancer"] - # subnets = module.environment.subnets["private"].ids - # enable_cross_zone_load_balancing = true - # access_logs = true #default value + private = { + internal_lb = true + enable_delete_protection = false + loadbalancer_type = "application" + idle_timeout = 3600 + security_groups = ["loadbalancer"] + subnets = module.environment.subnets["private"].ids + enable_cross_zone_load_balancing = true + access_logs = true #default value + log_schedule = "cron((0 * * * ? *)" - # instance_target_groups = {} + instance_target_groups = {} - # listeners = {} + listeners = {} - # } - # } + } + } } } diff --git a/terraform/modules/baseline/lb.tf b/terraform/modules/baseline/lb.tf index 62ea3af10f5..63fd781a9d6 100644 --- a/terraform/modules/baseline/lb.tf +++ b/terraform/modules/baseline/lb.tf @@ -110,7 +110,7 @@ module "lb" { for_each = var.lbs - source = "git::https://github.com/ministryofjustice/modernisation-platform-terraform-loadbalancer.git?ref=81a12291fee6369c22bae5e653b0a195112e45c2" + source = "git::https://github.com/ministryofjustice/modernisation-platform-terraform-loadbalancer.git?ref=d6dedc712a8575006af17eb2b182af3c6c5bfc3c" providers = { aws.bucket-replication = aws @@ -128,6 +128,7 @@ module "lb" { enable_cross_zone_load_balancing = each.value.enable_cross_zone_load_balancing dns_record_client_routing_policy = each.value.dns_record_client_routing_policy s3_versioning = each.value.s3_versioning + log_schedule = each.value.log_schedule existing_bucket_name = try(module.s3_bucket[each.value.existing_bucket_name].bucket.id, each.value.existing_bucket_name) diff --git a/terraform/modules/baseline/variables.tf b/terraform/modules/baseline/variables.tf index 487c53c3aac..292ba90cc5b 100644 --- a/terraform/modules/baseline/variables.tf +++ b/terraform/modules/baseline/variables.tf @@ -578,6 +578,7 @@ variable "lbs" { enable_cross_zone_load_balancing = optional(bool, false) # network and gateway lb types only, application lb's this is always true dns_record_client_routing_policy = optional(string, "any_availability_zone") # network load-balancer types only s3_versioning = optional(bool, true) + log_schedule = optional(string, "cron(15 1 ? * MON *)") # runs weekly on Monday at 1:15am instance_target_groups = optional(map(object({ port = optional(number) protocol = optional(string)