Skip to content

Commit

Permalink
Merge pull request #1898 from terraform-providers/dsvnet_emptyname
Browse files Browse the repository at this point in the history
Prevent potential crash due to empty name in VNet data source
  • Loading branch information
katbyte authored Sep 8, 2018
2 parents 2766410 + f9227d1 commit 8e8e100
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions azurerm/data_source_virtual_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)

Expand All @@ -13,14 +14,12 @@ func dataSourceArmVirtualNetwork() *schema.Resource {
Read: dataSourceArmVnetRead,
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.NoZeroValues,
},

"resource_group_name": {
Type: schema.TypeString,
Required: true,
},
"resource_group_name": resourceGroupNameForDataSourceSchema(),

"address_spaces": {
Type: schema.TypeList,
Expand Down

0 comments on commit 8e8e100

Please sign in to comment.