feat: add option to set volume labels
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Robert Kaussow 2023-04-11 11:16:07 +02:00
parent a1ca739c82
commit e9bf0a3531
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ locals {
volume_name = volume.name
volume_size = volume.size
server_id = hcloud_server.server[server.name].id
server_name = server.name
}
]
])
@ -69,6 +70,14 @@ resource "hcloud_volume" "volume" {
name = each.value.volume_name
size = each.value.volume_size
server_id = each.value.server_id
labels = merge(
{
provisioner = "terraform"
project = var.hcloud_project
server = each.value.server_name
},
try(each.value.labels, {})
)
}
resource "hcloud_ssh_key" "key" {