Skip to content

Commit 4652855

Browse files
authored
Feature gap: Add guestFlush to Snapshot (#15813)
Signed-off-by: Cezary Sobczak <[email protected]>
1 parent f556e7e commit 4652855

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

mmv1/products/compute/Snapshot.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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: |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
}

0 commit comments

Comments
 (0)