xenserver / terraform-provider-xenserver

XenServer provider for Terraform
Other
19 stars 5 forks source link

CP-49364 Implement xenserver vif provider list attribute #31

Closed acefei closed 4 months ago

acefei commented 4 months ago
=== RUN   TestAccNetworkDataSource
--- PASS: TestAccNetworkDataSource (0.81s)
=== RUN   TestAccVlanResource
--- PASS: TestAccVlanResource (2.78s)
=== RUN   TestAccNICDataSource
--- PASS: TestAccNICDataSource (0.75s)
=== RUN   TestAccPifDataSource
--- PASS: TestAccPifDataSource (0.77s)
=== RUN   TestAccSnapshotResource
--- PASS: TestAccSnapshotResource (6.14s)
=== RUN   TestAccSRDataSource
--- PASS: TestAccSRDataSource (0.77s)
=== RUN   TestAccNFSResource
--- PASS: TestAccNFSResource (8.12s)
=== RUN   TestAccSRResourceLocal
--- PASS: TestAccSRResourceLocal (3.52s)
=== RUN   TestAccSRResourceShared
--- PASS: TestAccSRResourceShared (8.59s)
=== RUN   TestAccVDIResource
--- PASS: TestAccVDIResource (11.75s)
=== RUN   TestAccVMDataSource
--- PASS: TestAccVMDataSource (2.31s)
=== RUN   TestAccVMResource
--- PASS: TestAccVMResource (3.34s)
PASS
ok      terraform-provider-xenserver/xenserver  49.644s

Validator result

╷
│ Error: Invalid Attribute Value
│ 
│   with xenserver_vm.vm,
│   on main.tf line 40, in resource "xenserver_vm" "vm":
│   40:   hard_drive = [
│   41:     # {
│   42:     #   vdi_uuid = xenserver_vdi.vdi1.id,
│   43:     #   bootable = true,
│   44:     #   mode     = "RW"
│   45:     # },
│   46:     # {
│   47:     #   vdi_uuid = xenserver_vdi.vdi2.id,
│   48:     #   bootable = false,
│   49:     #   mode     = "RO"
│   50:     # },
│   51:   ]
│ 
│ Attribute hard_drive set must contain at least 1 elements, got: 0
╵
╷
│ Error: Invalid Attribute Value
│ 
│   with xenserver_vm.vm,
│   on main.tf line 53, in resource "xenserver_vm" "vm":
│   53:   network_interface = [
│   54:     # {
│   55:     #   network_uuid = data.xenserver_network.network.data_items[0].uuid,
│   56:     # },
│   57:     # {
│   58:     #   # other_config = {
│   59:     #   #   ethtool-gso = "off"
│   60:     #   # }

│   61:     #   network_uuid = data.xenserver_network.network.data_items[1].uuid,
│   62:     # },
│   63:   ]
│ 
│ Attribute network_interface set must contain at least 1 elements, got: 0
xueqingz commented 4 months ago

Could you also add the examples for vm data-source?