File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
terraform {
2
2
required_providers {
3
3
google = {
4
- source = " hashicorp/google"
5
- version = " 3.5.0"
4
+ source = " hashicorp/google"
6
5
}
7
6
}
8
7
}
@@ -50,3 +49,21 @@ resource "google_compute_address" "mithril-external-address" {
50
49
name = " ${ local . environment_name } -ip"
51
50
}
52
51
52
+ resource "google_compute_resource_policy" "policy" {
53
+ name = " ${ local . environment_name } -policy"
54
+ region = var. google_region
55
+ snapshot_schedule_policy {
56
+ schedule {
57
+ daily_schedule {
58
+ days_in_cycle = 1
59
+ start_time = " 04:00"
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ resource "google_compute_disk_resource_policy_attachment" "attachment" {
66
+ name = google_compute_resource_policy. policy . name
67
+ disk = google_compute_instance. vm_instance . name
68
+ zone = var. google_zone
69
+ }
You can’t perform that action at this time.
0 commit comments