Update attached disk documentation (#3413)

<!-- This change is generated by MagicModules. -->
Original Author: @chrisst
This commit is contained in:
The Magician 2019-05-01 15:45:54 -07:00 committed by Chris Stephens
parent 607ed70849
commit 9f06d8a085

View File

@ -22,6 +22,7 @@ To get more information about attaching disks, see:
* How-to Guides
* [Adding a persistent disk](https://cloud.google.com/compute/docs/disks/add-persistent-disk)
**Note:** When using `compute_attached_disk` you **must** use `lifecycle.ignore_changes = ["attached_disk"]` on the `compute_instance` resource that has the disks attached. Otherwise the two resources will fight for control of the attached disk block.
## Example Usage
```hcl
@ -29,6 +30,27 @@ resource "google_compute_attached_disk" "default" {
disk = "${google_compute_disk.default.self_link}"
instance = "${google_compute_instance.default.self_link}"
}
resource "google_compute_instance" "default" {
name = "attached-disk-instance"
machine_type = "n1-standard-1"
zone = "us-west1-a"
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
network_interface {
network = "default"
}
lifecycle {
ignore_changes = ["attached_disk"]
}
}
```
## Argument Reference
@ -77,7 +99,7 @@ The following arguments are supported:
The mode in which to attach this disk, either READ_WRITE or
READ_ONLY. If not specified, the default is to attach the disk in
READ_WRITE mode.
Possible values:
"READ_ONLY"
"READ_WRITE"