Moved azure resource has disappeared - azure

I just moved my WebApp from one subscription to another and now I can't find it in the azure portal.
However, I see that the web application still works.
It has not been deleted.
It is not listed in the result of the call to Get-AzureRmResource.
Do you have an idea to diagnose this problem?
Update
I found an error entry in the target Resource Group activity log:
"properties": {
"statusCode": "Conflict",
"statusMessage": "{\"error\":
{\"code\":\"ResourceMoveFailed\",\"message\":...
BUT my resource is not, either, in my old resource group !!!

It looks like you are experiencing an issue with the synchronization as mentioned in the following discussion thread, to fix this issue you may contact the support to perform a re-sync.
Let us know if you need further assistance on this issue.

Many of the operations you perform are scoped per subscription. For example, Get-AzureRmResource works against the currently selected subscription. You can run Get-AzureRmSubscription to view the subscriptions you have access to. You can then switch between subscriptions with something like this:
Set-AzureRmContext -SubscriptionName "Example Subscription Two"
In the portal, you can filter all the blades to show resources in one or more subscriptions.
As the image points out, if that doesn't work you can switch directories.

Try Azure Resource Explorer for furthermore information on resources.
https://azure.microsoft.com/en-us/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/

Related

Trying to add a start/stop solution on Azure VM using a second Automation account

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.

The template deployment 'Microsoft.Web-WebApp-Portal-3994ede8-a307' is not valid according to the validation procedure

This is part of an exercise of MS Learning, https://learn.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice. On manual creation of Azure App Service, I am getting the error.
Please help with the Cause and Resolution
Steps to recreate:
azure.com >> Azure App Service >> +Add > add the project details like subscription, resource group etc... >> Review+Create, Below error:
The template deployment 'Microsoft.Web-WebApp-Portal-3994ede8-a307' is not valid according to the validation procedure. The tracking id is 'ca7e085f-a756-4344-bfe1-07444ff0fe0e'. See inner errors for details.
I'd like to know what is causing this error - and how I can avoid it?
So looking at the output in the network tab of the browser i saw this:
The requested app service plan cannot be created in the current resource group because it is hosting Linux apps. Please choose a different resource group or create a new one.
So deleted the app service plan/web app and now it works.
MS, please show us the error ...
I was able to fix this error by simply recreating webapp, and selecting another location. From Central Usa to South Central USA. It worked for me
Changing the location, helped me in fixing this error.
I was facing the same issue so I changed the location from "East US" to "East US 2" and it also worked for me.

Stopping or Disabling a resource group in Azure

Is there any way to disable or stop a particular resource group temporarily? I know we can delete the resource group or we can stop certain services under the resource group but I am unable to find a way where I can just shut down the resource group or all of it's resources at once, temporarily.
Please let me know if I can provide few more details about this.
Thanks.
This does not seem to be possible at the moment but a request has been made here, however, no response from Microsoft on what it's status.
In general, if there are features that are not available in e.g. Azure, use the feedback site to suggest and vote on new features.
However, if you only got some specific type of resources in your resource group, like e.g. virtual machines, then you can stop them all in one PowerShell command like this:
Get-AzureRmResourceGroup <group name> | Stop-AzureRmVM -Force
Note: this approach is highly dependent on the type of resource and not a generic solutions like requested
A resource group is just a bounding-box, serving as a grouping mechanism and a security boundary. You cannot "stop" a resource group, as a resource group is never running. Yes, you can delete a resource group (along with everything in it), but that's a one-shot operation. It's not a fine-grained resource-management operation.
As for the services inside a resource group: some can be stopped, some cannot. For instance, you cannot stop a storage account. Others have very different behaviors when stopped: A VM simply sleeps/hibernates until restarted with everything preserved, while an HDInsight cluster, when stopped, deletes everything.
TL;DR there is currently no way to point to a resource group and have it stop all of its services, given the variability of behavior (and the fact there's no such supported API). You'll need to manage your resource starts/stops.
I just had a new "MSDN account" hit its budget limit and that made me realize this SHOULD be achievable!
When this happened Microsoft "disabled" my subscription.
In my case, I'm actually fine with having to "fence the resources" within a subscription if I had to. But at the moment, I haven't found a way to easily stop/start it in this manor. Anyone a guru with the Azure budgets? It looks like they can be applied at a Resource Group level as well.
Can you "enable/disable" resource groups or subscriptions this way?
Simply want to create something. Pay for it, of course. Pay for storage, sure. But 'disable' it, until I need to run it. Then, Enable it. Simple. :)
I've been upvoting and watching this "Feature Request" thread for some time:
https://feedback.azure.com/forums/217313-networking/suggestions/17670613-hibernate-pause-a-resource-group-or-subscription

Cannot create Hybrid Connection in Azure Portal

We are trying to set up a Hybrid Connection from an App Service and the Azure Portal behavior is quite odd. We have done this previously from another subscription; this subscription is part of a CSP (so we can't even try doing it from the old/classic portal).
Blade prompts us to create a new resource group even though the one it defaulted to already exists. (Like it can't populate existing resource groups?)
No locations are provided when navigating to the Location pane, there's a cutoff error message:
"There are no locations available. You may not h..."
We have "owner" role on the subscription.
his subscription is part of a CSA (so we can't even try doing it from the old/classic portal).
Do you mean CSP there, as in Cloud Solution Provider? If so, the resource provider Microsoft.BizTalkServices is not yet available in CSP.
Yes, the error message and how the UI flow is handled could use some improvement.
See this for more:
https://blogs.technet.microsoft.com/hybridcloudbp/2016/06/29/list-of-azure-services-in-csp/

How do I change the name of an Azure Resource Group?

After the new model was implemented, all of my websites now belong to individual Resource Groups called "Default-Web-East" and all of my SQL databases belong to individual Resource Groups called "Default-SQL-East".
This is confusing to say the least.
I would like to rename the groups to have some semantic meaning. I would also like to group the associated SQL database and Web Site in the same Resource Group.
However, I do not see anyway to do either. Is this possible?
1) Rename the Resource Group?
2) Combine an existing SQL DB and Website together into one Resource Group?
Edit: You can't rename an Azure Resource Group.
What you can do is move your resources to a new Resource Group instead. Moving all resources in Resource Group A to Resource Group B is the poor man's rename.
Unfortunately not all resource providers let you move resources between resource groups, and some that do might have strings attached that only let you move resources under certain conditions.
For Azure Web Apps (previously called Azure Websites) you can currently only move all the websites related resources in a single invocation. That "all websites related resources" means all resource under the provider "Microsoft.Web". This includes all websites, app hosting platforms, and certificates that are in the source resource group.
Via the portal
When viewing a group's resources, you can use the "Move" tab
Clicking the "Move" tab will show something this, allowing you to choose or create a new group:
Via Azure Powershell
The easiest way to do this is to use the Move-AzureRmResource powershell cmdlet.
The command would look like this:
Get-AzureRmResource -ResourceGroupName <sourceResourceGroupName> | Move-AzureRmResource -DestinationResourceGroupName <destResourceGroupName>
source: https://azure.microsoft.com/en-us/documentation/articles/resource-group-move-resources/
Via Rest API
The other way to do this is to use the MoveResource Rest API or with the ArmClient.
Here's the API call you'll want to make:
POST https://<endpoint>/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/moveResources?api-version={api-version}
Where {resourceGroupName} is the source resource group.
I'm pretty sure the endpoint should be "https://management.azure.com", but if you use the ArmClient the tool will just take care of the endpoint for you.
Request Body:
{
"targetResourceGroup": "/subscriptions/{subscriptionId}/resourceGroups/{targetResourceGroupNameName}",
"resources":
[
"/subscriptions/{id}/resourceGroups/{source}/providers/{namespace}/{type}/{name}",
"/subscriptions/{id}/resourceGroups/{source}/providers/{namespace}/{type}/{name}"
]
}
In addition to the main answer, Azure Portal has a feature of moving the Resources that is allowed to be moved to a new Resource group.
Go to your Resource Group that has Resources you want to move to an existing or a new created Resource Group.
Select the one, multiple or all (1) Resources you want to move and click on the Move (2) bottom as shown in image. (you can select moving to Resources with in the same subscription or to another subscription) A third option if you need just to change the Region) see the the figure at the end.
It will ask you to chose which Resource Group to move to.
Note: This process might take some time, be patient. When done, you
will see that the resource disappear from the old one and will be
found in the new one. That said some resources might be restricted
from been moved to other resources.
Move (Fixing) only region

Resources