Skip to content

Commit

Permalink
add log schedule and redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsweetman committed Dec 13, 2023
1 parent acb66b0 commit bcb6243
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
29 changes: 15 additions & 14 deletions terraform/environments/planetfm/locals_development.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

# }
# }
}
}
}
}

3 changes: 2 additions & 1 deletion terraform/modules/baseline/lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
1 change: 1 addition & 0 deletions terraform/modules/baseline/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bcb6243

Please sign in to comment.