mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Return an error if name and name prefix are specified in node pool (#1062)
This commit is contained in:
parent
4c57ce9308
commit
842256abc2
@ -307,6 +307,9 @@ func resourceContainerNodePoolStateImporter(d *schema.ResourceData, meta interfa
|
||||
func expandNodePool(d *schema.ResourceData, prefix string) (*container.NodePool, error) {
|
||||
var name string
|
||||
if v, ok := d.GetOk(prefix + "name"); ok {
|
||||
if _, ok := d.GetOk(prefix + "name_prefix"); ok {
|
||||
return nil, fmt.Errorf("Cannot specify both name and name_prefix for a node_pool")
|
||||
}
|
||||
name = v.(string)
|
||||
} else if v, ok := d.GetOk(prefix + "name_prefix"); ok {
|
||||
name = resource.PrefixedUniqueId(v.(string))
|
||||
|
Loading…
Reference in New Issue
Block a user