-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add resource_policy resource to compute (#1850)
Merged PR #1850.
- Loading branch information
1 parent
7c28bf7
commit eb9ecbc
Showing
6 changed files
with
239 additions
and
1 deletion.
There are no files selected for viewing
Submodule terraform-beta
updated
from d0131a to 95a4a7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
provider "google-beta" { | ||
region = "us-central1" | ||
zone = "us-central1-a" | ||
} | ||
|
||
resource "google_compute_resource_policy" "foo" { | ||
provider = "google-beta" | ||
name = "<%= ctx[:vars]['name'] %>" | ||
region = "us-central1" | ||
snapshot_schedule_policy { | ||
schedule { | ||
daily_schedule { | ||
days_in_cycle = 1 | ||
start_time = "04:00" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
provider "google-beta" { | ||
region = "us-central1" | ||
zone = "us-central1-a" | ||
} | ||
|
||
resource "google_compute_resource_policy" "bar" { | ||
provider = "google-beta" | ||
name = "<%= ctx[:vars]['name'] %>" | ||
region = "us-central1" | ||
snapshot_schedule_policy { | ||
schedule { | ||
hourly_schedule { | ||
hours_in_cycle = 20 | ||
start_time = "23:00" | ||
} | ||
} | ||
retention_policy { | ||
max_retention_days = 10 | ||
on_source_disk_delete = "KEEP_AUTO_SNAPSHOTS" | ||
} | ||
snapshot_properties { | ||
labels = { | ||
my_label = "value" | ||
} | ||
storage_locations = ["us"] | ||
guest_flush = true | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters