Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy-custom-image.bicep trying to install older Az.Accounts module #702

Open
ThojoUno opened this issue Nov 4, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@ThojoUno
Copy link

ThojoUno commented Nov 4, 2024

What happened? Provide a clear and concise description of the bug, including deployment details.

deploy-custom-image.bicep tries to load Az.Accounts version 2.12.1 when default module version in automation account is already version 2.15.

{
    name: 'Az.Accounts'
    uri: 'https://www.powershellgallery.com/api/v2/package'
    version: '2.12.1'
}

Please provide the correlation id associated with your error or bug.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

What was the expected outcome?

This shows a working change I made to deploy-custom-image.bicep template

var varModules = [
// {
// name: 'Az.Accounts'
// uri: 'https://www.powershellgallery.com/api/v2/package'
// version: '2.12'.1
// }
{
name: 'Az.ImageBuilder'
uri: 'https://www.powershellgallery.com/api/v2/package'
version: '0.4.0'
}
]

Relevant log output

No response

@ThojoUno ThojoUno added the bug Something isn't working label Nov 4, 2024
@jamasten
Copy link
Contributor

jamasten commented Nov 4, 2024

@ThojoUno Within AZ modules, there is always varying compatibility with Az.Accounts. Sometimes a new version of Az.Accounts will be released that requires other modules to be updated which doesn't always happen at the pace we would like. Hardcoding the version of Az.Accounts prevents issues when a breaking change is released in the module. Did you experience any issues using module '2.12.1' for Az.Accounts? We can update the version to latest you used but we must include this module in the code to prevent the solution from breaking.

@ThojoUno
Copy link
Author

ThojoUno commented Nov 4, 2024

Problem seems to be when this module tries to revert from v2.15 to v2.12. It just hangs at this step. It works with 2.15, which is the current module version in AA. Maybe just hard code at 2.15 for now

@ThojoUno
Copy link
Author

ThojoUno commented Nov 4, 2024

There is a later version of ImageBuilder, but it requires v2.19 or higher of Az.account, so I changed to v4.0 so it didn't require an Az.account module upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants