Hello, I'm using the following to get an existing ...
# general
e
Hello, I'm using the following to get an existing subnet from Azure:
Copy code
AzureNative.Network.GetSubnet.Invoke(new ()
{
    ResourceGroupName = "rg-name",
    VirtualNetworkName = "vnet-name",
    SubnetName = "subnet-name",
    Expand = "routeTable"
});
However, the routeTable is empty. When I try the request using the REST API directly (az rest --method get --uri ''https://management.azure.com/subscriptions/<subId>/resourceGroups/<rgName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/<subnetName>?api-version=2020-11-01&$expand=routeTable''), the routeTable information is properly returned. Does anyone have an idea why?
b
Are you sure the azure credentials you’re using for the cli are the same as the Pulumi call?
e
Yes, both commands are executed on the same machine and Pulumi uses the same credentials as Azure CLI
b
e
I see that: I0609 110906.919050 14330 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0609 110906.916901 14995 log.go:75] Unmarshaling property for RPC[azure-native.Invoke(azure-nativenetwork/v20220901getSubnet).args]: expand={routeTable}
But the logged URL does not include the expand parameter
b
interesting, could you file an issue in the azure-native repo?
e
Yes, I will, thank you