-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow using id or name for unifi_network data source
Add sample and update docs along implements #174
- Loading branch information
Showing
4 changed files
with
97 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#retrieve network data by unifi network name | ||
data "unifi_network" "lan_network" { | ||
name = "LAN" | ||
} | ||
|
||
#retrieve network data from user record | ||
data "unifi_user" "my_device" { | ||
mac = "01:23:45:67:89:ab" | ||
} | ||
data "unifi_network" "my_network" { | ||
id = data.unifi_user.my_device.network_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters