File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
templates/terraform/examples Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ examples:
6969 vars :
7070 snapshot_name : ' my-snapshot'
7171 disk_name : ' debian-disk'
72+ - name : ' snapshot_basic_2'
73+ primary_resource_id : ' snapshot'
74+ primary_resource_name : ' fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])'
75+ min_version : ' beta'
76+ vars :
77+ snapshot_name : ' my-snapshot'
78+ disk_name : ' debian-disk'
7279 - name : ' snapshot_chainname'
7380 primary_resource_id : ' snapshot'
7481 primary_resource_name : ' fmt.Sprintf("tf-test-snapshot-chainname%s", context["random_suffix"])'
@@ -263,6 +270,12 @@ properties:
263270 update_url : ' projects/{{project}}/global/snapshots/{{name}}/setLabels'
264271 update_verb : ' POST'
265272 key_expander : ' '
273+ - name : ' guestFlush'
274+ type : Boolean
275+ description : |
276+ Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.
277+ ignore_read : true
278+ min_version : ' beta'
266279 - name : ' snapshotType'
267280 type : Enum
268281 description : |
Original file line number Diff line number Diff line change 1+ resource "google_compute_snapshot" "{{$.PrimaryResourceId}}" {
2+ provider = google-beta
3+ name = "{{index $.Vars "snapshot_name"}}"
4+ source_disk = google_compute_disk.persistent.id
5+ zone = "us-central1-a"
6+ labels = {
7+ my_label = "value"
8+ }
9+ storage_locations = ["us-central1"]
10+ guest_flush = true
11+ }
12+
13+ data "google_compute_image" "debian" {
14+ provider = google-beta
15+ family = "debian-11"
16+ project = "debian-cloud"
17+ }
18+
19+ resource "google_compute_disk" "persistent" {
20+ provider = google-beta
21+ name = "{{index $.Vars "disk_name"}}"
22+ image = data.google_compute_image.debian.self_link
23+ size = 10
24+ type = "pd-ssd"
25+ zone = "us-central1-a"
26+ }
You can’t perform that action at this time.
0 commit comments