This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathBareMetal.tf
78 lines (62 loc) · 2.33 KB
/
BareMetal.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
provider "packet" {
auth_token = "${var.packet_auth_token}"
}
resource "packet_device" "controller" {
hostname = "controller"
tags = ["openstack-${random_id.cloud.hex}"]
operating_system = "ubuntu_16_04"
plan = "${var.packet_controller_type}"
connection {
user = "root"
private_key = "${file("${var.cloud_ssh_key_path}")}"
}
user_data = "#cloud-config\n\nssh_authorized_keys:\n - \"${file("${var.cloud_ssh_public_key_path}")}\""
facility = "${var.packet_facility}"
project_id = "${var.packet_project_id}"
billing_cycle = "hourly"
public_ipv4_subnet_size = "29"
}
resource "packet_device" "dashboard" {
hostname = "dashboard"
tags = ["openstack-${random_id.cloud.hex} "]
operating_system = "ubuntu_16_04"
plan = "${var.packet_dashboard_type}"
connection {
user = "root"
private_key = "${file("${var.cloud_ssh_key_path}")}"
}
user_data = "#cloud-config\n\nssh_authorized_keys:\n - \"${file("${var.cloud_ssh_public_key_path}")}\""
facility = "${var.packet_facility}"
project_id = "${var.packet_project_id}"
billing_cycle = "hourly"
}
resource "packet_device" "compute-x86" {
hostname = "${format("compute-x86-%02d", count.index)}"
tags = ["openstack-${random_id.cloud.hex} "]
count = "${var.openstack_compute-x86_count}"
operating_system = "ubuntu_16_04"
plan = "${var.packet_compute-x86_type}"
connection {
user = "root"
private_key = "${file("${var.cloud_ssh_key_path}")}"
}
user_data = "#cloud-config\n\nssh_authorized_keys:\n - \"${file("${var.cloud_ssh_public_key_path}")}\""
facility = "${var.packet_facility}"
project_id = "${var.packet_project_id}"
billing_cycle = "hourly"
}
resource "packet_device" "compute-arm" {
hostname = "${format("compute-arm-%02d", count.index)}"
tags = ["openstack-${random_id.cloud.hex} "]
count = "${var.openstack_compute-arm_count}"
operating_system = "ubuntu_16_04"
plan = "${var.packet_compute-arm_type}"
connection {
user = "root"
private_key = "${file("${var.cloud_ssh_key_path}")}"
}
user_data = "#cloud-config\n\nssh_authorized_keys:\n - \"${file("${var.cloud_ssh_public_key_path}")}\""
facility = "${var.packet_facility}"
project_id = "${var.packet_project_id}"
billing_cycle = "hourly"
}