File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
locals {
2
- enabled = module. this . enabled
3
- partition = join (" " , data. aws_partition . current [* ]. partition )
2
+ enabled = module. this . enabled
3
+ partition = join (" " , data. aws_partition . current [* ]. partition )
4
+ s3_bucket_access_log_name = var. s3_bucket_access_log_bucket_name != " " ? var. s3_bucket_access_log_bucket_name : " ${ module . this . id } -alb-logs-${ random_string . elb_logs_suffix . result } "
4
5
}
5
6
6
7
data "aws_partition" "current" {
@@ -1103,7 +1104,7 @@ module "elb_logs" {
1103
1104
source = " cloudposse/lb-s3-bucket/aws"
1104
1105
version = " 0.19.0"
1105
1106
enabled = var. enable_loadbalancer_logs && local. enabled && var. tier == " WebServer" && var. environment_type == " LoadBalanced" && var. loadbalancer_type != " network" && ! var. loadbalancer_is_shared ? true : false
1106
- name = " ${ module . this . id } -alb-logs- ${ random_string . elb_logs_suffix . result } "
1107
+ name = local . s3_bucket_access_log_name
1107
1108
force_destroy = var. force_destroy
1108
1109
versioning_enabled = var. s3_bucket_versioning_enabled
1109
1110
context = module. this . context
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ output "load_balancers" {
84
84
}
85
85
86
86
output "load_balancer_log_bucket" {
87
- value = var. enable_loadbalancer_logs ? " ${ module . this . id } -eb-loadbalancer-logs- ${ random_string . elb_logs_suffix . result } " : null
87
+ value = var. enable_loadbalancer_logs ? local . s3_bucket_access_log_name : null
88
88
description = " Name of bucket where Load Balancer logs are stored (if enabled)"
89
89
}
90
90
You can’t perform that action at this time.
0 commit comments