Giter VIP home page Giter VIP logo

Comments (3)

DennisR73 avatar DennisR73 commented on August 18, 2024

+1

from azure-blueprints.

alex-frankel avatar alex-frankel commented on August 18, 2024

I don't think we support object parameters. I think the tag values need to be passed individually. Have you tried that?

from azure-blueprints.

felipebbc avatar felipebbc commented on August 18, 2024

Hi @pkhabazi
The reason I believe you are getting the error message 'Error converting value "[parameters('tags')]" to type 'System.Collections.Generic.IDictionary`2[System.String,System.String]' is because the "[parameters('tags')]" expression within the resourceGroups section does not actually get substituted with the "tags" object you defined in the parameters section. The ARM interpreter is passing a literal string "[parameters('tags')]" to the function that attempts conversion to a System.Collections.Generic.IDictionary<String,String> object and that is why it fails.

So in your first example, you are actually trying to pass a string to the tags element while it is expecting an object. In your second example, you are passing an object. Keep in mind that in the second example, the "[parameters('tagsvalue')]" string is also not getting replaced with "value1" when you run the Import-AzBlueprintWithArtifact command. It just sets the value of the "Tags1" key to the "[parameters('tagsvalue')]" string.

VS Code's syntax highlighting for ARM templates is misleading in this case. The color coding for the "[parameters('tags')]" expression in the resourceGroups section should be represented in the standard red denoting a string.

from azure-blueprints.

Related Issues (20)

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.