Giter VIP home page Giter VIP logo

Comments (5)

alex-frankel avatar alex-frankel commented on July 19, 2024

What does the assignment file look like in this case? I don't think you should be specifying both the -Blueprint and -AssignmentFile parameters.

from azure-blueprints.

MattiasSjobom avatar MattiasSjobom commented on July 19, 2024

This is what's specified in the assignment file prior to "resourceGroups" and "parameters" section, used $sub and $bpname in the blueprintId for easier read. When removing the -Blueprint from above it's being prompted for (Blueprint:), when removing the blueprintId in the assignment file I get the following error: Set-AzBlueprintAssignment : Please specify a valid blueprintId to assign to this subscription.

{
"identity": {
"type": "SystemAssigned"
},
"location": "westeurope",
"properties": {
"description": "Assignment of mcs-subscription-bp",
"blueprintId": "/subscriptions/$sub/providers/Microsoft.Blueprint/blueprints/$bpname",
"locks": {
"mode": "none"

from azure-blueprints.

alex-frankel avatar alex-frankel commented on July 19, 2024

I think there may be an issue with the validation, but I think the issue is that the blueprint ID in the assignment file needs to include the version as well (should be returned by $bp.id. I am assuming that the -Blueprint is being ignored, even though we say it is required.

from azure-blueprints.

MattiasSjobom avatar MattiasSjobom commented on July 19, 2024

You are right Alex, adding the version to the end of the blueprint ID in the assignment file provides the desired result. From what I understand you cannot manipulate the strings in an assignment file by using variables, so the only thing I can think of is to create a new definition with a new version based on "old" code that can be assigned if needed. The use case is to re-run a old DevOps pipeline in case of roll-back scenario.

from azure-blueprints.

alex-frankel avatar alex-frankel commented on July 19, 2024

You are right that the assignment file is a simple JSON file with no support for expressions, so all values must be hardcoded. Going to close this issue for now, but feel free to continue the discussion.

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.