-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvbs.tf
31 lines (27 loc) · 909 Bytes
/
vbs.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
resource "flexibleengine_vbs_backup_policy_v2" "vbs" {
name = "${var.project}-backup-policy${format("%02d", count.index+1)}"
start_time = "12:00"
status = "ON"
retain_first_backup = "N"
rentention_num = 2
frequency = 1
}
data "flexibleengine_vbs_backup_policy_v2" "policies" {
id = "${flexibleengine_vbs_backup_policy_v2.vbs.id}"
}
resource "flexibleengine_blockstorage_volume_v2" "volume" {
count = "${var.disk_size_gb > 0 ? var.instance_count : 0}"
name = "${var.project}-disk${format("%02d", count.index+1)}"
size = "${var.disk_size_gb}"
tags {
foo = "bar"
key = "value"
}
}
resource "flexibleengine_vbs_backup_v2" "backups_1" {
volume_id = "${flexibleengine_blockstorage_volume_v2.volume.id}"
name = "${var.project}-backup${format("%02d", count.index+1)}"
}
data "flexibleengine_vbs_backup_v2" "backups" {
id = "${flexibleengine_vbs_backup_v2.backups_1.id}"
}