I am creating Azure VMs using the API (well, Ansible, but that doesn't matter).
I submit the following Interfaces config:
- type: "interface"
network: default #not foreman-vnet-default
Which yields the following error:
MsRestAzure::AzureOperationError: PrivateIPAddressMissing: Private IP address is required when privateIPAllocationMethod is Static in IP configuration /subscriptions/UUID/resourceGroups/foreman/providers/Microsoft.Network/networkInterfaces/whoa-nic0/ipConfigurations/whoa-nic0.
This is because the code at https://github.com/theforeman/foreman_azure_rm/blob/48c22cb6f4e3845d2faf61be26d3f0eea58b6b70/app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb#L126 reads:
private_ip = (attrs[:private_ip] == 'false') ? false : true
Which makes private_ip only False if the API parameter was a *string* with the value "false".
Created from redmine issue https://projects.theforeman.org/issues/32500
Upstream bug assigned to firstname.lastname@example.org