Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add desc to schema for google_compute_attached_disk #3679

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions third_party/terraform/resources/resource_compute_attached_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,43 @@ func resourceComputeAttachedDisk() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `name or self_link of the disk that will be attached.`,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"instance": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `name or self_link of the compute instance that the disk will be attached to. If the self_link is provided then zone and project are extracted from the self link. If only the name is used then zone and project must be defined as properties on the resource or provider.`,
DiffSuppressFunc: compareSelfLinkOrResourceName,
},
"project": {
Type: schema.TypeString,
ForceNew: true,
Computed: true,
Optional: true,
Type: schema.TypeString,
ForceNew: true,
Computed: true,
Optional: true,
Description: `The project that the referenced compute instance is a part of. If instance is referenced by its self_link the project defined in the link will take precedence.`,
},
"zone": {
Type: schema.TypeString,
ForceNew: true,
Computed: true,
Optional: true,
Type: schema.TypeString,
ForceNew: true,
Computed: true,
Optional: true,
Description: `The zone that the referenced compute instance is located within. If instance is referenced by its self_link the zone defined in the link will take precedence.`,
},
"device_name": {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Computed: true,
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Computed: true,
Description: `Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine.`,
},
"mode": {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Default: "READ_WRITE",
Description: `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.`,
ValidateFunc: validation.StringInSlice([]string{"READ_ONLY", "READ_WRITE"}, false),
},
},
Expand Down