Skip to content

Commit 2f7ae32

Browse files
committed
fix: object does not have attribute named "certificate"
1 parent 8922468 commit 2f7ae32

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,7 @@ module "alb" {
356356
for k, v in try(var.load_balancer.listeners, {}) :
357357
k => merge(
358358
{
359-
certificate = lookup(v, "certificate", null) != null ? v.certificate : null,
360-
certificate_arn = lookup(v, "certificate_arn", null) != null ? v.certificate_arn : null,
361-
},
362-
{
363-
certificate_arn = lookup(local.acm_certificates_arns, v.certificate, null) != null ? local.acm_certificates_arns[v.certificate] : v.certificate_arn
359+
certificate_arn = lookup(local.acm_certificates_arns, try(v.certificate, ""), null) != null ? local.acm_certificates_arns[try(v.certificate, null)] : v.certificate_arn
364360
},
365361
v
366362
)

0 commit comments

Comments
 (0)