Skip to content

Commit

Permalink
Merge pull request #39 from hazelops/core-422
Browse files Browse the repository at this point in the history
CORE-422 module "alb" - added access logs to S3
  • Loading branch information
igorkotof authored Oct 28, 2022
2 parents a918b4e + 9bfe028 commit 1964f63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ module "alb" {

target_groups = concat(var.app_type == "web" ? local.target_groups_web : local.target_groups_tcp)

access_logs = var.alb_access_logs_enabled && var.alb_access_logs_s3bucket_name != "" ? {
bucket = var.alb_access_logs_s3bucket_name
} : {}

tags = {
env = var.env
Env = var.env
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -701,3 +701,14 @@ variable "ecr_force_delete" {
default = false
description = "If true, will delete the ECR repository even if it contains images."
}

variable "alb_access_logs_enabled" {
default = false
description = "If true, ALB access logs will be writing to S3"
}

variable "alb_access_logs_s3bucket_name" {
type = string
description = "S3 bucket name for ALB access logs"
default = ""
}

0 comments on commit 1964f63

Please sign in to comment.