F5Networks / f5-azure-arm-templates-v2

Azure Resource Manager Templates for quickly deploying BIG-IP services in Azure
22 stars 45 forks source link

Microsoft.Support provider error #26

Closed DahlPatric closed 6 months ago

DahlPatric commented 1 year ago

Describe the bug

When trying to deploy template in Azure China we receive below error.

{
    "status": "Failed",
    "error": {
        "code": "InvalidActionOrNotAction",
        "message": "The resource provider referenced in the action 'Microsoft.Support/*' is not returned in the list of providers from Azure Resource Manager."
    }
}

While investing further Provider Microsoft.Support seams not exist. az provider list --query "[?namespace=='Microsoft.Support']" --output table

No result from above command.

az provider list --query "[?registrationState=='Registered']" --output table No registrated

az provider list --query "[?registrationState=='NotRegistered']" --output table Does not exist in result.

Expected behavior

Script should install a complete set of F5:devices

Current behavior

Script fail and no F5´s deployed.

Possible solution

mikeshimkus commented 1 year ago

Hi @DahlPatric, in order to work around this error, the access.json template will need to be customized to remove the reference to the Microsoft.Support provider here: https://github.com/F5Networks/f5-azure-arm-templates-v2/blob/b32dfea3f5193873933e83ddedabdee0d5c6e7ce/examples/modules/access/access.json#L146C10-L146C10

The following shows how to modify the templates: https://github.com/F5Networks/f5-azure-arm-templates-v2/tree/main/examples#cloud-configuration

Let us know if you need any more assistance.

DahlPatric commented 7 months ago

Hi! @mikeshimkus, Fork git for a new deployment and removed Microsoft.Support as last time this was successful. But now to my surprise error message shows up even if value is removed.

New-AzResourceGroupDeployment : 13:44:12 - The deployment 'F5-HA-Deploy' failed with error(s). Showing 2 out of 2 error(s). Status Message: The resource provider referenced in the action 'Microsoft.Support/*' is not returned in the list of providers from Azure Resource Manager. (Code:InvalidActionOrNotAction) Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)

{ "error": { "code": "InvalidActionOrNotAction", "message": "The resource provider referenced in the action 'Microsoft.Support/*' is not returned in the list of providers from Azure Resource Manager." }

mikeshimkus commented 7 months ago

Hi @DahlPatric, are you sure your parent template is still pointing to the modified version of the access template? If you drill down into the deployments tab of your resource group, and find the template that was used, you should be able to verify that the provider was still removed.

DahlPatric commented 7 months ago

Hi mikeshimkus! Thanks for pointing me into right directions, totally forgot this from previous time.

DahlPatric commented 6 months ago

Closing case.