From 74e7b8500a3b321620012dca3e48b8288fec0704 Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Sun, 7 Mar 2021 14:18:07 -0500 Subject: [PATCH] Document firewall rule import Fixes #93 --- docs/resources/firewall_rule.md | 7 +++++++ examples/resources/unifi_firewall_rule/import.sh | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 examples/resources/unifi_firewall_rule/import.sh diff --git a/docs/resources/firewall_rule.md b/docs/resources/firewall_rule.md index feb1235..6718de1 100644 --- a/docs/resources/firewall_rule.md +++ b/docs/resources/firewall_rule.md @@ -66,4 +66,11 @@ resource "unifi_firewall_rule" "drop_all" { - **id** (String) The ID of the firewall rule. +## Import +Import is supported using the following syntax: + +```shell +# import using the ID from the controller API/UI +terraform import unifi_firewall_rule.my_rule 5f7080eb6b8969064f80494f +``` diff --git a/examples/resources/unifi_firewall_rule/import.sh b/examples/resources/unifi_firewall_rule/import.sh new file mode 100644 index 0000000..5fa89e6 --- /dev/null +++ b/examples/resources/unifi_firewall_rule/import.sh @@ -0,0 +1,2 @@ +# import using the ID from the controller API/UI +terraform import unifi_firewall_rule.my_rule 5f7080eb6b8969064f80494f