Change default value for allow_adoption (#317)
* Change default value for `allow_adoption` * Update docs
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user