{{- /* Get input parameters */ -}} {{ $useHeaderRow := .Get "header" }} {{ $featureMappingCsv := .Get "featureMappingCsv" }} {{ $featuresFile := readFile $featureMappingCsv }} {{ $featureRows := $featuresFile | transform.Unmarshal }} {{- /* Load BicepResourceModules.csv to get RepoURLs */ -}} {{ $modulesIndexCsv := .Get "modulesIndexCsv" }} {{ $modulesIndexFile := readFile $modulesIndexCsv }} {{ $moduleIndexRows := $modulesIndexFile | transform.Unmarshal }} {{ $modulesHeader := index $moduleIndexRows 0 }} {{ $moduleIndexData := after 1 $moduleIndexRows }} {{- /* Create a map of module names to RepoURLs for hyperlinking */ -}} {{- /* Key: module name (e.g., "avm/res/storage/storage-account"), Value: RepoURL */ -}} {{ $moduleUrlMap := dict }} {{ range $moduleIndexData }} {{ $moduleName := index . 4 }} {{- /* Column 4: ModuleName */ -}} {{ $repoUrl := index . 7 }} {{- /* Column 7: RepoURL */ -}} {{ $moduleUrlMap = merge $moduleUrlMap (dict $moduleName $repoUrl) }} {{ end }}
| {{- $header -}} | {{- end -}}||||
|---|---|---|---|---|
| {{- $header -}} | {{- end -}}||||
| {{- emojify $cell -}} | {{- else if eq $colIndex 0 -}} {{- /* Process # column (index 0) - right align */ -}}{{- emojify $cell -}} | {{- else if eq $colIndex 1 -}} {{- /* Process Module column (index 1) */ -}} {{- $moduleName := $cell -}} {{- /* Replace "res/" with "avm/res/" if not already prefixed */ -}} {{- if and (hasPrefix $moduleName "res/") (not (hasPrefix $moduleName "avm/res/")) -}} {{- $moduleName = replaceRE "^res/" "avm/res/" $moduleName -}} {{- end -}} {{- /* Create hyperlink if URL exists */ -}} {{- $url := index $moduleUrlMap $moduleName -}} {{- if $url -}}{{- emojify $moduleName -}} | {{- else -}}{{- emojify $moduleName -}} | {{- end -}} {{- else -}} {{- /* All other columns (checkmarks) - center align */ -}}{{- emojify $cell -}} | {{- end -}} {{- end -}}