Why is the ID for a subnet created using Azure Resource Manager Powershell cmdlets null?
<p>I am trying to provision some network resources in Azure and I am running into a blocker with a step that tries to reference a previously created subnet's <code>Id</code> property.</p>

<p>Here's the command to retrieve the subnet details:</p>

<p><code>
$gwsubnet = Get-AzureRmVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork $vnet
</code></p>

<p>And then outputting the value of <code>$gwsubnet</code> in the console:</p>

<p><code>
Name                 : GatewaySubnet
Id                   : 
Etag                 : 
ProvisioningState    : 
AddressPrefix        : 10.1.1.0/24
IpConfigurations     : null
NetworkSecurityGroup : null
RouteTable           : null
</code></p>

<p>Note that the <code>Id</code> property is null.  This causes an error for a future step, e.g.:</p>

<p><code>
$gwipconfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name config1 -SubnetId $gwsubnet.Id -PublicIpAddressId $gwpip.Id
</code></p>

<p>Gives the following error:</p>

<p><code>
New-AzureRmVirtualNetworkGatewayIpConfig : Cannot validate argument on parameter 'SubnetId'. The argument is null or empty. Supply an argument that is not null or empty and then try the 
command again.
At line:1 char:99
+ ... nfig -SubnetId $gwsubnet.Id -PublicIpAddressId $gwpip.Id
+                    ~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-AzureRmVirtualNetworkGatewayIpConfig], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.Network.NewAzureVirtualNetworkGatewayIpConfigCommand
</code></p>

<p>I'm struggling with how to have my subnet have an <code>Id</code> assigned to it.  Is this something that I need to logout/login again to see?  thanks for the help.</p>