Skip to content

Commit

Permalink
feat(lb): add support for subnet_mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Bob Massard <[email protected]>
  • Loading branch information
tbobm committed Nov 14, 2021
1 parent ccd4c0a commit 310659a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ resource "aws_lb" "this" {
}
}

dynamic "subnet_mapping" {
for_each = lookup(local.lb, "subnet_mapping", {}) != {} ? [1] : []

content {
subnet_id = local.lb.subnet_mapping["subnet_id"]

allocation_id = lookup(local.lb.subnet_mapping, "allocation_id", "")
private_ipv4_address = lookup(local.lb.subnet_mapping, "private_ipv4_address", "")
ipv6_address = lookup(local.lb.subnet_mapping, "ipv6_address", "")
}
}

tags = lookup(local.lb, "tags", {})
}

Expand Down

0 comments on commit 310659a

Please sign in to comment.