newbie issue here. I’m trying to create multiple ...
# golang
c
newbie issue here. I’m trying to create multiple NICs in azure below is my code snippet:
Copy code
var 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
Copy code
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