-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying Multiple IP Configurations per Network Interface #259
Comments
I haven't looked into the Swagger yet but can verify the structures in the generated client do not match what is running in production, and it is therefore impossible to create a network interface with multiple IP configurations without hacking around the SDK at present - for now we've just documented it as a bug in the Terraform docs, and will update when this is fixed. |
The issue comes from the Swagger. I've verified that it is in both the Network/2015-06-15 and prior version. See https://github.com/Azure/azure-rest-api-specs/blob/master/arm-network/2015-06-15/swagger/network.json#L5849. If you would not mind, please, post an issue against that repository. I'll poke around as well. |
Hi @stack72, Thanks for pointing this out. The "primary" flag outside IPConfiguration is valid since we support MultiNic scenario. So the flag will tell the user whether the nic is a primary or not. Yes, though we have IPConfiguration as a list, we are currently working on Multiple IPConfiguration support (once that is done, we will update the schema and the client with the "primary" field). This currently is a bug on the service where we are not throwing the appropriate error message. (the message should be something along the lines of "Multiple IPConfigurations not supported"). We will fix this soon. Thanks, |
Change this to a loop when Azure/azure-sdk-for-go#259 is fixed
* Adding private ip address reference * adding private ip address reference * Updating the docs. * Removing optional attrib from private_ip_address Removing optional attribute from private_ip_address, this element is only being used in the read. * Selecting the first element instead of using a loop for now. Change this to a loop when Azure/azure-sdk-for-go#259 is fixed
I don't understand. When I query for my NIC in resources.azure.com, I can see the ipConfiguration itself has a primary field that is populated. On the other hand, when I query my VM and inspect the NetworkProfile, the Primary field is NOT populated on the interface. This indicates to me that the Swagger does not conform to the actual behavior of the API. I'm actively having to work around this by making certain assumptions. |
So this does not contain the And then:
Which shows the ipConfiguration coming back with a "primary" field, and yet this isn't exposed in Swagger. The net result is that I can't tell which NIC is primary, and I can't tell which ipConfiguration on a given NIC is primary. This does not seem correct to me. |
…hicorp#6538) * Adding private ip address reference * adding private ip address reference * Updating the docs. * Removing optional attrib from private_ip_address Removing optional attribute from private_ip_address, this element is only being used in the read. * Selecting the first element instead of using a loop for now. Change this to a loop when Azure/azure-sdk-for-go#259 is fixed
@colemickens do you know if this is fixed? |
Not really. The other thread: Azure/azure-rest-api-specs#305 has open questions about if this has been addressed appropriately. I'll ping that thread. |
This is resolved. See here for the details: Azure/azure-rest-api-specs#305 (comment) |
* Adding private ip address reference * adding private ip address reference * Updating the docs. * Removing optional attrib from private_ip_address Removing optional attribute from private_ip_address, this element is only being used in the read. * Selecting the first element instead of using a loop for now. Change this to a loop when Azure/azure-sdk-for-go#259 is fixed
* Adding private ip address reference * adding private ip address reference * Updating the docs. * Removing optional attrib from private_ip_address Removing optional attribute from private_ip_address, this element is only being used in the read. * Selecting the first element instead of using a loop for now. Change this to a loop when Azure/azure-sdk-for-go#259 is fixed
I am trying to make the following call to the API:
I get the following response:
The struct for the network interface looks as follows:
The
Primary
is outside of the IPConfigurations. Therefore, we cannot passprimary: true
for any of the IPConfigurations. The correct request should look as follows:The text was updated successfully, but these errors were encountered: