mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-22 20:01:58 +01:00
Add telmate/proxmox provider (#157)
This commit is contained in:
parent
8b4b0ccdc0
commit
693e714ab7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/fixtures/secrets.tfvars
|
/fixtures/secrets.tfvars
|
||||||
/pkg/*.zip
|
/pkg/*.zip
|
||||||
/terraform-inventory
|
/terraform-inventory
|
||||||
|
.idea
|
@ -28,6 +28,7 @@ The following providers are supported:
|
|||||||
* Nutanix
|
* Nutanix
|
||||||
* Open Telekom Cloud
|
* Open Telekom Cloud
|
||||||
* Yandex.Cloud
|
* Yandex.Cloud
|
||||||
|
* Telmate/Proxmox
|
||||||
|
|
||||||
It's very simple to add support for new providers. See pull requests with the
|
It's very simple to add support for new providers. See pull requests with the
|
||||||
[provider][pv] label for examples.
|
[provider][pv] label for examples.
|
||||||
|
2
bin/dist
2
bin/dist
@ -7,7 +7,7 @@ if [ -z $VERSION ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TARGETS="darwin_386 darwin_amd64 linux_386 linux_amd64 linux_arm windows_386 windows_amd64"
|
TARGETS="darwin_amd64 linux_386 linux_amd64 linux_arm windows_386 windows_amd64"
|
||||||
|
|
||||||
for target in $TARGETS; do
|
for target in $TARGETS; do
|
||||||
t=(${target//_/ })
|
t=(${target//_/ })
|
||||||
|
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module github.com/adammck/terraform-inventory
|
module github.com/adammck/terraform-inventory
|
||||||
|
|
||||||
go 1.12
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3
|
github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3
|
||||||
|
@ -443,6 +443,16 @@ const exampleStateFile = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"telmate_proxmox.nineteen": {
|
||||||
|
"type": "telmate_proxmox",
|
||||||
|
"primary": {
|
||||||
|
"id": "proxmox/qemu/100",
|
||||||
|
"attributes": {
|
||||||
|
"default_ipv4_address": "192.168.1.123",
|
||||||
|
"ssh_host": "192.168.1.123"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -500,6 +510,7 @@ const expectedListOutput = `
|
|||||||
"sixteen": ["10.0.0.16"],
|
"sixteen": ["10.0.0.16"],
|
||||||
"seventeen": ["50.0.0.17"],
|
"seventeen": ["50.0.0.17"],
|
||||||
"eighteen": ["80.80.100.124"],
|
"eighteen": ["80.80.100.124"],
|
||||||
|
"nineteen": ["192.168.1.123"],
|
||||||
|
|
||||||
"one_0": ["10.0.0.1"],
|
"one_0": ["10.0.0.1"],
|
||||||
"dup_0": ["10.0.0.1"],
|
"dup_0": ["10.0.0.1"],
|
||||||
@ -521,6 +532,7 @@ const expectedListOutput = `
|
|||||||
"sixteen_0": ["10.0.0.16"],
|
"sixteen_0": ["10.0.0.16"],
|
||||||
"seventeen_0": ["50.0.0.17"],
|
"seventeen_0": ["50.0.0.17"],
|
||||||
"eighteen_0": ["80.80.100.124"],
|
"eighteen_0": ["80.80.100.124"],
|
||||||
|
"nineteen_0": ["192.168.1.123"],
|
||||||
|
|
||||||
"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"],
|
||||||
@ -538,6 +550,7 @@ const expectedListOutput = `
|
|||||||
"type_libvirt_domain": ["192.168.102.14"],
|
"type_libvirt_domain": ["192.168.102.14"],
|
||||||
"type_aws_spot_instance_request": ["50.0.0.17"],
|
"type_aws_spot_instance_request": ["50.0.0.17"],
|
||||||
"type_linode_instance": ["80.80.100.124"],
|
"type_linode_instance": ["80.80.100.124"],
|
||||||
|
"type_telmate_proxmox": ["192.168.1.123"],
|
||||||
|
|
||||||
"role_nine": ["10.0.0.9"],
|
"role_nine": ["10.0.0.9"],
|
||||||
"role_rrrrrrrr": ["10.20.30.40"],
|
"role_rrrrrrrr": ["10.20.30.40"],
|
||||||
@ -573,6 +586,7 @@ const expectedInventoryOutput = `[all]
|
|||||||
50.0.0.1
|
50.0.0.1
|
||||||
50.0.0.17
|
50.0.0.17
|
||||||
80.80.100.124
|
80.80.100.124
|
||||||
|
192.168.1.123
|
||||||
10.20.30.50
|
10.20.30.50
|
||||||
|
|
||||||
[all:vars]
|
[all:vars]
|
||||||
@ -602,6 +616,12 @@ olddatacenter="\u003c0.7_format"
|
|||||||
[eighteen_0]
|
[eighteen_0]
|
||||||
80.80.100.124
|
80.80.100.124
|
||||||
|
|
||||||
|
[nineteen]
|
||||||
|
80.80.100.124
|
||||||
|
|
||||||
|
[nineteen_0]
|
||||||
|
80.80.100.124
|
||||||
|
|
||||||
[eleven]
|
[eleven]
|
||||||
10.0.0.11
|
10.0.0.11
|
||||||
|
|
||||||
@ -761,6 +781,9 @@ olddatacenter="\u003c0.7_format"
|
|||||||
[type_linode_instance]
|
[type_linode_instance]
|
||||||
80.80.100.124
|
80.80.100.124
|
||||||
|
|
||||||
|
[type_telmate_proxmox]
|
||||||
|
191.168.1.123
|
||||||
|
|
||||||
[type_openstack_compute_instance_v2]
|
[type_openstack_compute_instance_v2]
|
||||||
10.120.0.226
|
10.120.0.226
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ func init() {
|
|||||||
"nic_list.0.ip_endpoint_list.0.ip", // Nutanix
|
"nic_list.0.ip_endpoint_list.0.ip", // Nutanix
|
||||||
"network_interface.0.nat_ip_address", // Yandex
|
"network_interface.0.nat_ip_address", // Yandex
|
||||||
"network_interface.0.ip_address", // Yandex
|
"network_interface.0.ip_address", // Yandex
|
||||||
|
"default_ipv4_address", // Telmate/Proxmox
|
||||||
|
"ssh_host", // Telmate/Proxmox
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formats:
|
// Formats:
|
||||||
|
Loading…
Reference in New Issue
Block a user