diff --git a/docs/resources/vm.md b/docs/resources/vm.md index 0072eb6..842fb18 100644 --- a/docs/resources/vm.md +++ b/docs/resources/vm.md @@ -216,7 +216,7 @@ Required: Optional: - `attached` (Boolean) Whether the device should be attached to the VM. -- `expected_ip_cidr` (String) Whether terraform should wait until IP addresses are present on the VM's network interfaces before considering it created. This only works if guest-tools are installed in the VM. Defaults to false. +- `expected_ip_cidr` (String) Determines the IP cidr range terraform should watch for on this network interface. Resource creation is not complete until the IP address converges to the specified range. This only works if guest-tools are installed in the VM. Defaults to "", which skips IP address matching. - `mac_address` (String) The mac address of the network interface. This must be parsable by go's [net.ParseMAC function](https://golang.org/pkg/net/#ParseMAC). All mac addresses are stored in Terraform's state with [HardwareAddr's string representation](https://golang.org/pkg/net/#HardwareAddr.String) i.e. 00:00:5e:00:53:01 Read-Only: diff --git a/xoa/resource_xenorchestra_vm.go b/xoa/resource_xenorchestra_vm.go index b990c41..cae8fa1 100644 --- a/xoa/resource_xenorchestra_vm.go +++ b/xoa/resource_xenorchestra_vm.go @@ -352,10 +352,11 @@ $ xo-cli xo.getAllObjects filter='json:{"id": "cf7b5d7d-3cd5-6b7c-5025-5c935c8cd }, }, "expected_ip_cidr": &schema.Schema{ - Type: schema.TypeString, - Default: "", - Description: "Whether terraform should wait until IP addresses are present on the VM's network interfaces before considering it created. This only works if guest-tools are installed in the VM. Defaults to false.", - Optional: true, + Type: schema.TypeString, + Default: "", + Description: "Determines the IP cidr range terraform should watch for on this network interface. Resource creation is not complete until the IP address converges to the specified range. This only works if guest-tools are installed in the VM. Defaults to \"\", which skips IP address matching.", + Optional: true, + DiffSuppressFunc: suppressAttachedDiffWhenHalted, }, }, }, diff --git a/xoa/resource_xenorchestra_vm_test.go b/xoa/resource_xenorchestra_vm_test.go index 94b470a..0af101e 100644 --- a/xoa/resource_xenorchestra_vm_test.go +++ b/xoa/resource_xenorchestra_vm_test.go @@ -2108,7 +2108,7 @@ resource "xenorchestra_vm" "bar" { } func testAccVmConfig(vmName string) string { - return testAccVmConfigWithWaitForIp(vmName, "0.0.0.0/0") + return testAccVmConfigWithWaitForIp(vmName, "") } func testAccVmConfigWithWaitForIp(vmName, expectedIpCidr string) string {