Skip to content

Commit

Permalink
fix: handle null values in networks_advanced (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
alinefr authored Jun 13, 2023
1 parent 67f5022 commit 8e323b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ resource "docker_container" "default" {
dynamic "networks_advanced" {
for_each = local.networks_advanced_list == null ? [] : local.networks_advanced_list
content {
name = networks_advanced.value.name
ipv4_address = networks_advanced.value.ipv4_address
ipv6_address = networks_advanced.value.ipv6_address
aliases = networks_advanced.value.aliases
name = lookup(networks_advanced.value, "name", null)
ipv4_address = lookup(networks_advanced.value, "ipv4_address", null)
ipv6_address = lookup(networks_advanced.value, "ipv6_address", null)
aliases = lookup(networks_advanced.value, "aliases", null)
}
}

Expand Down

0 comments on commit 8e323b9

Please sign in to comment.