azure-resource-group

Validate Azure Resource Group Exist or not

你。 提交于 2020-07-10 08:57:21
问题 I am trying to write to a powershell script to validate the Resource Group is exist or not. Conditions- Check the resource group (myrg) is already exist in azure subscription. If "condition 1" is FALSE then Create a Resource Group (myrg) Else append 2 digits to the Resource Group name. e.g. (myrg01) Check the (myrg01)resource group exist in azure subscription. If "condition 3" is FALSE then Create a Resource Group (myrg01) Else increment the last digit by one for Resource Group name. e.g.

How to apply Azure resource locks to Resource Groups via Policy

拈花ヽ惹草 提交于 2020-03-23 07:31:09
问题 I'm trying to create an Azure policy which will deploy a resource lock with the level of 'CanNotDelete' to resource groups within a subscription. Currently the policy is 100% compliant but no locks have been created by the policy. I have the following in my JSON policy.rules file; { "if": { "field": "type", "equals": "Microsoft.Resources/resourceGroups" }, "then": { "effect": "deployIfNotExists", "details": { "type": "Microsoft.Authorization/locks", "existenceCondition": { "field": "Microsoft

Unable to delete Azure Resource Group after deployment failure in it

烂漫一生 提交于 2020-01-15 12:44:47
问题 I was deploying a set of resources in a resource group using Azure Managed Application on Service Catalog Managed Application which failed indeed due to some syntax errors (even though the syntax was correct and according to Azure Guidelines). Now when I open the failed resource, it displays nothing in it, which seems that there is nothing in the resource but just a reference to it. Later when I deleted the resource, it notified "cannot be deleted" or "successful deletion" however portal kept

Unable to delete Azure Resource Group after deployment failure in it

☆樱花仙子☆ 提交于 2020-01-15 12:44:05
问题 I was deploying a set of resources in a resource group using Azure Managed Application on Service Catalog Managed Application which failed indeed due to some syntax errors (even though the syntax was correct and according to Azure Guidelines). Now when I open the failed resource, it displays nothing in it, which seems that there is nothing in the resource but just a reference to it. Later when I deleted the resource, it notified "cannot be deleted" or "successful deletion" however portal kept

How can I get the resource group name from within Service Fabric on Microsoft Azure

心已入冬 提交于 2019-12-25 07:47:35
问题 My service can be placed on different resource groups, but needs to know the name of the resource group in order to request information about the VM Scale Sets it's running on. How do I get the name of the Resource Group which the Fabric is in from within the Fabric? 回答1: This may work: If you uniquely tag your resource group, and configure the sf application to know that tag, you might be able to query the resource groups and filter by tag. You could use a Service Principal to access the

Looping through values in ARM templates

空扰寡人 提交于 2019-12-24 01:01:47
问题 I've been working on an issue I'm having with ARM templates for over a day now, and seem to be stuck, so asking on SO in case anyone can help. To describe the issue, I've got an existing Azure Key Vault setup, and wish to add a number of access policies to this resource group. For reference purposes, the following is the ARM template reference for adding Key Vault Access Policies: https://docs.microsoft.com/en-gb/azure/templates/Microsoft.KeyVault/2018-02-14/vaults/accessPolicies I have a