1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-22 15:52:01 +01:00

Add telmate/proxmox provider (#157)

This commit is contained in:
knobik 2021-07-30 23:09:12 +02:00 committed by GitHub
parent 8b4b0ccdc0
commit 693e714ab7
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 2 deletions

1
.gitignore vendored

@ -1,3 +1,4 @@
/fixtures/secrets.tfvars
/pkg/*.zip
/terraform-inventory
.idea

@ -28,6 +28,7 @@ The following providers are supported:
* Nutanix
* Open Telekom Cloud
* Yandex.Cloud
* Telmate/Proxmox
It's very simple to add support for new providers. See pull requests with the
[provider][pv] label for examples.

@ -7,7 +7,7 @@ if [ -z $VERSION ]; then
exit 1
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
t=(${target//_/ })

2
go.mod

@ -1,6 +1,6 @@
module github.com/adammck/terraform-inventory
go 1.12
go 1.16
require (
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"],
"seventeen": ["50.0.0.17"],
"eighteen": ["80.80.100.124"],
"nineteen": ["192.168.1.123"],
"one_0": ["10.0.0.1"],
"dup_0": ["10.0.0.1"],
@ -521,6 +532,7 @@ const expectedListOutput = `
"sixteen_0": ["10.0.0.16"],
"seventeen_0": ["50.0.0.17"],
"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_digitalocean_droplet": ["192.168.0.3"],
@ -538,6 +550,7 @@ const expectedListOutput = `
"type_libvirt_domain": ["192.168.102.14"],
"type_aws_spot_instance_request": ["50.0.0.17"],
"type_linode_instance": ["80.80.100.124"],
"type_telmate_proxmox": ["192.168.1.123"],
"role_nine": ["10.0.0.9"],
"role_rrrrrrrr": ["10.20.30.40"],
@ -573,6 +586,7 @@ const expectedInventoryOutput = `[all]
50.0.0.1
50.0.0.17
80.80.100.124
192.168.1.123
10.20.30.50
[all:vars]
@ -602,6 +616,12 @@ olddatacenter="\u003c0.7_format"
[eighteen_0]
80.80.100.124
[nineteen]
80.80.100.124
[nineteen_0]
80.80.100.124
[eleven]
10.0.0.11
@ -761,6 +781,9 @@ olddatacenter="\u003c0.7_format"
[type_linode_instance]
80.80.100.124
[type_telmate_proxmox]
191.168.1.123
[type_openstack_compute_instance_v2]
10.120.0.226

@ -38,6 +38,8 @@ func init() {
"nic_list.0.ip_endpoint_list.0.ip", // Nutanix
"network_interface.0.nat_ip_address", // Yandex
"network_interface.0.ip_address", // Yandex
"default_ipv4_address", // Telmate/Proxmox
"ssh_host", // Telmate/Proxmox
}
// Formats: