gardener / gardener-extension-provider-azure

Gardener extension controller for the Azure cloud provider (https://azure.microsoft.com).

Home Page:https://gardener.cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve error classification for `PublicIPAddressInUse`

dimitar-kostadinov opened this issue · comments

How to categorize this issue?

/area ops-productivity
/kind enhancement
/platform azure

What would you like to be added:

Classify Error: Code="PublicIPAddressInUse" as User configuration issue.
If the Public IP Association for NAT Gateway is already in use the Infrastructure creation fails with:

* failed to update Public IP Association for NAT Gateway "shoot--foo--bar-nat-gateway" (Resource Group "shoot--foo--bar"): network.NatGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIPAddressInUse" Message="Resource /subscriptions/<omitted>/resourceGroups/shoot--foo--bar/providers/Microsoft.Network/natGateways/shoot--foo--bar-nat-gateway is referencing public IP address /subscriptions/<omitted>/resourceGroups/static-ip/providers/Microsoft.Network/publicIPAddresses/addr that is already allocated to resource /subscriptions/<omitted>/resourceGroups/shoot--foo--baz/providers/Microsoft.Network/natGateways/shoot--foo--baz-nat-gateway." Details=[]

Why is this needed:

Improve error classification.