mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-22 20:01:58 +01:00
Fix vSphere provider (#84)
This commit is contained in:
parent
1728bbc3d1
commit
0a44aad0f6
@ -283,6 +283,15 @@ const exampleStateFile = `
|
|||||||
},
|
},
|
||||||
"deposed": [],
|
"deposed": [],
|
||||||
"provider": "provider.scaleway"
|
"provider": "provider.scaleway"
|
||||||
|
},
|
||||||
|
"vsphere_virtual_machine.twelve": {
|
||||||
|
"type": "vsphere_virtual_machine",
|
||||||
|
"primary": {
|
||||||
|
"id": "422cfa4a-c6bb-3405-0335-2d9b2034405f",
|
||||||
|
"attributes": {
|
||||||
|
"default_ip_address": "10.20.30.50"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,9 +312,10 @@ const expectedListOutput = `
|
|||||||
"10.0.1.1",
|
"10.0.1.1",
|
||||||
"10.120.0.226",
|
"10.120.0.226",
|
||||||
"10.2.1.5",
|
"10.2.1.5",
|
||||||
|
"10.20.30.40",
|
||||||
"192.168.0.3",
|
"192.168.0.3",
|
||||||
"50.0.0.1",
|
"50.0.0.1",
|
||||||
"10.20.30.40"
|
"10.20.30.50"
|
||||||
],
|
],
|
||||||
"vars": {
|
"vars": {
|
||||||
"datacenter": "mydc",
|
"datacenter": "mydc",
|
||||||
@ -326,6 +336,7 @@ const expectedListOutput = `
|
|||||||
"nine": ["10.0.0.9"],
|
"nine": ["10.0.0.9"],
|
||||||
"ten": ["10.0.0.10"],
|
"ten": ["10.0.0.10"],
|
||||||
"eleven": ["10.0.0.11"],
|
"eleven": ["10.0.0.11"],
|
||||||
|
"twelve": ["10.20.30.50"],
|
||||||
|
|
||||||
"one.0": ["10.0.0.1"],
|
"one.0": ["10.0.0.1"],
|
||||||
"dup.0": ["10.0.0.1"],
|
"dup.0": ["10.0.0.1"],
|
||||||
@ -340,11 +351,12 @@ const expectedListOutput = `
|
|||||||
"nine.0": ["10.0.0.9"],
|
"nine.0": ["10.0.0.9"],
|
||||||
"ten.0": ["10.0.0.10"],
|
"ten.0": ["10.0.0.10"],
|
||||||
"eleven.0": ["10.0.0.11"],
|
"eleven.0": ["10.0.0.11"],
|
||||||
|
"twelve.0": ["10.20.30.50"],
|
||||||
|
|
||||||
"type_aws_instance": ["10.0.0.1", "10.0.1.1", "50.0.0.1"],
|
"type_aws_instance": ["10.0.0.1", "10.0.1.1", "50.0.0.1"],
|
||||||
"type_digitalocean_droplet": ["192.168.0.3"],
|
"type_digitalocean_droplet": ["192.168.0.3"],
|
||||||
"type_cloudstack_instance": ["10.2.1.5"],
|
"type_cloudstack_instance": ["10.2.1.5"],
|
||||||
"type_vsphere_virtual_machine": ["10.20.30.40"],
|
"type_vsphere_virtual_machine": ["10.20.30.40", "10.20.30.50"],
|
||||||
"type_openstack_compute_instance_v2": ["10.120.0.226"],
|
"type_openstack_compute_instance_v2": ["10.120.0.226"],
|
||||||
"type_softlayer_virtual_guest": ["10.0.0.7"],
|
"type_softlayer_virtual_guest": ["10.0.0.7"],
|
||||||
"type_exoscale_compute": ["10.0.0.9"],
|
"type_exoscale_compute": ["10.0.0.9"],
|
||||||
@ -373,9 +385,10 @@ const expectedInventoryOutput = `[all]
|
|||||||
10.0.1.1
|
10.0.1.1
|
||||||
10.120.0.226
|
10.120.0.226
|
||||||
10.2.1.5
|
10.2.1.5
|
||||||
|
10.20.30.40
|
||||||
192.168.0.3
|
192.168.0.3
|
||||||
50.0.0.1
|
50.0.0.1
|
||||||
10.20.30.40
|
10.20.30.50
|
||||||
|
|
||||||
[all:vars]
|
[all:vars]
|
||||||
datacenter="mydc"
|
datacenter="mydc"
|
||||||
@ -474,6 +487,12 @@ olddatacenter="\u003c0.7_format"
|
|||||||
[three.0]
|
[three.0]
|
||||||
192.168.0.3
|
192.168.0.3
|
||||||
|
|
||||||
|
[twelve]
|
||||||
|
10.20.30.50
|
||||||
|
|
||||||
|
[twelve.0]
|
||||||
|
10.20.30.50
|
||||||
|
|
||||||
[two]
|
[two]
|
||||||
50.0.0.1
|
50.0.0.1
|
||||||
|
|
||||||
@ -511,6 +530,7 @@ olddatacenter="\u003c0.7_format"
|
|||||||
|
|
||||||
[type_vsphere_virtual_machine]
|
[type_vsphere_virtual_machine]
|
||||||
10.20.30.40
|
10.20.30.40
|
||||||
|
10.20.30.50
|
||||||
|
|
||||||
[webserver]
|
[webserver]
|
||||||
192.168.0.3
|
192.168.0.3
|
||||||
|
@ -23,6 +23,7 @@ func init() {
|
|||||||
"ipaddress", // CS
|
"ipaddress", // CS
|
||||||
"ip_address", // VMware
|
"ip_address", // VMware
|
||||||
"network_interface.0.ipv4_address", // VMware
|
"network_interface.0.ipv4_address", // VMware
|
||||||
|
"default_ip_address", // provider.vsphere v1.1.1
|
||||||
"access_ip_v4", // OpenStack
|
"access_ip_v4", // OpenStack
|
||||||
"floating_ip", // OpenStack
|
"floating_ip", // OpenStack
|
||||||
"network_interface.0.access_config.0.nat_ip", // GCE
|
"network_interface.0.access_config.0.nat_ip", // GCE
|
||||||
|
Loading…
Reference in New Issue
Block a user