|
| 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