1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-09-25 07:50:41 +02:00

Add support for Exoscale (#70)

This commit is contained in:
Philippe Chepy 2017-07-12 05:18:20 +02:00 committed by Adam Mckaig
parent 656ee7639a
commit b089c9c175
2 changed files with 41 additions and 2 deletions

View File

@ -124,8 +124,8 @@ const exampleStateFile = `
"primary": { "primary": {
"id": "aaaaaaaa", "id": "aaaaaaaa",
"attributes": { "attributes": {
"custom_configuration_parameters.%": "1", "custom_configuration_parameters.%": "1",
"custom_configuration_parameters.role": "rrrrrrrr", "custom_configuration_parameters.role": "rrrrrrrr",
"datacenter": "dddddddd", "datacenter": "dddddddd",
"host": "hhhhhhhh", "host": "hhhhhhhh",
"id": "aaaaaaaa", "id": "aaaaaaaa",
@ -176,6 +176,40 @@ const exampleStateFile = `
"zone": "europe-west1-d" "zone": "europe-west1-d"
} }
} }
},
"exoscale_compute.nine": {
"type": "exoscale_compute",
"depends_on": [
"x",
"y"
],
"primary": {
"id": "123456789",
"attributes": {
"diskSize": "10",
"id": "123456789",
"keypair": "kp",
"name": "xyz",
"networks.#": "1",
"networks.0.%": "5",
"networks.0.default": "true",
"networks.0.ip4address": "10.0.0.9",
"networks.0.ip6address": "",
"networks.0.networkname": "guestNetworkForBasicZone",
"networks.0.type": "Shared",
"securitygroups.#": "1",
"securitygroups.0": "xyz",
"size": "zzz",
"state": "Running",
"template": "Linux CoreOS stable 1298 64-bit",
"userdata": "",
"zone": "ch-gva-2"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": ""
} }
} }
} }
@ -190,6 +224,7 @@ const expectedListOutput = `
"10.0.0.1", "10.0.0.1",
"10.0.0.7", "10.0.0.7",
"10.0.0.8", "10.0.0.8",
"10.0.0.9",
"10.0.1.1", "10.0.1.1",
"10.120.0.226", "10.120.0.226",
"10.2.1.5", "10.2.1.5",
@ -213,6 +248,7 @@ const expectedListOutput = `
"six": ["10.120.0.226"], "six": ["10.120.0.226"],
"seven": ["10.0.0.7"], "seven": ["10.0.0.7"],
"eight": ["10.0.0.8"], "eight": ["10.0.0.8"],
"nine": ["10.0.0.9"],
"one.0": ["10.0.0.1"], "one.0": ["10.0.0.1"],
"dup.0": ["10.0.0.1"], "dup.0": ["10.0.0.1"],
@ -224,6 +260,7 @@ const expectedListOutput = `
"six.0": ["10.120.0.226"], "six.0": ["10.120.0.226"],
"seven.0": ["10.0.0.7"], "seven.0": ["10.0.0.7"],
"eight.0": ["10.0.0.8"], "eight.0": ["10.0.0.8"],
"nine.0": ["10.0.0.9"],
"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"],
@ -231,6 +268,7 @@ const expectedListOutput = `
"type_vsphere_virtual_machine": ["10.20.30.40"], "type_vsphere_virtual_machine": ["10.20.30.40"],
"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_google_compute_instance": ["10.0.0.8"], "type_google_compute_instance": ["10.0.0.8"],
"role_rrrrrrrr": ["10.20.30.40"], "role_rrrrrrrr": ["10.20.30.40"],

View File

@ -28,6 +28,7 @@ func init() {
"network_interface.0.access_config.0.assigned_nat_ip", // GCE "network_interface.0.access_config.0.assigned_nat_ip", // GCE
"network_interface.0.address", // GCE "network_interface.0.address", // GCE
"ipv4_address_private", // SoftLayer "ipv4_address_private", // SoftLayer
"networks.0.ip4address", // Exoscale
} }
// type.name.0 // type.name.0