mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Remove ConflictsWith for network and subnetwork. More than one interface is supported and ConflictsWith doesn't support List properly (#294)
This commit is contained in:
parent
9bc9b089a9
commit
1480539c82
@ -284,7 +284,6 @@ func resourceComputeInstance() *schema.Resource {
|
||||
Computed: true,
|
||||
ForceNew: true,
|
||||
DiffSuppressFunc: linkDiffSuppress,
|
||||
ConflictsWith: []string{"network_interface.0.subnetwork", "network_interface.0.subnetwork_project"},
|
||||
},
|
||||
|
||||
"subnetwork": &schema.Schema{
|
||||
@ -711,10 +710,13 @@ func resourceComputeInstanceCreate(d *schema.ResourceData, meta interface{}) err
|
||||
prefix := fmt.Sprintf("network_interface.%d", i)
|
||||
// Load up the name of this network_interface
|
||||
networkName := d.Get(prefix + ".network").(string)
|
||||
subnetworkName := d.Get(prefix + ".subnetwork").(string)
|
||||
address := d.Get(prefix + ".address").(string)
|
||||
var networkLink, subnetworkLink string
|
||||
|
||||
if networkName != "" {
|
||||
if networkName != "" && subnetworkName != "" {
|
||||
return fmt.Errorf("Cannot specify both network and subnetwork values.")
|
||||
} else if networkName != "" {
|
||||
networkLink, err = getNetworkLink(d, config, prefix+".network")
|
||||
if err != nil {
|
||||
return fmt.Errorf(
|
||||
|
Loading…
Reference in New Issue
Block a user