Skip to main content
selectMicrosoft Azurelast verified 2026-07-30
Servicesnetwork
CredentialsAZURE_TENANT_ID AZURE_CLIENT_ID AZURE_CLIENT_SECRET
PermissionsMicrosoft.Network/publicIPAddresses/read
Fan-out: subscription - one call per subscription when swept tenant-wide. A reserved public IP is billed whether or not it is attached

Azure public IP address provisioning

Lists the public IP addresses allocated in a resource group with their address, allocation method and SKU, and covers creating and deleting one. Public IPs are the account's internet-facing surface, so this doubles as an exposure inventory: every address here is a potential ingress point.

Query

SELECT
name,
location,
ip_address,
public_ip_allocation_method,
provisioning_state,
sku
FROM azure.network.public_ip_addresses
WHERE subscription_id = '{{subscription_id}}'
AND resource_group_name = '{{resource_group_name}}';

Creating a static public IP

sku and properties are JSON documents passed as plain columns:

INSERT INTO azure.network.public_ip_addresses(
public_ip_address_name,
resource_group_name,
subscription_id,
location,
sku,
properties,
tags
)
SELECT
'my-public-ip',
'{{resource_group_name}}',
'{{subscription_id}}',
'eastus',
'{"name": "Standard", "tier": "Regional"}',
'{"publicIPAllocationMethod": "Static"}',
'{"provisioner": "stackql"}';

Deleting a public IP

DELETE FROM azure.network.public_ip_addresses
WHERE subscription_id = '{{subscription_id}}'
AND resource_group_name = '{{resource_group_name}}'
AND public_ip_address_name = 'my-public-ip';

Notes

Standard SKU addresses must be Static - the API rejects a Standard address requesting Dynamic allocation - while Basic SKU permits either. Basic SKU is retiring, so new work should use Standard. ip_address is populated as soon as provisioning_state reaches Succeeded for a Static address, but stays null for a Dynamic one until it is attached to a running resource, so a null there is not necessarily a failure. Deleting an address that is still attached to a network interface fails; detach or delete the NIC first, or delete the whole resource group to cascade. A reserved address bills whether attached or not, so unattached addresses in this list are usually waste worth reclaiming. Body properties are plain columns with no data__ prefix.

Related queries