-
Notifications
You must be signed in to change notification settings - Fork 1
/
volumes.tf
55 lines (50 loc) · 1.96 KB
/
volumes.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
### Volumes needed for the sds master node
resource "aws_ebs_volume" "master_storage01" {
count = var.swarm_master_count
availability_zone = aws_instance.docker_swarm_master.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-master-storage01-%02d", count.index)
}
}
resource "aws_ebs_volume" "master_storage02" {
count = var.swarm_master_count
availability_zone = aws_instance.docker_swarm_master.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-master-storage02-%02d", count.index)
}
}
resource "aws_ebs_volume" "master_storage03" {
count = var.swarm_master_count
availability_zone = aws_instance.docker_swarm_master.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-master-storage03-%02d", count.index)
}
}
### Volumes needed for the worker nodes
resource "aws_ebs_volume" "worker_storage01" {
count = var.swarm_worker_count
availability_zone = aws_instance.docker_swarm_worker.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-worker-storage01-%02d", count.index)
}
}
resource "aws_ebs_volume" "worker_storage02" {
count = var.swarm_worker_count
availability_zone = aws_instance.docker_swarm_worker.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-worker-storage02-%02d", count.index)
}
}
resource "aws_ebs_volume" "worker_storage03" {
count = var.swarm_worker_count
availability_zone = aws_instance.docker_swarm_worker.*.availability_zone[count.index]
size = var.swarm_worker_storage_size
tags = {
Name = format("var.swarm_name-worker-storage03-%02d", count.index)
}
}