azure-resource-group

Azure: share resource across multiple resource group

扶醉桌前 提交于 2019-12-02 07:52:01
Is it possible to share a particular resource (redis cache in my case) across multiple resource group? Your redis cache could be used from any code you write, whether in the cloud, on-premises, or wherever, given proper uri + access key. As long as you have access keys/passwords/etc. to your resources, you can use your resources no matter what resource group they're in. This includes ssh keys, vm usernames/passwords, redis cache keys, storage keys, cosmos db keys, sql database logins, etc. The only thing access-specific, with resource groups, is granted user permissions. That is: if you add

Delete Azure Resource Groups with no resources in it

帅比萌擦擦* 提交于 2019-12-01 23:58:51
I am trying to find all the Azure RM resource groups with no resources in it and delete those resource groups using PowerShell. Deleting using Portal is so time consuming. Using powershell I was able to accomplish by using the following code. Is there a better way of achieving this in powershell? $allResourceGroups = Get-AzureRmResourceGroup $resourceGroupsWithResources = Get-AzureRMResource | Group-Object ResourceGroupName $allResourceGroups | % { $r1 = $_ [bool]$hasResource = $false $resourceGroupsWithResources | % { if($r1.ResourceGroupName -eq $_.Name){ $hasResource = $true } } if(

ARM template for adding runbooks and modules

别来无恙 提交于 2019-12-01 07:34:21
问题 Currently I am uploading manually custom modules for azure runtime automation runbooks in the azure portal. Then I also create manually a runbook which executes my custom module. I would like to do this via an ARM script. I assume everything you can do in the azure portal, is also possible in ARM. I am new to ARM, but deployed a website through ARM. That was relatively easy as I could just select Web App as resource. But in the Add Resource list, I can't find anything related to runbook or