-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compute): create sample for Disk Async Replication feature (#770)
* Added terraform-doc-sample for Async PD * added async replication * added parent tag * fixed the region violation comments --------- Co-authored-by: Katie McLaughlin <katie@glasnt.com>
- Loading branch information
1 parent
5c3b075
commit 3a28d6c
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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,51 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
# [START compute_disk_async_replication_parent_tag] | ||
# [START compute_disk_primary] | ||
resource "google_compute_disk" "primary_disk" { | ||
name = "primary-disk" | ||
type = "pd-ssd" | ||
zone = "europe-west4-a" | ||
|
||
physical_block_size_bytes = 4096 | ||
} | ||
# [END compute_disk_primary] | ||
|
||
# [START compute_disk_secondary] | ||
resource "google_compute_disk" "secondary_disk" { | ||
name = "secondary-disk" | ||
type = "pd-ssd" | ||
zone = "europe-west3-a" | ||
|
||
async_primary_disk { | ||
disk = google_compute_disk.primary_disk.id | ||
} | ||
|
||
physical_block_size_bytes = 4096 | ||
} | ||
# [END compute_disk_secondary] | ||
|
||
|
||
# [START compute_disk_async_replication] | ||
resource "google_compute_disk_async_replication" "default" { | ||
primary_disk = google_compute_disk.primary_disk.id | ||
secondary_disk { | ||
disk = google_compute_disk.secondary_disk.id | ||
} | ||
} | ||
# [END compute_disk_async_replication] | ||
# [END compute_disk_async_replication_parent_tag] |