Azure / bicep-registry-modules

Bicep registry modules
MIT License
474 stars 331 forks source link

[Feature Request]: Extend Microsoft.DesktopVirtualization/applicationgroups/applications module with missing properties #2425

Open eriqua opened 1 year ago

eriqua commented 1 year ago

Description

Extend Microsoft.DesktopVirtualization/applicationGroups module with missing properties.

In particular, investigate if missing msix properties can be added

Ref: https://learn.microsoft.com/en-us/azure/templates/microsoft.desktopvirtualization/2022-09-09/applicationgroups/applications?pivots=deployment-language-bicep

AlexanderSehr commented 3 months ago

Hey @moisesjgomez , I just migrated this issue over from CARML. Please take a look and triage if still relevant :)

AlexanderSehr commented 2 months ago

Hey @moisesjgomez , please take a moment to triage this issue if you can 💪

moisesjgomez commented 2 months ago

@AlexanderSehr Apologies for lack of update. I am working on making updates to this to include the parameters for applications, but having issues with the Set-AVMModule.ps1 file. First time getting this issue. This is the error:

InvalidOperation: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\tools\Set-AVMModule.ps1:91:9 Line | 91 | if (-not $SkipFileAndFolderSetup -and ((($resolvedPath -split '\b … | ~~~~~~~~~~~~~ | You cannot call a method on a null-valued expression. WARNING: " You're not using the latest available Bicep CLI version [0.28.1] but [0.24.24]. You can find the latest release at: https://github.com/Azure/bicep/releases/tag/v0.28.1.

On Windows, you can use winget to update the Bicep CLI by running 'winget update Microsoft.Bicep' or chocolatey via 'choco upgrade bicep'. For other OSs, please refer to the Bicep documentation (https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/install).

Note: The 'Bicep CLI' version (bicep --version) is not the same as the 'Azure CLI Bicep extension' version (az bicep version). " Building [avm//] Building [avm//] Building [avm//] Building [avm//] Building [avm//] C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\host-pool\main.bicep(192,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\scaling-plan\main.bicep(122,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\application-group\main.bicep(87,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. Generating readme for [avm//]
Generating readme for [avm//]
Generating readme for [avm//]
Generating readme for [avm//] Generating readme for [avm//] Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line |
1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string. Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject
| ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line |
1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string. Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string. Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string. Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line | 1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject | ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.

AlexanderSehr commented 2 months ago

@AlexanderSehr Apologies for lack of update. I am working on making updates to this to include the parameters for applications, but having issues with the Set-AVMModule.ps1 file. First time getting this issue. This is the error:

InvalidOperation: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\tools\Set-AVMModule.ps1:91:9 Line | 91 | if (-not $SkipFileAndFolderSetup -and ((($resolvedPath -split '\b … | (..)

Hey @moisesjgomez, would you hapen to be running the script on Linux or MacOS? If so, please pull the latest upstream changes as there has been a recent bugfix. Also, may I ask how you invocation looked like? It's unfortunately the only piece of information I cannot see in the stacktrace 😄

moisesjgomez commented 2 months ago

@AlexanderSehr I am running Windows through Parallels on a Mac. I had just pulled the changes right before running as I made the assumption I was missing an update but no luck. This is what I ran:

Set-AVMModule -ModuleFolderPath "C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization" -Recurse

AlexanderSehr commented 2 months ago

@AlexanderSehr I am running Windows through Parallels on a Mac. I had just pulled the changes right before running as I made the assumption I was missing an update but no luck. This is what I ran:

Set-AVMModule -ModuleFolderPath "C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization" -Recurse

ah dang ok. Because there was a bug with a path that is split differently on Linux & MacOS. Anyhow that then can't be the reason here. For the time being you can in any case run the script with the -SkipFileAndFolderSetup parameter which should ideally allow you to bypass the problamatic area.

It seems that in your case, this snippet (Resolve-Path $ModuleFolderPath).Path returns$null. Could you do me a the favour to run (Resolve-Path 'C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization').Path to see what you get?

moisesjgomez commented 2 months ago

@AlexanderSehr this is what I got after running the command:

Resolve-Path 'C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization'

Path

C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization

Also I tried running: Set-AVMModule -ModuleFolderPath "C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization" -Recurse -SkipFileAndFolderSetup

but got a bunch of errors still:

C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\scaling-plan\main.bicep(122,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\application-group\main.bicep(87,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. Generating readme for [avm//] Generating readme for [avm//] C:\Users\mgomezcortez\Documents\GitHub\ResourceModules\modules\desktop-virtualization\host-pool\main.bicep(192,9) : Warning BCP334: The provided value can have a length as small as 1 and may be too short to assign to a target with a configured minimum length of 3. Generating readme for [avm//] Generating readme for [avm//] Generating readme for [avm//] Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line |
1867 | $readMeFileContent = Initialize-ReadMe @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line |
1867 | $readMeFileContent = Initialize-ReadMe @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Initialize-ReadMe: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1867:44 Line | 1867 | $readMeFileContent = Initialize-ReadMe @inputObject | ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string. Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~ | Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-UsageExamplesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1892:55 Line |
1892 | $readMeFileContent = Set-UsageExamplesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.
Set-CrossReferencesSection: C:\Users\mgomezcortez\Documents\GitHub\bicep-registry-modules\avm\utilities\pipelines\sharedScripts\Set-ModuleReadMe.ps1:1926:57 Line |
1926 | $readMeFileContent = Set-CrossReferencesSection @inputObject
| ~~~~
| Cannot bind argument to parameter 'FullModuleIdentifier' because it is an empty string.

AlexanderSehr commented 2 months ago

Reaching out in chat to get the debugging train rolling 🚀