mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-03 08:42:39 +00:00
Switch compute/disk type to be a resource reference instead of string. (#1748)
This commit is contained in:
parent
b2140c98d0
commit
b93a759b25
|
@ -292,10 +292,11 @@ func resourceComputeDisk() *schema.Resource {
|
|||
DiffSuppressFunc: diskImageDiffSuppress,
|
||||
},
|
||||
"type": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Default: "pd-standard",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
DiffSuppressFunc: compareSelfLinkOrResourceName,
|
||||
Default: "pd-standard",
|
||||
},
|
||||
"zone": {
|
||||
Type: schema.TypeString,
|
||||
|
@ -1009,7 +1010,11 @@ func expandComputeDiskImage(v interface{}, d *schema.ResourceData, config *Confi
|
|||
}
|
||||
|
||||
func expandComputeDiskType(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||
return v, nil
|
||||
f, err := parseZonalFieldValue("diskTypes", v.(string), "project", "zone", d, config, true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Invalid value for type: %s", err)
|
||||
}
|
||||
return f.RelativeLink(), nil
|
||||
}
|
||||
|
||||
func expandComputeDiskZone(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user