Skip to content

Commit

Permalink
fix: Fixed resolution of local file references ignoring files not nam…
Browse files Browse the repository at this point in the history
…ed `main.bicep` (#766)

## Description

- Fixed resolution of local file references ignoring files not named
`main.bicep`
- [x] TODO: Re-run on all modules and after #717 is merged

Successful test with to-be VM module:

![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/5913af24-cb01-4f03-983c-0b81b864b4f8)

---------

Co-authored-by: Erika Gressi <[email protected]>
  • Loading branch information
AlexanderSehr and eriqua authored Jan 12, 2024
1 parent 84dcfe9 commit bbd09c9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 0 additions & 4 deletions avm/res/compute/proximity-placement-group/ORPHANED.md

This file was deleted.

5 changes: 0 additions & 5 deletions avm/res/compute/proximity-placement-group/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Proximity Placement Groups `[Microsoft.Compute/proximityPlacementGroups]`

> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️
>
> - Only security and bug fixes are being handled by the AVM core team at present.
> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)!
This module deploys a Proximity Placement Group.

## Navigation
Expand Down
7 changes: 6 additions & 1 deletion avm/res/compute/virtual-machine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2621,7 +2621,12 @@ Do not provide a value! This date value is used to generate a registration token

## Cross-referenced modules

_None_
This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).

| Reference | Type |
| :-- | :-- |
| `br/public:avm/res/network/network-interface:0.2.2` | Remote reference |
| `br/public:avm/res/network/public-ip-address:0.2.1` | Remote reference |

## Data Collection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ function Get-CrossReferencedModuleList {
$resultSet = [ordered]@{}

# Collect data
$moduleTemplatePaths = (Get-ChildItem -Path $path -Recurse -File -Filter 'main.bicep').FullName
$moduleTemplatePaths = (Get-ChildItem -Path $path -Recurse -File -Filter '*.bicep').FullName | Where-Object {
# No files inthe [/utilities/tools/] folder and none in the [/tests/] folder
$_ -notmatch '.*[\\|\/]tools[\\|\/].*|.*[\\|\/]tests[\\|\/].*'
} | Sort-Object
$templateMap = @{}
foreach ($moduleTemplatePath in $moduleTemplatePaths) {
$templateMap[$moduleTemplatePath] = Get-Content -Path $moduleTemplatePath
Expand Down

0 comments on commit bbd09c9

Please sign in to comment.