Fix some issues in examples so they run

This commit is contained in:
Paul Tyng
2020-10-16 21:33:46 -04:00
parent b8e573fdf1
commit f2314ac214
13 changed files with 30 additions and 16 deletions

View File

@@ -1,3 +1,2 @@
mac,name,note,network,fixed_ip
00:00:00:00:00:00,My Device,custom note,,,
00:00:00:00:00:00,My Device,custom note,network name to lookup,10.0.3.4
mac,name,note
01:23:45:67:89:AB,My Device,custom note
1 mac,name,note,network,fixed_ip mac name note
2 00:00:00:00:00:00,My Device,custom note,,, 01:23:45:67:89:AB My Device custom note
00:00:00:00:00:00,My Device,custom note,network name to lookup,10.0.3.4

View File

@@ -11,10 +11,6 @@ resource "unifi_user" "user" {
# append an optional additional note
note = trimspace("${each.value.note}\n\nmanaged by TF")
fixed_ip = each.value.fixed_ip
# this assumes there is a unifi_network for_each with names
network_id = each.value.network != "" ? unifi_network.vlan[each.value.network].id : ""
allow_existing = true
skip_forget_on_destroy = true
}