cold-car-23440
09/24/2019, 4:45 PMvar consulcount [5]int
for i := range consulcount {
consulnicename := fmt.Sprintf("consul-nic-%d", i+0)
ipConfig := map[string]interface{}{
"subnetid": vaultSubnet.ID(),
"name": fmt.Sprintf("consul-nic-ipc-%d", i+0),
"PrivateIPAllocationMethod": "Dynamic",
}
consulNics, err := network.NewNetworkInterface(ctx, consulnicename, &network.NetworkInterfaceArgs{
Name: consulnicename,
ResourceGroupName: resourceGroup.Name(),
Location: location,
IpConfigurations: ipConfig,
})
if err != nil {
return err
}
ctx.Export("nic-name", consulNics.Name())
}
I’m getting the following error
error: azure:network/networkInterface:NetworkInterface resource 'consul-nic-3' has a problem: ip_configuration: should be a list
not quite sure how to present these params as a list as IpConfigurations is sort of a nested block in terraform terms
any pointers would be greatly appreciated