forked from WorksOnArm/OpenStackWorksOnArm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBareMetal.tf
More file actions
85 lines (73 loc) · 2.5 KB
/
BareMetal.tf
File metadata and controls
85 lines (73 loc) · 2.5 KB
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
78
79
80
81
82
83
84
provider "packet" {
auth_token = var.packet_auth_token
}
resource "packet_device" "controller" {
hostname = "controller"
tags = ["openstack-${random_id.cloud.hex}"]
operating_system = "ubuntu_18_04"
plan = var.packet_controller_type
connection {
host = self.access_public_ipv4
type = "ssh"
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)}\""
facilities = var.packet_facilities
project_id = var.packet_project_id
billing_cycle = "hourly"
# ip_address {
# type = "public_ipv4"
# cidr = "29"
# }
}
resource "packet_device" "dashboard" {
hostname = "dashboard"
tags = ["openstack-${random_id.cloud.hex} "]
operating_system = "ubuntu_18_04"
plan = var.packet_dashboard_type
connection {
host = self.access_public_ipv4
type = "ssh"
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)}\""
facilities = var.packet_facilities
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_18_04"
plan = var.packet_compute-x86_type
connection {
host = self.access_public_ipv4
type = "ssh"
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)}\""
facilities = var.packet_facilities
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_18_04"
plan = var.packet_compute-arm_type
connection {
host = self.access_public_ipv4
type = "ssh"
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)}\""
facilities = var.packet_facilities
project_id = var.packet_project_id
billing_cycle = "hourly"
}