mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-22 15:52:01 +01:00
Fix tags for Joyent Triton (#76)
This commit is contained in:
parent
3dd8834717
commit
3093ecd497
@ -324,6 +324,7 @@ const expectedListOutput = `
|
||||
|
||||
"role_rrrrrrrr": ["10.20.30.40"],
|
||||
"role_web": ["10.0.0.1"],
|
||||
"role_test": ["10.0.0.10"],
|
||||
"webserver": ["192.168.0.3"],
|
||||
"staging": ["192.168.0.3"],
|
||||
"status_superserver": ["10.120.0.226"],
|
||||
|
@ -156,6 +156,15 @@ func (r Resource) Tags() map[string]string {
|
||||
t[vv] = ""
|
||||
}
|
||||
}
|
||||
case "triton_machine":
|
||||
for k, v := range r.Attributes() {
|
||||
parts := strings.SplitN(k, ".", 2)
|
||||
if len(parts) == 2 && parts[0] == "tags" && parts[1] != "%" {
|
||||
kk := strings.ToLower(parts[1])
|
||||
vv := strings.ToLower(v)
|
||||
t[kk] = vv
|
||||
}
|
||||
}
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user