azure-resource-manager

Azure ARM uniqueString function mimic

孤街醉人 提交于 2021-02-18 07:36:50
问题 I need to deploy Sql Databases into an Azure Sql Server using to ways: the ARM template way, and a more custom way using C# code. There's a ARM template function called uniqueString(string) that generate a pseudo random hash of a given string. It's a deterministic pure function. I need to find a way to exactly mimic the behaviour of this function from my C# code. ie I need to reproduce this function into my C# code. Where can i find the algorithm used by the ARM Api ? MSDN reference for

Azure ARM uniqueString function mimic

一世执手 提交于 2021-02-18 07:36:18
问题 I need to deploy Sql Databases into an Azure Sql Server using to ways: the ARM template way, and a more custom way using C# code. There's a ARM template function called uniqueString(string) that generate a pseudo random hash of a given string. It's a deterministic pure function. I need to find a way to exactly mimic the behaviour of this function from my C# code. ie I need to reproduce this function into my C# code. Where can i find the algorithm used by the ARM Api ? MSDN reference for

How to get Principal Id in app service using Arm template?

只愿长相守 提交于 2021-02-11 12:28:58
问题 Hi I am writing ARM templates to deploy my app service. I want to create system identity in my arm template. In app service arm template section I have below code. "identity": { "principalId": "[reference(variables('identity_resource_id'), '2017-12-01', 'Full').identity.principalId]", "tenantId": "[parameters('tenantId')]", "type": "SystemAssigned" } Then in variable section I added "appServiceNameFrontEnd": "[concat(variables('defaultConvention'),'03-','FrontEnd')]" "identity_resource_id": "

How to pass an Azure pipeline variable to an ARM template used by AzureResourceManagerTemplateDeployment@3 task?

旧城冷巷雨未停 提交于 2021-02-11 08:08:03
问题 I am trying to perform the following 2 steps in my Azure pipeline scheduled for every night: Put a self-signed cert into a keyvault Deploy Service Fabric cluster via ARM template and use the cert thumbprint and secret id as params. The first step of creating the certificate in the keyvault works well for me: # import the self-signed certificate ccg-self-signed-cert into the Keyvault - task: AzurePowerShell@5 inputs: azureSubscription: '${{ parameters.ArmConnection }}' ScriptType:

Stream Analytics Job deployed as Azure Resource Manager (ARM) template

瘦欲@ 提交于 2021-02-10 18:49:29
问题 I am trying to setup an output EventHub for a Stream Analytics Job defined as a JSON template. Without the output bit the template is successfully deployed, however when adding the output definition it fails with: Deployment failed. Correlation ID: <SOME_UUID>. { "code": "BadRequest", "message": "The JSON provided in the request body is invalid. Property 'eventHubName' value 'parameters('eh_name')' is not acceptable.", "details": { "code": "400", "message": "The JSON provided in the request

How to add extra files to the package that is generated by msbuild called by an Azure Resource Group Project in Visual Studio

无人久伴 提交于 2021-02-10 06:46:44
问题 So I have a solution made up of a web project and an Azure Resource Group project much like what is described here: https://blogs.technet.microsoft.com/georgewallace/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups/ The issue I am having is that the web project needs to include some EXTRA files in its bin directory in order to function. Now through the normal package process on the web project itself I accomplish this by adding a custom target and hook

How to add extra files to the package that is generated by msbuild called by an Azure Resource Group Project in Visual Studio

帅比萌擦擦* 提交于 2021-02-10 06:46:04
问题 So I have a solution made up of a web project and an Azure Resource Group project much like what is described here: https://blogs.technet.microsoft.com/georgewallace/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups/ The issue I am having is that the web project needs to include some EXTRA files in its bin directory in order to function. Now through the normal package process on the web project itself I accomplish this by adding a custom target and hook

How to convert country names to ISO 3166-1 alpha-2 values in arm template

筅森魡賤 提交于 2021-02-08 11:42:49
问题 I have an ARM-template and I would like convert country name like "United States" and I would like to get the ISO 3166-1 alpha 2 code like "US". This converted value I would use for name of resource group. I tryed use condicion "if", but this options i can use in case when Parametr "CountryString" contains only two country. I am not able to find solutions for parameter "CountryObject" which contains more than two country. Is there a way to do this? { "$schema": "https://schema.management

RBAC assignment via ARM template errors out with InvalidCreateRoleAssignmentRequest

久未见 提交于 2021-02-08 10:22:43
问题 My template is below along with an error which does not make sense since scope seems to be in correct order and it's allowed to use this notation per (https://docs.microsoft.com/en-us/rest/api/authorization/roleassignments/create) { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2017-05-01", "name": "[ guid(resourceGroup().id, 'windowsserverstorage')]", "dependsOn": ["[variables('storageaccountname')]"], "properties": { "roleDefinitionId": "[variables('Contributor')]",

How can I troubleshoot Azure ARM template validation errors?

♀尐吖头ヾ 提交于 2021-02-06 09:40:54
问题 I have made some small changes to an Azure ARM template file and now when I try to deploy or validate via the xplat cli I get this message. error: InvalidTemplateDeployment : The template deployment 'fakedDeploymentName' is not valid according to the validation procedure. The tracking id is '\some kind of GUID here\'. See inner errors for details. Please see http://aka.ms/arm-deploy for usage details. error: PreflightValidationCheckFailed : Preflight validation failed. Please refer to the