-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
97 lines (80 loc) · 2.45 KB
/
main.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
provider "metalcloud" {
endpoint = var.endpoint
}
data "metalcloud_volume_template" "centos76" {
volume_template_label = "centos7-6"
}
resource "metalcloud_infrastructure" "my-infra216" {
infrastructure_label = "my-terraform-infra216"
datacenter_name = var.datacenter
//remove this to actually deploy changes, otherwise all changes will remain in edit mode only.
prevent_deploy = true
network{
network_type = "san"
network_label = "san"
}
network{
network_type = "wan"
network_label = "internet"
}
network{
network_type = "lan"
network_label = "private"
}
instance_array {
instance_array_label = "exmaple-master"
instance_array_instance_count = 2
instance_array_ram_gbytes = 8
instance_array_processor_count = 1
instance_array_processor_core_count = 8
interface{
interface_index = 0
network_label = "san"
}
interface{
interface_index = 1
network_label = "internet"
}
interface{
interface_index = 2
network_label = "private"
}
drive_array{
drive_array_label = "example-master-os-drive"
drive_array_storage_type = "iscsi_hdd"
drive_size_mbytes_default = 49000
volume_template_id = tonumber(data.metalcloud_volume_template.centos76.id)
}
firewall_rule {
firewall_rule_description = "test fw rule"
firewall_rule_port_range_start = 22
firewall_rule_port_range_end = 22
firewall_rule_source_ip_address_range_start="0.0.0.0"
firewall_rule_source_ip_address_range_end="0.0.0.0"
firewall_rule_protocol="tcp"
firewall_rule_ip_address_type="ipv4"
}
}
instance_array {
instance_array_label = "example-slave"
instance_array_instance_count = 1
instance_array_ram_gbytes = 8
instance_array_processor_count = 1
instance_array_processor_core_count = 8
drive_array{
drive_array_label = "example-slave-os-drive"
drive_array_storage_type = "iscsi_hdd"
drive_size_mbytes_default = 49000
volume_template_id = tonumber(data.metalcloud_volume_template.centos76.id)
}
firewall_rule {
firewall_rule_description = "test fw rule"
firewall_rule_port_range_start = 22
firewall_rule_port_range_end = 22
firewall_rule_source_ip_address_range_start="0.0.0.0"
firewall_rule_source_ip_address_range_end="0.0.0.0"
firewall_rule_protocol="tcp"
firewall_rule_ip_address_type="ipv4"
}
}
}