Skip to content

Custom staging resource group #40

Description

Specifying a custom staging resource group as per the example in the documentation does not appear to work and there appears to be no clear way to troubleshoot why.

"stagingResourceGroup": "/subscriptions//resourceGroups/",

image

The process should create the resource group and use it automatically, if the naming convention does not go against the standard resource group naming convention, but that does not appear to be the case.

Even if you create the resource group separately ahead of time, the process does not like it and creates its own IT_xxx resource group.

Activity

  1. dan-dimitrov commented on Sep 15, 2022

    @dan-dimitrov
    Author

    An example JSON (saved in plain text) is the following...
    example.txt

  2. AAdamCCox commented on Sep 16, 2022

    @AAdamCCox

    Dan Dimitrov (@dan-dimitrov) MS support acknowledged this bug a few weeks ago in a ticket I raised, email quote from the support rep:

    • Your pre-defined staging RG was not showing on your image build template.
    • We tried various options to rebuild the template based on Microsoft guidelines, but still the pre-defined staging RG was been changed to default.
    • I escalated this after several attempts to our Product Team.
    • They responded by letting us know that Az.ImageBuilder 0.2.0 module seems not to be updated with the right API for the operation.
    • They recommended that to mitigate issue, you have to use `"New Az-Resource" and specifying 2022 API version.
    • You responded by letting me know the recommendation did not work, rather you used a different parameter which fixed the issue. ( New-AzResourceGroupDeployment in the way described here: https://stackoverflow.com/a/58227364)

    I came across the bug on 6th July.
    The workaround I used successfully was New-AzResourceGroupDeployment -TemplateFile with a JSON template like the following one (< values > to be replaced with your own): ImageTemplateWin.json.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions