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

Add tags support for Hetzner (#151)

This commit is contained in:
Maximilian Ehlers 2020-07-20 17:24:48 +02:00 committed by GitHub
parent e313c510c2
commit bb01111c63
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

@ -16,6 +16,7 @@ The following providers are supported:
* Docker
* Exoscale
* Google Compute Engine
* Hetzner Cloud
* [libvirt](https://github.com/dmacvicar/terraform-provider-libvirt)
* Linode
* OpenStack

@ -16,7 +16,7 @@ var nameParser *regexp.Regexp
func init() {
keyNames = []string{
"ipv4_address", // DO and SoftLayer
"ipv4_address", // DO and SoftLayer and HetznerCloud
"public_ip", // AWS
"public_ipv6", // Scaleway
"ipaddress", // CS
@ -188,7 +188,7 @@ func (r Resource) Tags() map[string]string {
t[kk] = vv
}
}
case "yandex_compute_instance":
case "yandex_compute_instance", "hcloud_server":
for k, v := range r.Attributes() {
parts := strings.SplitN(k, ".", 2)
// At some point Terraform changed the key for counts of attributes to end with ".%"