Enhance error code
acumino opened this issue · comments
How to categorize this issue?
/area ops-productivity
/kind enhancement
/platform azure
What would you like to be added:
If Public IP used in a resource group is already referenced in another resource group, below error occurs. It should be categorized as user error mostly ErrorRetryableInfraDependencies
.
* failed to update Public IP Association for NAT Gateway "shoot--test--test-nat-gateway" (Resource Group "shoot--test--test"): network.NatGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIPAddressInUse" Message="Resource /subscriptions/<omitted>/resourceGroups/shoot--test--test/providers/Microsoft.Network/natGateways/shoot--test--test-nat-gateway is referencing public IP address /subscriptions/<omitted>/resourceGroups/hc-dev-test-static-ip/providers/Microsoft.Network/publicIPAddresses/zonal-1-1-0-ebjt that is already allocated to resource /subscriptions/<omitted>/resourceGroups/shoot--test--test2-haas/providers/Microsoft.Network/natGateways/shoot--test--test2-haas-nat-gateway." Details=[]
with azurerm_nat_gateway_public_ip_association.nat-ip-user-provided-association-0,
on main.tf line 98, in resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-0":
98: resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-0" {
* failed to update Public IP Association for NAT Gateway "shoot--test--test-nat-gateway" (Resource Group "shoot--test--test"): network.NatGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIPAddressInUse" Message="Resource /subscriptions/<omitted>/resourceGroups/shoot--test--test/providers/Microsoft.Network/natGateways/shoot--test--test-nat-gateway is referencing public IP address /subscriptions/<omitted>/resourceGroups/hc-dev-test-static-ip/providers/Microsoft.Network/publicIPAddresses/zonal-1-1-1-ebjt that is already allocated to resource /subscriptions/<omitted>/resourceGroups/shoot--test--test2-haas/providers/Microsoft.Network/natGateways/shoot--test--test2-haas-nat-gateway." Details=[]
with azurerm_nat_gateway_public_ip_association.nat-ip-user-provided-association-1,
on main.tf line 108, in resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-1":
108: resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-1" {
* failed to update Public IP Association for NAT Gateway "shoot--test--test-nat-gateway" (Resource Group "shoot--test--test"): network.NatGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIPAddressInUse" Message="Resource /subscriptions/<omitted>/resourceGroups/shoot--test--test/providers/Microsoft.Network/natGateways/shoot--test--test-nat-gateway is referencing public IP address /subscriptions/<omitted>/resourceGroups/hc-dev-test-static-ip/providers/Microsoft.Network/publicIPAddresses/zonal-1-1-2-ebjt that is already allocated to resource /subscriptions/<omitted>/resourceGroups/shoot--test--test2-haas/providers/Microsoft.Network/natGateways/shoot--test--test2-haas-nat-gateway." Details=[]
with azurerm_nat_gateway_public_ip_association.nat-ip-user-provided-association-2,
on main.tf line 118, in resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-2":
118: resource "azurerm_nat_gateway_public_ip_association" "nat-ip-user-provided-association-2" {]
Why is this needed: