arm-template

How to authenticate an Azure EventGrid API Connection using a script?

房东的猫 提交于 2020-05-28 06:12:48
问题 I am creating an EventGrid API Connection using an ARM Template. It gets created successfully, however, i still have to authenticate it by hand via Azure Portal. Here is my ARM Template: "resources": [ { "type": "Microsoft.Web/connections", "apiVersion": "2016-06-01", "name": "[parameters('azureEventGridConnectionAPIName')]", "location": "[resourceGroup().location]", "properties": { "api": { "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', resourceGroup().location, '

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

How to test linked ARM templates?

喜欢而已 提交于 2020-03-04 18:33:30
问题 My ARM template is getting too big so I would like to use linked templates. I understand that templates need to be somewhere where they are accessible to ARM. But I should be able to test them somehow before I upload them to target location. Otherwise there is a risk that I override previously working templates with invalid ones. How do I revert then? How do you do it? 回答1: Here's what works for me. I have a pipeline that deploys the template from the Azure Devops repo. The pipeline deploys

Trouble formatting valid JObject for .WithParameters() when deploying new Azure VM from ARM Template

人盡茶涼 提交于 2020-02-29 05:49:24
问题 Currently I'm having trouble with deploying an Azure VM from an ARM template using an Azure Function which is written in C#, whilst using a JObject, from the Newjonsoft.Json,Linq library, to provide parameters for the new VM. The JObject.FromObject() method formulates parameters in the format "{"paramName": "paramValue"}" , however I believe that it needs to be formulated as "{"paramName": { "value": "paramValue"} . I'm not sure if 'contentVersion' and '$schema' ARM Template parameters also

RequireNonce is 'true' (default) but validationContext.Nonce is null in Azure Traffic Manager , OpenIdConnectAuthentication

一世执手 提交于 2020-01-24 23:32:51
问题 I have my website(Azure App Service) deployed in two regions under Microsoft Azure . https://abcd1-westus.azurewebsites.net/ https://abcd2-centralus.azurewebsites.net/ I created a Traffic Manager Profile to control the distribution of user traffic for service endpoints. The DNS Name of Traffic Manager Profile is "http://abcd.trafficmanager.net" Authentication is done by Azure AD . Once we are trying to access Traffic Manager DNS Url , it prompts for AAD login and redirect to https://abcd2

RequireNonce is 'true' (default) but validationContext.Nonce is null in Azure Traffic Manager , OpenIdConnectAuthentication

只愿长相守 提交于 2020-01-24 23:31:07
问题 I have my website(Azure App Service) deployed in two regions under Microsoft Azure . https://abcd1-westus.azurewebsites.net/ https://abcd2-centralus.azurewebsites.net/ I created a Traffic Manager Profile to control the distribution of user traffic for service endpoints. The DNS Name of Traffic Manager Profile is "http://abcd.trafficmanager.net" Authentication is done by Azure AD . Once we are trying to access Traffic Manager DNS Url , it prompts for AAD login and redirect to https://abcd2

ARM Template: Looking up a user object Id

人盡茶涼 提交于 2020-01-14 13:38:40
问题 I'm trying to programatically insert the object Id of a certain user account into an ARM template, like this: "objectId": "[reference(resourceId('Microsoft.AAD/domainServices/user/read','domain','User.Name'),'2019-01-01').Id]", I've tried many different resource providers in an attempt to get this to work. For example: "objectId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities/read','user@domain.onmicrosoft.com'),'2019-01-01').Id]", and: "objectId": "[reference

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.

Key vault values from deployment, and linked templates parameters

荒凉一梦 提交于 2020-01-04 04:35:30
问题 I have a template to create a key vault and a secret within it. I also have a service fabric template, that requires 3 things from the key vault: the Vault URI, the certificate URL, and the certificate thumbprint. If I create the key vault and secret with powershell, it is easy to manually copy these 3 things from the output, and paste them into the parameters of the service fabric template. However, what I am hoping to do, due to the fact that this cert has the same life cycle as the service

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

北慕城南 提交于 2020-01-03 19:17:28
问题 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",