azure-template

Azure ARM template add deployer object id to key vault access policies

烂漫一生 提交于 2021-01-28 05:27:37
问题 I have a service principal which I am using to deploy key vault. How can I fetch that service principals object id automatically with ARM template similarly as I can fetch MSI object id with line: "objectId": "[reference(concat('Microsoft.Web/sites/', variables('function')), '2018-02-01', 'Full').identity.principalId]", 回答1: I dont think you can. Your only option would be to pass it from the level above (ie from the powershell script that is invoking the template). Also, if you want to do

'Microsoft.Web/sites/config' azureStorageAccounts fails due to 500 InternalError

只谈情不闲聊 提交于 2021-01-01 11:06:53
问题 I have the following resource in a template: { "type": "Microsoft.Web/sites/config", "apiVersion": "2018-11-01", "name": "[concat(parameters('appservice_name'), '/web')]", "location": "East US", "dependsOn": [ "[resourceId('Microsoft.Web/sites', parameters('appservice_name'))]", "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]", "[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccounts_name'), 'default',

'Microsoft.Web/sites/config' azureStorageAccounts fails due to 500 InternalError

匆匆过客 提交于 2021-01-01 11:01:40
问题 I have the following resource in a template: { "type": "Microsoft.Web/sites/config", "apiVersion": "2018-11-01", "name": "[concat(parameters('appservice_name'), '/web')]", "location": "East US", "dependsOn": [ "[resourceId('Microsoft.Web/sites', parameters('appservice_name'))]", "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]", "[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccounts_name'), 'default',

The template function 'reference' is not expected at this location

萝らか妹 提交于 2020-12-15 06:36:48
问题 I'm trying to execute a script in my template using Microsoft.Resources/deploymentScripts, but also I'm trying to declare de user assigned identity in the same template { "type": "Microsoft.ManagedIdentity/userAssignedIdentities", "name": "scriptIdentity", "apiVersion": "2018-11-30", "location": "[resourceGroup().location]" }, { "type": "Microsoft.Resources/deploymentScripts", "apiVersion": "2019-10-01-preview", "name": "updateAppServiceConfigMountPointScript", "dependsOn": [ "[resourceId(

How to get ResourceId as output for VM when using copyIndex

我怕爱的太早我们不能终老 提交于 2020-04-18 12:32:30
问题 I use copyIndex(0) to create several virtualMachine resources (along with publicIP addresses, nic...) I need the resourceID as output from the deployment for further processing. Usually I do this with the resourceId() function, but since the names are dynamic and copyIndex is not valid in outputs section, I can't figure out the proper syntax for this: { "code": "DeploymentOutputEvaluationFailed", "message": "Unable to evaluate template outputs: 'resourceID'. Please see error details and

ARM Template - How to reference a copyIndex() deployment output?

社会主义新天地 提交于 2020-01-05 08:29:31
问题 I deploy 30 SQL databases via copyIndex() as sub deployments of the main deployment, I want to be able to reference the outputs of the dynamic deployments when kicking off another deployment. Once all the databases are deployed, I want to then all Azure Monitor metric rules to the DBs, and need their resourceIds (the Output of the db deploy). The answer here sounds exactly like what I'm trying to do, and I understand that each deployment is chained to have the output of the previous deploy.

How to get around Azure Data Factory ARM Template parameter limits?

余生颓废 提交于 2019-12-25 01:46:16
问题 I have created an Data Factory in Azure with a about 10-15 pipelines in it and they all work fine and I can debug and run them without issue on the Test Data Factory that I have setup. I have also setup Azure DevOps integration with the Data Factory with a CI/CD pipeline. Initially this pipeline worked fine as well and I was able to use the generated ARM template to recreate the Pipelines/Triggers/etc on a production Data Factory instance. Now I have added a few more things to the Data

azure template output publish profile content

早过忘川 提交于 2019-12-13 20:18:11
问题 I'm using an Azure Template to set up a web site. I would like it to output the contents of the publish profile so that I can automate the deploying. Is this possible? My current template looks something like this: { ... "resources": [ { "type": "Microsoft.Web/sites", "kind": "app", "name": "[variables('webapp').name]", "apiVersion": "[variables('webapp').version]", "location": "[variables('location')]", "tags": {}, "properties": { "serverFarmId": "[variables('webapp').serviceplan.name]",

ARM template deploying Diagnostics Settings does not enable Metrics logs

本秂侑毒 提交于 2019-12-13 04:01:54
问题 I'm using Azure RM Template deployments with a Visual Studio 2017 Resource Group project to deploy IoTHub instance with diagnostics settings in Log Analytics. The problem is with deployment of the Diagnostics Settings template and specifically with the AllMetrics category under the metrics property. I'm following the instructions for deploying Diagnostics Settings as Non-Compute resource template The deployment completes successfully, but this one { "type": "providers/diagnosticSettings",