Terraform-IaC/template/hetzner-infra/modules/server/server.tf

19 lines
476 B
Terraform
Raw Permalink Normal View History

2023-07-09 17:05:29 +01:00
resource "hcloud_server" "server" {
name = "vm-${var.server_name}"
server_type = var.server_type
image = var.server_image
location = var.server_location
backups = var.server_backups
ssh_keys = [data.hcloud_ssh_key.ansible_provision_key.id]
labels = merge(
var.labels,
{
"Resource_Type" = "Virtual_Machine"
"Service_Type" = var.service_type
}
)
public_net {
ipv4_enabled = true
ipv6_enabled = true
}
}