azure-resource-manager

Deploying a website and App Insights with an ARM template but putting App Insights in another resource group

北战南征 提交于 2019-12-11 06:33:18
问题 I have a simple ARM template: { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "hostingPlanName": { "type": "string", "minLength": 1 }, "WebsiteName": { "type": "string", "minLength": 1 }, "externalResourceGroupName": { "type": "string", "metadata": { "description": "The name of a resource group if the deployment need to deploy to an RG that is not the current RG." } } }, "variables": { }, "resources":

Passing credentials to DSC script from arm template

你说的曾经没有我的故事 提交于 2019-12-11 06:26:29
问题 I am trying to deploy a VM with a DSC extension from an ARM template. According to various sources, and even this SO question, I am following the correct way to pass a credential object to my script: "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.19", "autoUpgradeMinorVersion": true, "settings": { "modulesUrl": "[concat(parameters('_artifactsLocation'), '/', variables('ConfigureRSArchiveFolder'), '/', variables('ConfigureRSArchiveFileName'), '/',

Provisioning resource group and azure function at deployment level

烂漫一生 提交于 2019-12-11 06:20:08
问题 I've written up the script below to do the following: Provision a resource group In a separate deployment: Provision a storage account Provision a server farm Provision a function app The problem lies in the setting of the app settings in the function app, when I'm setting up the AzureWebJobsStorage. The resourceId function fails to resolve the storage account. When looking at the documention for the resourceId function, it states: When used with a subscription-level deployment, the

Pass Powershell switch to an Azure Resource Manager Template (ARM)

你离开我真会死。 提交于 2019-12-11 04:52:57
问题 How can I directly pass a powershell switch (System.Management.Automation.SwitchParameter) to an ARM template (which will be used as a condition in the template itself)? Currently I am using the workaround of converting the switch to an string. 回答1: Lets say your switch is called fullversion: param( ... [switch]$fullversion ) and your parameterfile also contains a parameter called fullversion then you can pass it like: New-AzureRmResourceGroupDeployment -fullversion $fullversion.IsPresent 来源:

How to check if name already exists? Azure Ressource Manager Template

倾然丶 夕夏残阳落幕 提交于 2019-12-11 04:39:38
问题 is it possible to check , in an ARM Template, if the name for my Virtual Machine already exists ? I am developing a Solution Template for the Azure Marketplace. Maybe it is possible to set a paramter in the UiDefinition uniqe? The goal is to reproduce this green Hook 回答1: A couple notes... VM Names only need to be unique within a resourceGroup, not within the subscription Solution Templates must be deployed to empty resourceGroups, so collisions with existing resources aren't possible For

How the if() function executes in Azure Resource Manager Templates

。_饼干妹妹 提交于 2019-12-11 02:45:32
问题 I am using if() functions in my ARM template to conditionally set some connection string values in my Web App resource. The current condition looks like this. "[if(equals(parameters('isProduction'), 'Yes'), concat(variables('redisCacheName'),'.redis.cache.windows.net:6380|', listKeys(resourceId('Microsoft.Cache/Redis', variables('redisCacheName')), '2015-08-01').primaryKey, '|', variables('resourcePrefix')), parameters('redisSessionStateConnection'))]" To simplify it, the condition looks like

Private IP address in reserved subnet range

筅森魡賤 提交于 2019-12-11 02:21:50
问题 I have an arm template that has a vNet with 2 subnets. I am trying to deploy a Nic to one of these with a static private IP address. It used to be dynamic, and it worked fine. Now it is static, I have set the IP I want the nic to have, but when I deploy, it says the IP is invalid. I tried changing the IP I set, but it still doesn't work... Extracts from my template: (subnetPart is a parameterised number as we have several vnets that will be connected, but the subnets need to not clash)

Azure Resource Template Deployment issues

社会主义新天地 提交于 2019-12-11 01:17:59
问题 I have created separate ARM templates each for the DocumentDB, Azure SQL Server, Storage Account, Azure Key Vault, Azure Batch, HDInsight Cluster. Using New-AzureRmResourceGroupDeployment powershell command when I deploy above resources in a loop within the same resource group I found a strange behaviour. While deploying DocDB all my previously deployed resources in the resource group vanishes (probably deleted automatically). Same is the case when I deploy Azure SQL Server. Has anybody

Azure ARM templates - Linked templates with VSTS Git

笑着哭i 提交于 2019-12-11 01:14:16
问题 I have a have a main ARM template that refers to couple of linked ARM templates. Each of the ARM templates are hosted in their own private VSTS Git repo. When deploying the main template the ARM engine will need to authenticate to the private VSTS git repo. I have seen examples of how this can be achieved when the content is stored in github. Is it possible to do the same thing with VSTS git and if yes how? 回答1: its not achievable without hacks, be it github, vsts whatever. if you need

Can I Pass MSDeploy Parameters to Azure Web App MSDeploy Extension?

半世苍凉 提交于 2019-12-10 19:48:46
问题 There is an MSDeploy extension available for Azure Web Apps; this can be used with Azure Resource Manager (ARM) Templates as well (example). I'd like to pass additional command-line arguments to MSDeploy, such as -enableRule:AppOffline (example). Is there documentation for the MSDeploy Web App extension for passing additional arguments, etc.? 回答1: Based on the latest schema definition for Azure Web App MSDeploy extension as below, it does not support the passing of MSDeploy command line