1
0
Fork 0
terraform-playground/three-web-hosts/server.tf

14 lines
455 B
HCL

resource "hcloud_server" "web-server" {
count = var.instance_count
name = "web-server-${count.index}"
image = var.os_type
server_type = var.server_type
location = var.location
labels = {
type = "web"
}
ssh_keys = [hcloud_ssh_key.default.id]
user_data = templatefile("user-data.yaml.tpl",
{ssh_pubkey = file("../ssh-terraform-hetzner.pub")})
firewall_ids = [hcloud_firewall.single-firewall.id]
}