Code Monkey home page Code Monkey logo

build2017's People

Contributors

rjmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

build2017's Issues

copyIndex for datadisks not working?

Hi,

following https://azure.microsoft.com/en-gb/resources/videos/build-2017-azure-resource-manager-templates-life-after-first-deployment/ i was drawn here and tried the mechanism used in https://github.com/rjmax/Build2017/blob/master/Act1.TemplateEnhancements/Chapter02.PropertyCopies.json using copy to extend the storage-profile datadisks.

This however does not seem to work out for me:
statusCode:BadRequest statusMessage:{"error":{"code":"InvalidTemplate","message":"Unable to process template language expressions for resource 'XXX' at line '1' and column '2360'. 'The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.'"}}

"copy": [
{
"name": "dataDisks",
"count": "3",
"input": {
"diskSizeGB": "1000",
"lun": "[copyIndex('dataDisks')]",
"createOption": "Empty"
}
}
]

I set the api versions according to the one in the templates and i am running this in westeurope region.
Is there anything else needed to get this running?

Thanks and cheers

copyIndex for Property looping not working

Hi Team,

Seems CopyIndex for property looping is not working again.

Followed below MSDN docs
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple#property-iteration

similar issue was reported back in 2017

#2

Error

Unable to process template language expressions for resource '/subscriptions/746ac5b9-70eb-4c76-bdf4-0664bfdff2ea/resourceGroups/GRP-EU-IFM-SMA-RG12/providers/Microsoft.Web/sites/aziedt1xvu284/config/web' at line '155' and column '9'. 'The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified.

Parameter

"allowedCallerIpAddresses": {
"type": "array",
"defaultValue": [
{ "addressRange": "52.232.252.175/32" },
{ "addressRange": "52.236.71.198/32" },
{ "addressRange": "23.101.29.245/32" }
]
}

Resource Code
{
"apiVersion": "2018-02-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionsHost'))]",
"[resourceId('Microsoft.Web/sites/extensions', variables('functionsHost'), 'MSDeploy')]"
],
"name": "web",
"properties": {
"minTlsVersion": "1.2",
"copy": [
{
"name": "ipSecurityRestrictions",
"count": "[length(parameters('allowedCallerIpAddresses'))]",
"input": {
"ipAddress": "[parameters('allowedCallerIpAddresses')[copyIndex('ipSecurityRestrictions')].addressRange]",
"action": "Allow",
"tag": "Default",
"priority": "100",
"name": "[concat('APIM IPs-', copyIndex('ipSecurityRestrictions'))]",
"description": "Allowed APIM Access only"
}
}
]
},
"type": "config"
}

Note

ipSecurityRestrictions do work with single ip.

{
"type": "config",
"apiVersion": "2018-02-01",
"name": "web",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionsHost'))]",
"[resourceId('Microsoft.Web/sites/extensions', variables('functionsHost'), 'MSDeploy')]"
],
"properties": {
"minTlsVersion": "1.2",
"ipSecurityRestrictions": [
{
"ipAddress": "[parameters('allowedCallerIpAddresses')[0].addressRange]",
"action": "Allow",
"tag": "Default",
"priority": "100",
"name": "APIM IPs",
"description": "Allowed APIM Access only"
}
]
}
}

Thanks,
Subhash

ARM Template Conditions (Invalid Template)

Are conditions currently supported in any Azure regions? When i try to run the neworexisting conditional example in EastUS or EastUS2, I receive the following validation error (i noticed you deployed yours to eastus2eaup):

10:21:18 - 10:21:17 AM - Error: Code=InvalidRequestContent; Message=The request content was invalid and could not be deserialized: 'Could not find member 'condition' on object of type 'TemplateResource'. Path 'properties.template.resources[0].condition', line 78, position 23.'.
10:21:18 - The deployment validation failed

Cross ResourceGroup Role Assignment

Can i Manage Access Control for other resource Groups using the Cross Resource Group Feature? I am try to assign permission to an Azure AD Application to another resource group and it fails with the error

Role Assignment to a different ResourceGroup
{
"code": "BadRequest",
"message": "{\r\n "error": {\r\n "code": "InvalidCreateRoleAssignmentRequest",\r\n "message": "The request to create role assignment '449aad68-15ee-49aa
-6871-ee449aad6871' is not valid. Role assignment scope '/subscriptions/xxxxxxx-xxxx-cxxxx-xxxxx-xxxxxxxxxxxx/resourceGroups/CitrixCustomImage' must match the scope specified on the
URI '/subscriptions/xxxxxxx-xxxx-cxxxx-xxxxx-xxxxxxxxxxxx/resourcegroups/CitrixInfraRG38'."\r\n }\r\n}"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.