-
Notifications
You must be signed in to change notification settings - Fork 0
/
prodTA.tf
42 lines (37 loc) · 1.08 KB
/
prodTA.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
# Create ProdTASrv server
resource "openstack_compute_instance_v2" "ProdTASrv" {
name = "ProdTASrv"
flavor_id = var.flavor_id
key_pair = var.key_name
stop_before_destroy = true
# Add server to anti-affinity group
scheduler_hints {
group = openstack_compute_servergroup_v2.production-antiaffinity.id
}
# Attach fixed IP port
# Port already contains secruity groups
network {
port = "7c333fe6-1ea7-4b0e-b85e-cdc5b8d0f2e0"
}
# Attach floating IP port
# Floating ip port is associated with the fixed IP port, this should not be required
# network {
# port = "4f4737fb-1163-40c7-bc98-92720fc6ccd6""
# }
# Attach OS volume
block_device {
uuid = "9d19ad85-35b0-4b5e-b0fa-b37d50df54e6"
source_type = "volume"
destination_type = "volume"
boot_index = 0
delete_on_termination = false
}
# Attach data volume
block_device {
uuid = "c322ed18-2032-4fa3-92f9-8f3f08ec5063"
source_type = "volume"
destination_type = "volume"
delete_on_termination = false
boot_index=1
}
}