arm-template

Azure Resource Manager: How to specify optional parameters in linked templates

倾然丶 夕夏残阳落幕 提交于 2020-01-03 19:16:46
问题 I'm making use of linked templates to deploy common resources. In this case I'm deploying a VM which has an optional parameter defined AdminPassword that is only required in certain scenarios (namely when the parameter PasswordAuthenticationDisabled is set to false ): "parameters": { "AdminPassword": { "type": "securestring", "defaultValue": null, "metadata": { "description": "Password when password-based authentication isn't disabled" } }, "PasswordAuthenticationDisabled": { "type": "bool",

Azure: Assign Roles via ARM Template to storage container

扶醉桌前 提交于 2020-01-02 10:21:40
问题 I'm trying to assign the role "Storage Blob Data Contributor (Preview)" to a specific storage container via arm template. But I just can't figure out the correct syntax. This is what I have: { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "principalId": { "type": "string", "metadata": { "description": "The principal to assign the role to" } }, "builtInRoleType": { "type": "string", "allowedValues": [

Issue with KeyVault reference in ARM template

流过昼夜 提交于 2019-12-31 02:54:07
问题 I am trying to create a master key vault, which will contain all certificates to authenticate as a certain user. I have 2 service principals => One for my app, One for deployment. The idea is that the deploy service principal gets access to the Key Vault and adds the certificate located there to the Store of the web applications. I have created the service principal and I have given him all permissions on the key vault. Also I have enabled access secrets in ARM templates for that key vault.

Deploying a logic app using ARM templates/powershell

送分小仙女□ 提交于 2019-12-30 11:18:10
问题 How can I Deploy a logic app that calls a SQL DB stored procedure? I've tried the following action. "actions": { "Execute_stored_procedure": { "conditions": [ ], "inputs": { "body": null, "host": { "api": { "runtimeUrl": "https://logic-apis-northcentralus.azure-apim.net/apim/sql" }, "connection": { "name": "<sql connection string>" } }, "method": "post", "path": "/datasets/default/procedures/@{encodeURIComponent(encodeURIComponent(string('<stored-procedure-name>')))}" }, "type":

How to create a new resource in Azure ARM templates?

坚强是说给别人听的谎言 提交于 2019-12-25 08:29:45
问题 Ok, I've done everything what described here with ARM template - https://azure.microsoft.com/en-us/documentation/articles/web-sites-integrate-with-vnet. Except one thing - Enabling VNET Integration with a pre-existing VNET. Can this be done in ARM templates? Thanks! 回答1: Here is a sample template that might help you. It's modified from this quickstart sample in GitHub { "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0",

How to hide password in shell script duing ARM template deployment

拟墨画扇 提交于 2019-12-25 05:09:54
问题 I am using ARM template to deploy Azure VM. template.json "adminPassword": { "type": "securestring" } parameters.json "adminPassword": { "value": null } When I use "null" in parameters, It will ask me enter password during deployment. When I enter the adminPassword during deployment, it is showing as plaintext, But I want it to hidden (such as ******) How can I achieve this? 回答1: As 4c74356b41 said, currently, there is no way to do it directly. You could use Azure Key Vault to avoid the

powershell “ConvertTo-Json” has messed json format output

隐身守侯 提交于 2019-12-25 03:39:38
问题 1) $Getjsonfilecontent = Get-Content "C:\Scripts\CreateADF-Datasets\BUSI_RULE_BUILD_LOCATION_CODES_Source_Def.json" -Raw | ConvertFrom-Json 2) Append some key pair values to the json file 3) $Getjsonfilecontent | ConvertTo-Json -Depth 100 | % { [System.Text.RegularExpressions.Regex]::Unescape($_) } | set-content $Updatedleafjsonpath (Updatedleafjsonpath is a copy of base file 'Getjsonfilecontent') when i do this, am seeing some format is messed from "$Updatedleafjsonpath" as shown below. All

Retrieve FQDN of Azure SQL from a linkted template

我们两清 提交于 2019-12-25 01:56:08
问题 I'm looking for a valid property to retrieve FQDN of a managed Azure SQL server from a deployment of linked template. The one below seems not to be valid [reference(variables('sqlDeployment')).outputs.fullyQualifiedDomainName.value]" and where can I find all supported parameters? It seems to be challenging to find enough info from Microsoft Docs. 回答1: Looks like your linked template did not have an output property named as 'fullyQualifiedDomainName'. To get an output value from a linked

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

Cannot deserialize JSON array into type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Templates.Schema.TemplateResourceCopy'

妖精的绣舞 提交于 2019-12-24 10:45:29
问题 The aim of the template is to add subnets to an existing Vnet but when executing it using the powershell command New-AzureRmResourceGroupDeployment -Name testing -ResourceGroupName rgname -TemplateFile C:\Test\deploy.json -TemplateParameterFile C:\Test\parameterfile.json The following error is displayed and I really cant understand what it means.Here is the error * "Error: Code=InvalidRequestContent; Message=The request content was invalid and could not be deserialized: 'Cannot populate JSON