I am trying to delete the Rewrite Rule Set using AZ CLI and PowerShell but getting the below error. I tried creating the Rewrite Rule Set again and tried removing all the rules but when I am trying to delete it it is not working. Please help.
##[error]Resource /subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.Network/applicationGateways/XXXX/rewriteRuleSets/CacheRuleSet referenced by resource /subscriptions/XXXXXX/resourceGroups/XXXXX/providers/Microsoft.Network/applicationGateways/XXXXX/requestRoutingRules/BasicRoutingRule was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.
Please check whether you are using below cmdlet to Delete a rewrite rule set
az network application-gateway rewrite-rule set delete --gateway-name --ids --name --no-wait --resource-group
Resource/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.Network/applicationGateways/XXXX/rewriteRuleSets/CacheRuleSetreferencedbyresource/subscriptions/XXXXXX/resourceGroups/XXXXX/providers/Microsoft.Network/applicationGateways/XXXXX/requestRoutingRules/BasicRoutingRule was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.
The error usually occur imbalance between resources in various locations. Verify the locations of the resources to make sure they are in the same area.
Make sure to leave the routing rule in place before deleting the rule set if the error message "routing rule not found" appears.
You can also make use --debug command to view complete display of debug logs which might give you a pointer why the error is occurring.
Reference:
az network application-gateway rewrite-rule set | Microsoft Docs
Related
I would like to add a custom domain that is managed by AWS to my Azure Static Web App. Microsoft documentation shows how to add one if the DNS is managed by Azure itself. Sadly, I cannot find anything for my use case. To be more clear, the function I'd like to use with Azure command line is shown in this picture.
I have tried az staticwebapp hostname set --name FOO --hostname BAR.com which doesn't work.
I suppose you have already configured CNAME/TXT/ALIAS record with your DNS provider.
You may use --no-wait option to not wait for validation or use --validation-method "dns-txt-token" or "cname-delegation"
I would also suggest to verify your CNAME record, as often domain field must be filled with subdomain, not regular/naked domain.
Please also check if you are using the latest version of az cli.
You may check version using command az version
https://learn.microsoft.com/en-us/cli/azure/staticwebapp/hostname?view=azure-cli-latest#az-staticwebapp-hostname-set-examples
I have a custom domain associated with a front-end host in azure front door. I want to delete this domain association but getting a error which says "Please remove the DNS CNAME records and try again.". Why am I getting this error. Does this mean I need to remove CNAME record from my domain provider? If it is so, it will be problematic in CI/CD pipeline.
Attaching screenshot of the error.
I've found this issue #11231 in GitHub. Looks like they have introduced this breaking change recently. But it seems like it can be disabled by registering feature flag according to comment from the issue:
az feature register --namespace Microsoft.Network --name BypassCnameCheckForCustomDomainDeletion
But be aware that it's subscription level.
I've deployed a blank Private DNS Zone ARM Template with the standards SOA recordset. I now need to add additional recordsets to this private dns zone using the Azure CLI commands.
The issue is the following error message:
az network dns record-set a add-record -g "MyResourceGroup" -z "MyPrivateDNSZoneName.net" -n "MyRecordSetName" -a "AnIP"
Can not perform requested operation on nested resource. parent resource '' not
found.
It isn't an access issue because I can add the recordset in the portal. I also get the same issue using the powershell commands. Is there something wrong with the way these strings are being passed to the portal?
According to the details of the error, it shows the parent resource can't be found. So the possible reasons here:
You set the wrong subscription
You set the wrong resource group
You set the wrong DNS zone name
So you need to check the above options to make sure if they're alright.
I'm trying to add a VM start/stop solution on a second Automation second because i was not able to edit the solution on the first automation account to change the timings. Anyways, i've deleted all resources pertaining to the first Start/stop VM solution i had on the first automation account. After that i created a second automation account and tried to deploy the start/stop solution but i'm getting the following error,
"The resource 'ScheduledStartStop_Parent' already exists in location 'eastus' in resource group 'VM'. A resource with the same name cannot be created in location 'australiacentral'. Please select a new resource name."
Is there a waiting period only after which the resource actually gets deleted from the resource group? because i've already deleted this reource and its still giving me an error stating its still there. Can someone please explain why this is so? thanks a lot
When you have deleted the start stop solution, it doesn't delete all the resources related to it which are present in resource group. To delete them, traverse to the resource group, select the hidden items check box and delete the hidden resources. For your reference, providing a snapshot of hidden resources.
I am trying to delete a Dynamic Data Masking Rule on Azure SQLDatabase form the portal, the portal says that the Rule got deleted successfully, but when i refresh the page, the rule is still there. Couple of my colleagues also ran into the same issue.
Is this a bug/quirk from the portal, or are we doing something wrong? Is there any other way to get this working (portal, powershell, cli)?
Thanks.
I am not able to reproduce the behavior with Dynamic Masking Rules on the portal but as a workaround you can try using PowerShell to remove the rule:
Remove-AzureRmSqlDatabaseDataMaskingRule -ResourceGroupName "ResourceGroup01"
-ServerName "Server01" -DatabaseName "Database01" -SchemaName "dbo"
-TableName "table1" -ColumnName "column1"
If you continue to encounter this issue, please open a support ticket with all the details (subscription, server, database) and we can investigate why this is happening. The mask should be successfully removed when you delete it - there aren't any known bugs in this area.