Change default value for allow_adoption (#317)

* Change default value for `allow_adoption`

* Update docs
This commit is contained in:
Joshua Spence
2023-02-28 22:19:22 +11:00
committed by GitHub
parent 5cc1679b7f
commit 2eba55a7f3
4 changed files with 3 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ resource "unifi_device" "us_24_poe" {
### Optional
- `allow_adoption` (Boolean) Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `false`.
- `allow_adoption` (Boolean) Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `true`.
- `forget_on_destroy` (Boolean) Specifies whether this resource should tell the controller to forget the device on destroy. Defaults to `true`.
- `mac` (String) The MAC address of the device. This can be specified so that the provider can take control of a device (since devices are created through adoption).
- `name` (String) The name of the device.

View File

@@ -18,7 +18,7 @@ description: |-
### Optional
- `dst_port` (String) The destination port for the forwarding.
- `enabled` (Boolean, Deprecated) Specifies whether the port forwarding rule is enabled or not. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration.
- `enabled` (Boolean, Deprecated) Specifies whether the port forwarding rule is enabled or not. Defaults to `true`. This will attribute will be removed in a future release. Instead of disabling a port forwarding rule you can remove it from your configuration.
- `fwd_ip` (String) The IPv4 address to forward traffic to.
- `fwd_port` (String) The port to forward traffic to.
- `log` (Boolean) Specifies whether to log forwarded traffic or not. Defaults to `false`.

View File

@@ -92,7 +92,7 @@ func resourceDevice() *schema.Resource {
Description: "Specifies whether this resource should tell the controller to adopt the device on create.",
Type: schema.TypeBool,
Optional: true,
Default: false,
Default: true,
},
"forget_on_destroy": {
Description: "Specifies whether this resource should tell the controller to forget the device on destroy.",

View File

@@ -208,9 +208,6 @@ func testAccDeviceConfig(mac string) string {
return fmt.Sprintf(`
resource "unifi_device" "test" {
mac = %q
allow_adoption = true
forget_on_destroy = true
}
`, mac)
}
@@ -220,9 +217,6 @@ func testAccDeviceConfig_withName(mac, name string) string {
resource "unifi_device" "test" {
mac = %q
name = %q
allow_adoption = true
forget_on_destroy = true
}
`, mac, name)
}
@@ -241,9 +235,6 @@ resource "unifi_device" "test" {
number = 2
name = "Port 2"
}
allow_adoption = true
forget_on_destroy = true
}
`, mac)
}