Skip to content

Commit

Permalink
Merge pull request #113 from cchildress/subnet_refresh_bugfix
Browse files Browse the repository at this point in the history
Fix #105 detect missing subnet properties
  • Loading branch information
tombuildsstuff authored Jun 22, 2017
2 parents feb5918 + 60fc6b3 commit ee621c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions azurerm/resource_arm_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ func resourceArmSubnetRead(d *schema.ResourceData, meta interface{}) error {

if resp.SubnetPropertiesFormat.NetworkSecurityGroup != nil {
d.Set("network_security_group_id", resp.SubnetPropertiesFormat.NetworkSecurityGroup.ID)
} else {
d.Set("network_security_group_id", "")
}

if resp.SubnetPropertiesFormat.RouteTable != nil {
d.Set("route_table_id", resp.SubnetPropertiesFormat.RouteTable.ID)
} else {
d.Set("route_table_id", "")
}

if resp.SubnetPropertiesFormat.IPConfigurations != nil {
Expand Down

0 comments on commit ee621c4

Please sign in to comment.