-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster.tf
27 lines (26 loc) · 1.2 KB
/
cluster.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
resource "packet_device" "cluster_master" {
count = "${var.master_count}"
hostname = "${var.master_hostname}-${count.index}"
tags = "${var.master_tags}"
operating_system = "${var.packet_os_type}"
plan = "${var.master_server_type}"
facility = "${var.packet_facility}"
project_id = "${var.project_id}"
billing_cycle = "hourly"
public_ipv4_subnet_size = "${var.master_subnet_size}"
always_pxe = "false"
user_data = "${file("cloud-init")}"
}
resource "packet_device" "cluster_worker" {
count = "${var.worker_count}"
hostname = "${var.worker_hostname}-${count.index}"
tags = "${var.worker_tags}"
operating_system = "${var.packet_os_type}"
plan = "${var.worker_server_type}"
facility = "${var.packet_facility}"
project_id = "${var.project_id}"
billing_cycle = "hourly"
public_ipv4_subnet_size = "${var.worker_subnet_size}"
always_pxe = "false"
user_data = "${file("cloud-init")}"
}