Skip to content

Commit 84070ba

Browse files
ujjwalranjan1msampathkumarglasnt
authored
feat(compute): create sample for Consistency Group Disk Attachment feature (#772)
* Added terraform-doc-sample for Async PD * added async replication * added parent tag * fixed the region violation comments * Create sample for Consistency Group Disk Attachment feature * moved main.tf from parent folder to disk_consistency_group_attachment folder * Delete compute/main.tf --------- Co-authored-by: Sampath Kumar <[email protected]> Co-authored-by: Katie McLaughlin <[email protected]>
1 parent 588dda6 commit 84070ba

File tree

1 file changed

+46
-0
lines changed
  • compute/disk_consistency_group_attachment

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
# [START compute_disk_consistency_group_attachment_parent_tag]
18+
19+
# [START compute_resource_policy]
20+
resource "google_compute_resource_policy" "default" {
21+
name = "test-consistency-group"
22+
region = "us-central1"
23+
disk_consistency_group_policy {
24+
enabled = true
25+
}
26+
}
27+
# [END compute_resource_policy]
28+
29+
# [START compute_disk_ssd]
30+
resource "google_compute_disk" "default" {
31+
name = "test-ssd-disk"
32+
type = "pd-ssd"
33+
zone = "us-central1-a"
34+
size = "5"
35+
}
36+
# [END compute_disk_ssd]
37+
38+
# [START compute_disk_resource_policy_attachment]
39+
resource "google_compute_disk_resource_policy_attachment" "default" {
40+
name = google_compute_resource_policy.default.name
41+
disk = google_compute_disk.default.name
42+
zone = "us-central1-a"
43+
}
44+
# [END compute_disk_resource_policy_attachment]
45+
46+
# [END compute_disk_consistency_group_attachment_parent_tag]

0 commit comments

Comments
 (0)