Azure / ALZ-Bicep

This repository contains the Azure Landing Zones (ALZ) Bicep modules that help deliver and deploy the Azure Landing Zone conceptual architecture in a modular approach. https://aka.ms/alz/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New-AzManagementGroupDeployment: Cannot retrieve the dynamic parameters for the cmdlet

tcorveleyn opened this issue · comments

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

I know you have an entry on this issue in your FAQ, but for me the suggested solution doesn't help.

Deploying the "alzDefaultPolicyAssignments.bicep" module, I get a bunch of errors pointing the linter configuration under \infra-as-code\bicep\bicepconfiguration.json.

Secondly, once passed the error messages on the linter, I receive error messages such as:

  • Error BCP280: Using a type declaration statement requires enabling EXPERIMENTAL feature "UserDefinedTypes".
  • Error BCP062: The referenced declaration with name "nonComplianceMessageType" is not valid.
  • and many more -> I can provide a full list if required.

Thirdly, while trying to grab the correlation ID, I noticed a bunch the alz-PolicyDefsDeployment failed with following error message (excerpt): "The policy set definition 'Deploy-MDFC-Config' request is invalid. Policy definitions should be specified only at or above the policy set definition's scope. The following policy definitions are invalid: 'Deploy-ASC-SecurityContacts'.
The policy set definition 'Deploy-Diagnostics-LogAnalytics' request is invalid. Policy definitions should be specified only at or above the policy set definition's scope. ".

Using the standard ALZ-Bicep repo (preparing for an ALZ deployment @customer), running it from my local VSC using PS7.1 and latest Bicep release.

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

fcb189b4-df86-42be-9115-4e22c7441490

What was the expected outcome?

No response

Relevant log output

No response

Check previous GitHub issues

  • I have searched the issues for this item and found no duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hi @tcorveleyn, could you please double-check your Bicep version? Looking at the first error you shared (BCP280), that would indicate to me you're using an older version than v0.24.24 as that was when User Defined Types were moved out of the experimental features list. The latest version is v0.25.53 and I believe this is why you're also getting those other lint errors.

Sounds like you're using PowerShell, so you'd want to run bicep --version. Otherwise, you can check the other potential versions by running az bicep version via the AZ CLI or via VS code by navigating to the extensions tab and searching for Bicep.

Once you update to the latest version, you should be good to go as I just re-ran a deployment on my end with the latest ALZ-Bicep release and didn't run into any of the lint errors you came across.

If you are still having issues after that, please feel free to re-open the issue!

Hello oZakari,

Thanks for your feedback. It turns out I had two versions of Bicep installed on my local machine. Uninstalling the old version using instructions from https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/installation-troubleshoot#multiple-versions-of-bicep-cli-installed helped me out. Now I'm using the latest Bicep version.

Regards,
Tomas.