Open cstandrew opened 2 years ago
Checking to see if there is any update.
Hello,
This issue has been open for some time, and it's causing significant challenges for us. Could you please provide an update on the progress of supporting specific IP allocation from a prefix via Terraform?
In the meantime, can you suggest any workarounds to achieve this functionality until the feature is implemented?
Thank you for your support!
Is there an existing issue for this?
Community Note
Description
With the introduction of Bring Your Own IP Address (BYOIP) to Azure https://docs.microsoft.com/en-gb/azure/virtual-network/ip-services/custom-ip-address-prefix it should be possible to specify the desired public IP when a creating a public IP address from a public IP prefix.
At the moment the ip_address after creation is exported, but it’s not possible to set this as an argument.
Using Azure CLI this can be achieved with:
az network public-ip create -g example -n myPublicIpAddress --zone 1 2 3 --ip-address 1.2.3.4 --sku Standard --public-ip-prefix myIpPrefix
One thing I've noticed is that using the CLI, if you don't specify the public-ip-prefix the public-ip is still created, but using a random MS IP address. So there probably needs to be some validation that a public_ip_prefix_id has also been set if ip_address is specified.
New or Affected Resource(s)/Data Source(s)
azurerm_public_ip
Potential Terraform Configuration
References
No response