When I try to deploy my solution on MS azure using an existing resource group it gives me an error as follows:
"This resource group contains existing resources.Choose an empty resource group or create a new one".
Can someone point how can I fix the error in CreateUIdefination.json or something else I need to do.
According to the message, we can't create that resource to that resource group which contains existing resources, we should create a new resource group, or use an empty resource group.
As 4c74356b41 said, by default, Azure not support to deploy managed application to resource group with resources.
Please try to use an empty resource group to deploy it.
Related
I created Azure Databricks in my resource group. This created the managed resource group with a storage account. My resource group also contains other database services such as Cosmos DB and SQL Server.
I removed the resource group after my work was complete. Unfortunately, the managed resource group did not get removed. Note: I did not remove the Databricks service, I deleted the resource group itself.
When I try to remove the managed resource group manually, I get the following error:
the access is denied because of the deny assignment with name 'System deny assignment created by Azure Databricks
Under IAM, I do see the Deny Assignment that was created by Databricks. Due to this, the resource group cannot be deleted.
It's been a few days since my resource group was deleted, but the managed resource group still remains.
How can I remove this managed resource group?
The managed resource group created by Databricks cannot be deleted from portal or through any scripts since it was created by the Databricks resource itself. The deny assignment prevents deletion of the managed resource group. The only option is to contact support team.
Microsoft support allowed me to create a free ticket to raise the issue. The engineering team removed the restriction on the managed resource group and informed me that I can go ahead with deleting the same.
I was able to delete the managed resource group successfully. Also note that I was not able to re-produce the issue (it must be a one-off incident).
Thanks for all the help.
I have two resource groups in our azure account, one(A) is having all the database(SQL) resources and other one(B) having other resources like app service, key vault, service bus etc.
Now we have decided to make a single resource group and we are trying to move SQL resources from resource group A resource group B. but it gives duplicate resources error as saying the resources we are trying to move is already there. But I have checked properly and those resources are not in resource group B.I have checked hidden types as well.
(A)
(B)
There is a peculiar issue while build image using packer. Our service principle in azure will not have access to create or delete resource group, whereas packer is trying to create the temporary resource group in each build.
I changed the temp_resource_group_name to build_resource_group_name which is pointing to an existing resource group. Post that I got following error message while building, can you please help me figure our where I'm doing wrong.
Specify either a location to create the resource group in or an
existing build resource group name, but not both packer stack overflow
If you want to create the image using Packer with an exist resource group as the creation, there is a limitation for it.
Providing temp_resource_group_name or location in combination with
build_resource_group_name is not allowed.
So you should more carefully for the creation, and for more details about that, see Azure Resource Manager Builder.
Update
The update for the issue that multi subscriptions in the same resource group. The property subscription_id already shows that which subscription was chosen for the build_resource_group_name. So you do not worry about which subscription will be chosen.
Today I tried to add new VM into an Azure Resource Group that already has VMs and other resources and it was successful. I removed it and after a while, when a new VM was being added into the same Resource Group, it prompts a new Resource Group would be needed to store the new VM.
I was wondering when a new VM could and could not be added into a Resource Group taken by other resources.
Thanks.
No, this is not the case, you can put almost any resources together in a resource group. there are some weird exception like: windows and linux app service plans cant exist in the same resource group.
you can add resources to different regions in the same resource group as well
you cannot add resources with the same name and type to the resource group, because name + type combination has to be the same
so you can add VM called new and VM called new1, but not VM called new and another VM called new; but you can add VM called new and Azure SQL called new into the same resource group (give that Azure SQL instance called new is available, but this has nothing to do with the resource group)
This can now be done from the portal. In your portal at the Home page click Virtual Machines, then Add. You can then choose the current resource group and add the machine in to it. May be of use to someone else coming along later like I did.
I want to delete the resource group on failure of any resources deployment.
and main note here is that i should not use logic app for this resource group deletion, i should use template.json file alone.
is there any possibility to delete a resource group via template.json
As far as I know, we couldn't delete a resource group via template.json.
If you want to achieve this, I suggest you could write your own logic (using script or codes) to check the template deployment result. If result throws an exception then you could run the script or code (azure management rest api send the request to azure) or powershell command to remove the resource group.
Besides, someone has same requirement and send the feedback (Link) to azure team. I suggest you could vote this and wait for azure product team reply.