Skip to content

Commit 52a4ea7

Browse files
committed
refactor: remove variables for s3 bucket prefixes access logs and connection logs
1 parent a3cbc2d commit 52a4ea7

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ locals {
66
ecs_task_definition_requires_compatibilities = ["EC2"]
77

88
# ALB
9+
s3_bucket_access_logs_prefix = "alb-access-logs"
910
alb_access_logs_default_s3_configuration = var.create_s3_bucket_for_alb_logging ? {
1011
bucket = module.s3_bucket[0].bucket_id
1112
enabled = true
12-
prefix = var.s3_bucket_access_logs_prefix
13+
prefix = local.s3_bucket_access_logs_prefix
1314
} : null
15+
s3_bucket_connection_logs_prefix = "alb-connection-logs"
1416
alb_connection_logs_default_s3_configuration = var.create_s3_bucket_for_alb_logging ? {
1517
bucket = module.s3_bucket[0].bucket_id
1618
enabled = true
17-
prefix = var.s3_bucket_connection_logs_prefix
19+
prefix = local.s3_bucket_connection_logs_prefix
1820
} : null
1921

2022
alb_target_groups = {

variables.tf

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,6 @@ variable "s3_elb_service_account_arn" {
163163
default = null
164164
}
165165

166-
variable "s3_bucket_access_logs_prefix" {
167-
description = "(Optional) - Prefix for storing ALB access logs in the S3 bucket."
168-
type = string
169-
nullable = false
170-
default = "alb-access-logs"
171-
}
172-
173-
variable "s3_bucket_connection_logs_prefix" {
174-
description = "(Optional) - Prefix for storing ALB connection logs in the S3 bucket."
175-
type = string
176-
nullable = false
177-
default = "alb-connection-logs"
178-
}
179-
180166
variable "s3_bucket_tags" {
181167
description = "(Optional) Map of tags to assign to the bucket."
182168
type = map(string)

0 commit comments

Comments
 (0)