Skip to content

Commit

Permalink
Push updated Readme file(s)
Browse files Browse the repository at this point in the history
[AVM] Updated Readme's to support AVM transition - Part (2) (Azure#4073)

[AVM] Updated Readme's to support AVM transition - Part (1) (Azure#4072)

[AVM] Updated Readme's to support AVM transition - Part (3) (Azure#4080)

* Updated desktop virtualization host and scaling plan

* Updated Digital Twins

* Updated event grid

* Updated event hubs

* Healthcare APIs

* Updated healthcare APIs

* updated action groups

* activity log alert

* insights activity log attempt v2

* Updated metric Alert

* document db 1

* Updated cosmos db

[AVM] Updated Readme's to support AVM transition - Part (-1)  (Azure#4077)

* Rollback of unrelated changes

* Rollback of unrelated changes

* Update to latest

* Update to latest

* Update to latest

* Serverfarm

* host env

* IT

* Synapse key

* Storage ManagePolicy

* Storage

* Update to latest

* SQL

* SQL MI

* Web pub sub

* Update to latest

* Namepsace

* Security

* Update to latest

* Regen readmes

[AVM] Updated Readme's to support AVM transition - Part (-2) (Azure#4078)

* rg

* ds

* Recovery Vault

* policy

* Workspace

* von

* vpn gw

* vn gw

* Update to latest

* VNET

* Hub connection

* traffigmanager

* Routes

* Private Link Service

* Regen readmes

* Compiled template

 [AVM] Updated Readme's to support AVM transition - Part (-3)  (Azure#4079)

* PE

* dns zone

* network manager

* network manager

* NIC

* LB

* dns resolver

* connection

* Bastion Host

* Firewall

* MgmtGroup

* Lighthouse

* Maintenance Config

* ML

* LA

* kube

* Secret

* kvlt

* Regen readmes

* Compiled templates

[Modules] Updated Event Hub - Recompiled JSON files (Azure#4081)

[Modules] Updated Network Manager JSON Files and Readmes (Azure#4082)

[Modules] Removed auto-generated parameter usage sections (Azure#4083)

* Removed readme sources

* Removed role assignments

* Removed tags

* Removed PE

* Removed manage identity

* excess newlines

* Removed remaining occurences

* Cleanup notes

* Finalizing touches

Push updated API Specs file

Made metadata removal ready for UDT (Azure#4090)

[Modules] Updated banner & added `MOVED-TO-AVM.md` files (Azure#4097)

* Updated banner

* Updated banner and added moved files

* Updated link

* Update README.md

Co-authored-by: Erika Gressi <[email protected]>

* Added moved to SSH

---------

Co-authored-by: Erika Gressi <[email protected]>

[Utilities] Introduced `Set-Module` script (Azure#4067)

* Moved diverse scripts around and updated them to latest AVM

* Moved further scripts

* Small fix

* Further fixes

* Several improvements and fixes

* Private registry specific pdates

* Updated docs

* Updated path

* Renamed function

* Ran generation for KVLT to enable testing of pipeline

* Updated & reduced tests where it made sense

* Fixed pester tests

* Moved cross-ref script back to tools

* Moved local-ref script back to pipes

* Fixed ref

* Fixed ref

* Fixed ref

* Fixed ref

* Push updated Readme file(s)

* Rollback test changes

* Updated test file overview markdown via scrip

* Roll KVLT back post updates

* Updated AAD considerations

* Removed default headers

* Update to latest

* Enabled notes

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Remvoed notes feature

* ReadMe rollback (as handled in different PR)

* Added latest improvements

* Updated readme script to ONLY allow notes and delete all else

* Added support for top-level diff

* Updated logic that detects notes

* Update to latest

* Added should process

* Added cross ref cache

* Small fix

* Fixed script refs

* Another fix

* Improve Cross ref runtime

* Update to latest

* Update docs/wiki/Contribution guide - Generate module readme.md

Co-authored-by: Ahmad Abdalla <[email protected]>

* Update docs/wiki/Contribution guide - Generate module readme.md

Co-authored-by: Ahmad Abdalla <[email protected]>

* Added docs

* Ajusted usage examples header

* Renamed header

* Regenerated modules 1-60  (Azure#4084)

* Regenerated first 60 files

* Small fixes

* Fixed templates

* Regen

* Renamed header

* Regenerated modules 61-120 (Azure#4085)

* Regen readmes 2

* Fixed script refs

* Fixed templates

* Regen

* Renamed header

* Regenerated modules 121-180 (Azure#4086)

* Regen readmes 3

* Fixed templates

* Regen

* Renamed header

* Regenerated modules 181-240 (Azure#4087)

* Regen readmes 4

* Fixed templates

* Regen

* Renamed header

* Regenerated modules 300-366 (Azure#4089)

* Regen readmes 6

* Fixed templates

* Small update

* Regen

* Renamed header

* Regenerated modules 241-300 (Azure#4088)

* Regen readmes 5

* Fixed templates

* Regen

* Renamed header

* Updated readme script

* Updated usage example description

* [Utilities] Enabled progress bar on module update & depth param (Azure#4098)

* Tested logic & added depth param

* Added finally block

* Enabled cancel

* ReadMe fallback

* Added docs

* Added silent continue on finally for non-cancel

* Update utilities/tools/Set-Module.ps1

Co-authored-by: Ahmad Abdalla <[email protected]>

---------

Co-authored-by: Ahmad Abdalla <[email protected]>

* Cross ref fix

* Update to latest

* Added verbosity

* Added verbosity

* Update to latest

* Adjusted syntax

* Adjusted syntax

* Adjusted verbosity

* Added force

* Cleanup

---------

Co-authored-by: CARMLPipelinePrincipal <[email protected]>
Co-authored-by: Ahmad Abdalla <[email protected]>

[Modules] Update the SQL - Server module API version to the latest documented version (Azure#4102)

* [Modules] Updated SQL Server API to latest documented

* jsons

* updated readme

[Modules] Updated AKS Module API Version (Azure#4103)

* added config

* updated JSON files

[Modules] Updated App Configuration Module to use the latest APIs and added support for CMK (Azure#4105)

* [Modules] Updated App Configuration Module API Version and added CMK

* Updated Tests

* Updated

* Updated module

Push updated Readme file(s)

[Modules] Updated SQL Managed Instance module API Version (Azure#4104)

[Modules/Utilities] Migrated PE from AVM + enabled UDT for nested resources (Azure#4109)

* Migrated PE from AVM + enabled UDT for nested resources

* Re-added version.json

* Updated PE ref

* Updated more tests and added rule suppresion

* Updated remaining tests

* Moved paths

* Regenerated all readmes

* Small lock update

* Adjusted how hash is detected

* Update to latest

* Added removed telemetry

* Update to latest

Push updated Readme file(s)

Updated dns references (Azure#4119)

[Modules] Updated locks to UDT as per AVM specs (Azure#4112)

* Updated locks & implementation. Parameter and UDT pending

* Replaced param

* Added UDT

* Small fix

* Fixed diverse templates

* Refreshed json

* Fixed bicep templates

* Further fixes

* Updated PE lock

* File regen

* small api fixes

* Fix for healthcare lock

* Fixed power BI lock

* Fixed insights data collection

* Updated RG

* Fixed lock passthru on several instances

* Adjusted scope

* Adjusted cmk for service bus ns

* Updated ref

* Updated cmk with udt workaround

* Updated storage

* Updated cmk

* Fixed readme

* Updated cmk for app-config

* Updated cmk for batch

* Updated cmk for cognitive

* Updated cmk for container instance

* Updated logs for data collection

* Updated cmk for auto

* Updated batch pe test

* Updated cog ser json

* Updated VM

* Container group refresh

* Updated reg

* Updated managed service

* Updated databricks

* Udated data factory

* Fixed msi ref

* Fixed script ref & cog

* Fixed cotainer reg

* Atempted to fix managed-cluster

* Try & fix new key treating in databricks

* Updated db-for

* Updated log for digital twin

* Updated ML

* Update synapse

* Updated databricks to work around new bicep limitation

* Updated KVLT + Purview

* Added batch to security center to how to fix update bug

* Added write host for readme in case of diff for troubleshooting

* Rollback

Push updated Readme file(s)

[Modules] Migrated batch [1/4] to AVM RBAC (Azure#4125)

* Updated first badge of templates (readmes pending)

* Update to latest

* Compiled templates

* Compiled templates

* Compiled first few readmes

* Updated test files

* Updated readmes

* Reduced roles

* Updated templates

* Rollback different branches' changes

* Updated nic & pip

* Fixed test file

* Refreshed vm

Push updated Readme file(s)

Push updated API Specs file

[CI environment] Add nameprefix to rg test names  (Azure#4130)

* rename rg

* add nameprefix

* add nameprefix tags

[Modules] Migrated batch [2/4] to AVM RBAC (Azure#4126)

* Updated templates

* Filtered rules & regen templates

* Small changes to kvlt

* added missing scopes

* Refreshed templates

* Added missing scope

* Refrehsed health api & bot

* Updated templates

Push updated Readme file(s)

[Fixes] Removed redundant empty lines in test files (Azure#4133)

* Updated first badge of templates (readmes pending)

* Update to latest

* Compiled templates

* Compiled templates

* Compiled first few readmes

* Updated test files

* Updated readmes

* Reduced roles

* Updated templates

* Rollback different branches' changes

* Updated nic & pip

* Fixed test file

* Refreshed vm

* Remvoed empty rows

* Update to latest

[Modules] Migrated batch [3/4] to AVM RBAC (Azure#4127)

* Generated content for batch 3

* Updated roles

* Update to latest

* Update to latest

* Updated bastion

* Regen firewall template

* Remvoed empty rows

Push updated Readme file(s)

[Utilities] Implemented several improvments for readme script (Azure#4134)

* First readme update

* tested changes

* Remvoed file deletion

* Added URL test retry

* Added support for orphaned & moved readmes

* Ran readme utility

[Modules] Migrated batch [4/4] to AVM RBAC (Azure#4132)

* Updated PowerBI to convention

* Update to latest

* Updated templates

* Reduced roles

* Regen templates

* Updated Operational Insights roles

* Update to latest

* Removed redundant newline

* Updated readmes

* Regenerated templates

* Update to latest

* Fixed SQL-MI db lock

* Fixed web site slot lock

* Update to latest

* Removed redundant empty line

* Adjusted cmk for synapse workspace

* Fallback

Push updated Readme file(s)

[Modules] Updated App Service Plan API to 2022-09-01 (Azure#4143)

* [Modules] Updated App Service Plans API Version

* updated plans

* Updated JSON and README

* Set reserved to conditional

Push updated Readme file(s)

[Modules] Hotfix for the App Service Plan module to fix the conditional parameter description (Azure#4144)

* Quick fix to the App Service Plan Module

* Updated parameter description

[Modules] Updated PE schema to AVM specs (Azure#4147)

* Updated templates

* Update to latest

* Regenerated templates

* Updated readmes

* Applied fixes & regen

Push updated Readme file(s)

[Modules] Uplifted the SQL Server - Vulnerability Assessment child module to support Storage RBAC (Azure#4145)

* [Modules] Uplifted the Vulnerability Assessment child module for SQL to align with SQL MI

* updated readme

* Updated dependencies to remove MI Principal ID, not needed

Push updated Readme file(s)

[Modules] Updated Diagnostic Settings to AVM Specs (Azure#4154)

* Updated main templates

* Updated most test files

* Update to latest

* Updated templates, compiled jsons, updated readmes

* Missing update

* Fixed SQL MI

* Fixed SQL Server

* Workaround for diag

Push updated Readme file(s)

Push updated API Specs file

[Module] Added Microsoft.App/jobs (Azure#4156)

* Module App Container Job

* add pipelines

* temp trigger for new module validation

* fix file endings

* trigger test

* fixed parameter descriptions

* update description in main.json

* update readme

* trigger validation

* fix line ending

* trigger validation

* fix workload profile

* add workload profile test

* update readme

* reduce test serviceShort

* fix test

* fix dependency

* Prepare PR

* Fix spelling of ID

* Resolved review topics

* added new managed identities method

Push updated Readme file(s)

[Modules] Updating Moved-to-avm.md on Migrated Modules (Azure#4164)

* Adding Moved-to-AVM.md

* updated readme

Added MOVED-TO-AVM files (Azure#4165)

[Modules] Updated identities to UDT as per AVM specs - Batch 1 (Azure#4124)

* Updated API Management module

* Updated Container App module

* Updating Configuration Store module (ongoing)

* Updated Configuration Store module

* Updated Automation Account module

* Comment headers formatted

* Readme/ARM for first four modules

* Updated Batch Account module

* Fixed parameter descriptions

* Updated Readme and ARM

* Updated Redis Cache module

* Container App - Fixed parameter descriptions

* Updated Cognitive Services module

* Updated VMSS module

* Updated Container Group module

* Updated Container Registry module

* Updated Data Factory module

* Updated Event Grid / System Topic module

* Updated EventHub Namespace module

* [Modules] Resolved conflicts (Azure#4129)

* [Modules] Migrated batch [1/4] to AVM RBAC (Azure#4125)

* Updated first badge of templates (readmes pending)

* Update to latest

* Compiled templates

* Compiled templates

* Compiled first few readmes

* Updated test files

* Updated readmes

* Reduced roles

* Updated templates

* Rollback different branches' changes

* Updated nic & pip

* Fixed test file

* Refreshed vm

* Push updated Readme file(s)

* Updated templates

* Updated templates

---------

Co-authored-by: CARMLPipelinePrincipal <[email protected]>

* Clean-up, some fixes

* Removed Azure Firewall changes from branch

* Update API common test file

* Update API common test file2

* Updated Recovery Services Vault module

* Updated ServiceBus Namespace module

* Updated SQL Managed Instance module

* Updated SQL Server module

* Updated Static Website module

* Updated Web Site module

* Updated website slot readme/arm

* Redis Cache - Testing with two identities

* Configuration Store module - Testing with two identities

* Updated Signal-R WebPub Sub module

* Updated Barch module to support only one type of identity

* Updated AKS module

* Updated Databricks Access Connector module

* Updated Disk Encryption Set module

* Updated Search Service module

* Updated Backup Vault module

* Updated Firewall Policy module

* Updated MySQL Flexible server module

* MySQL Flexible server module - namePrefix reset

* Updated Health Bot module

* Updated NetApp Account module

* Updated App Gateway module

* Updated Deployment Script module

* Updated PostgreSQL Flexible Server module

* Fixed description of userAssignedResourcesIds

* Updated Storage Account module

* Updated Web Hosting Environment module

* Updated Log Analytics Workspace module

* Updated Logic Workflow module

* Updated ML Workspace module

* Updated ML Workspace Compute module

* Updated Cosmos DB module

* Updated VM module

* Updated Digital Twins module

* Updated Healthcare APIs module

* Updated DevTest Lab module

* Updated PurView Account module

* Fixed Digital Twins missing references

* Fixed DevTest Lab formattedManagementIdentities ref

* Purview fix

* Purview fix 2

* Purview updated ARM

* SQL MI fix

* SQL MI updated ARM

* SQL MI removed new output

* Small fixes

* Fixed SQL Server module

* DigitalTwins - fixed params

* Digital Twins - reset to main

* mySQL - updated param description

* postgreSQL - updated param description

* mySQL - updated conditional param description

* postgreSQL - updated conditional param description

* Updated param description for "one identity only" modules

* Disk Encryption Set - updated keyVaultPermissions implementation

* Removed identity from Gremlin DB

* Web Hosting Env - changed the way how to suppress warning

---------

Co-authored-by: Alexander Sehr <[email protected]>
Co-authored-by: CARMLPipelinePrincipal <[email protected]>

Push updated Readme file(s)

[Modules] Updated tags to AVM standard - Batch 1 (Azure#4159)

* First batch

* Updated automation account

* Attempted fix of split handling in automation account

* Updated bicep of vm

* Rollack of language server 2 from dev test

* Update to latest

* JSON update

* Added split workaround

* Updated tag & rbac handling

* Update to latest

* Updated api

* Updated Automation Account

* Adjusted AutoAccount

* Undid phantom role assignment change

* Update to latest

Push updated Readme file(s)

[Modules] Updated tags to AVM standard - Batch 2 (Azure#4160)

* Second batch

* Updated firewall & simplified it

* Updated bastion & firewall to default with IP

[Modules] Updated tags to AVM standard - Batch 3 (Azure#4161)

* Third batch

* Updated tags

Push updated Readme file(s)

[Fixes] Fixed incorrect UDT required identification & updated allowed & default value handling (Azure#4168)

* Updated API Management module

* Updated Container App module

* Updating Configuration Store module (ongoing)

* Updated Configuration Store module

* Updated Automation Account module

* Comment headers formatted

* Readme/ARM for first four modules

* Updated Batch Account module

* Fixed parameter descriptions

* Updated Readme and ARM

* Updated Redis Cache module

* Container App - Fixed parameter descriptions

* Updated Cognitive Services module

* Updated VMSS module

* Updated Container Group module

* Updated Container Registry module

* Updated Data Factory module

* Updated Event Grid / System Topic module

* Updated EventHub Namespace module

* [Modules] Resolved conflicts (Azure#4129)

* [Modules] Migrated batch [1/4] to AVM RBAC (Azure#4125)

* Updated first badge of templates (readmes pending)

* Update to latest

* Compiled templates

* Compiled templates

* Compiled first few readmes

* Updated test files

* Updated readmes

* Reduced roles

* Updated templates

* Rollback different branches' changes

* Updated nic & pip

* Fixed test file

* Refreshed vm

* Push updated Readme file(s)

* Updated templates

* Updated templates

---------

Co-authored-by: CARMLPipelinePrincipal <[email protected]>

* Clean-up, some fixes

* Removed Azure Firewall changes from branch

* Update API common test file

* Update API common test file2

* Updated Recovery Services Vault module

* Updated ServiceBus Namespace module

* Updated SQL Managed Instance module

* Updated SQL Server module

* Updated Static Website module

* Updated Web Site module

* Updated website slot readme/arm

* Redis Cache - Testing with two identities

* Configuration Store module - Testing with two identities

* Updated Signal-R WebPub Sub module

* Updated Barch module to support only one type of identity

* Updated AKS module

* Updated Databricks Access Connector module

* Updated Disk Encryption Set module

* Updated Search Service module

* Updated Backup Vault module

* Updated Firewall Policy module

* Updated MySQL Flexible server module

* MySQL Flexible server module - namePrefix reset

* Updated Health Bot module

* Updated NetApp Account module

* Updated App Gateway module

* Updated Deployment Script module

* Updated PostgreSQL Flexible Server module

* Fixed description of userAssignedResourcesIds

* Updated Storage Account module

* Updated Web Hosting Environment module

* Updated Log Analytics Workspace module

* Updated Logic Workflow module

* Updated ML Workspace module

* Updated ML Workspace Compute module

* Updated Cosmos DB module

* Updated VM module

* Updated Digital Twins module

* Updated Healthcare APIs module

* Updated DevTest Lab module

* Updated PurView Account module

* Fixed Digital Twins missing references

* Fixed DevTest Lab formattedManagementIdentities ref

* Purview fix

* Purview fix 2

* Purview updated ARM

* SQL MI fix

* SQL MI updated ARM

* SQL MI removed new output

* Small fixes

* Fixed SQL Server module

* DigitalTwins - fixed params

* Digital Twins - reset to main

* mySQL - updated param description

* postgreSQL - updated param description

* mySQL - updated conditional param description

* postgreSQL - updated conditional param description

* Updated param description for "one identity only" modules

* Update to latest

* Updated Allowed & Default value handling, etc.

* Rollback of unrelated changes

* Updated readmes

* Small formatting

---------

Co-authored-by: Kris Baranek <[email protected]>
Co-authored-by: CARMLPipelinePrincipal <[email protected]>

Push updated Readme file(s)

Updated the way the NAT GW handles pip (Azure#4158)

* Updated the way the NAT GW handles pip

* Updated triggers

* Added location

* Updated NATGW Prefix sku

* Update to latest

* Update dependencies.bicep

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update modules/network/nat-gateway/main.bicep

Co-authored-by: Ahmad Abdalla <[email protected]>

---------

Co-authored-by: Ahmad Abdalla <[email protected]>

Push updated Readme file(s)

[Modules] Private Endpoint User Defined Type Bug (ipConfigurations and customDnsConfigs) (Azure#4167)

Push updated Readme file(s)

[Utilities] Enabled expansion of child properties in ReadME (Azure#4175)

* Update to latest

* Regenerated docs

[Modules] Updated CMK to AVM specs (Azure#4173)

* Updated CMK for templates

* Updated test case

* Updated test case

* Regenerated files

Push updated Readme file(s)

[Modules] Updated Redis Cache Enterprise Logging (Azure#4176)

Push updated Readme file(s)

[Modules] Update test folder structure (Azure#4181)

* test 2 moduoles

* tests folder

* Update Get-ModuleTestFileList.ps1

* Update module.tests.ps1

* e2e folder

* rename tests

* ref shared scripts

* ref shared templates

* ref module from main.test.bicep

* authorization namespace

* policy-insignts namespace

[Modules] Rename min test to defaults (Azure#4184)

* defaults

* readmes

[Modules] Remove max test from apim and analysis services (Azure#4188)

* defaults

* readmes

* merge max and common

[Modules] Rename common test to max (Azure#4190)

* rename folders

* serviceshort

* readme

Push updated API Specs file

[Modules] Added waf-aligned test (Azure#4193)

* waf folders

* waf serviceshort

* waf metadata

* waf readme

Moved module to AVM - closes Azure#4044 (Azure#4203)

* Moved module to AVM

* Updated README

[Modules] Fix website publishing cred policy  (Azure#4202)

* update Web Site Basic Publishing Cred Policies

* fix ARM json template

* update website arm template

* Update modules/web/site/basic-publishing-credentials-policy/main.bicep

Co-authored-by: Ahmad Abdalla <[email protected]>

* update parameter description

---------

Co-authored-by: Tao Yang <[email protected]>
Co-authored-by: Ahmad Abdalla <[email protected]>

Push updated Readme file(s)

Push updated API Specs file

Removed redundant null values from UDT as per AVM (Azure#4208)

[Modules] New Child Module for Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies (Azure#4215)

* add website slot basic pub cred policy

* update

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Tao Yang <[email protected]>

Push updated Readme file(s)

Added MOVED-TO-AVM.md  for `operational-insights/workspace` module (Azure#4200)

* Added MOVED-TO-AVM.md

* Updated readme

Added MOVED-TO-AVM.md (Azure#4199)

[Bug Fix] Remove kind parameter from App Service Plan `web/serverfarm` module (Azure#4242)

Push updated Readme file(s)

[Modules] Updated identities to UDT as per AVM specs - Batch 2 (Azure#4240)

* Wiki update - systemAssignedMIPrincipalId output

* Dev Test Lab - removed redundant output

* Web Site - aligned slotSystemAssignedMIPrincipalIds output name

* Upated ditital twins module

* Digital twins - updated readme and arm of child modules

* Digital twins - fixed identities of the endpoints

* Digital twins - ARM Update

* Restored original settingy.yml

* Upated Synapse Workspace module

* Digital Twins: added systemAssignedMIPrincipalId output and corresponding test

Push updated Readme file(s)

[Modules] Removed excess s from MI UDT definition (Azure#4243)

* Removed excess s from MI UDT definition

* app/job module - fixed identity output name

* Removed excess s from MI UDT definition - part 2

Added MOVED-TO-AVM files  (Azure#4204)

* Updated settings

* Updated settings

* Updated settings

* Updated version

* test

* test

* test

* Updated settings file

* Add MOVED-TO-AVM files

* revert settings.yml changes

Search Service - fixed version file schema (Azure#4247)

Added MOVED-TO-AVM (Azure#4248)

[Modules] Follow-Up-To: Added Azure Key Vault key management service settings to Security profile (Azure#4252)

* [Modules] Added Azure Key Vault key management service settings to Security profile (Azure#4251)

* Initial commit

* Update readme

* add Enable KMS in Azure test

* Remove accidently added blank line

* Update readme

* Rebuild main.json

* Add KMS test back in

* Update readme and generate main.json

---------

Co-authored-by: Asad Arif <[email protected]>

* Updated format to common cmk interface

* Updaed api tests

* Update to latest

---------

Co-authored-by: aadev1 <[email protected]>
Co-authored-by: Asad Arif <[email protected]>

Push updated Readme file(s)

[Modules] Added itempotency to tests [1/5] (Azure#4210)

* Updated test cases of batch 1

* Updated test templates

* Update to latest

* Undid non-working changes

* Refreshed json

[Modules] Added itempotency to tests [2/5] (Azure#4211)

* Update to latest

* Updated tests

* Update to latest

* Rollback of diverse changes

* Refresh templates

[Modules] Added itempotency to tests [3/5] (Azure#4212)

* Updated batch 3

* Update to latest

* Refreshed templates

[Modules] Added itempotency to tests [4/5] (Azure#4213)

* Updated batch 4

* Refreshed NW

* Test update to vnet

* Update to latest

* Refreshed templates

* Update to latest

[Modules] Added itempotency to tests [5/5] (Azure#4214)

* Updated batch 5

* Update to latest

* Refreshed outdated template

* Missing refresh

* Refrehsed readme

* Refrehsed readme

* Update to latest

Push updated API Specs file

[Fixes] Regenerated docs via WSL to resolve static tests issue (Azure#4261)

* Regenerated docs via wsl

* Updated VNET

* Fixed reference bug

* ReadMe update

[Fixes] Address BlobServices linter warning (Azure#4262)

* Updated SA

* Update to latest

Added MOVED-TO-AVM.md for `search/search-service` module (Azure#4267)

* Added MOVED-TO-AVM

* Added MOVED-TO-AVM

* removed insights/component from branch

Added MOVED-TO-AVM (Azure#4269)

Added MOVED-TO-AVM (Azure#4272)

The current version of flux configuration 2022-03-01 doesn't add Postbuild substitution variables (Azure#4142)

* Updated flux configuration version to 2023-05-01

* Update readme and generate main.json

* Add kustomization settings to tests

* Update readme and generate main.json

---------

Co-authored-by: Asad Arif <[email protected]>

[Modules] Updated Role-Assignment schema & test cases (Azure#4274)

* Updated interface

* Updated test cases

* Update to latest

* Removed unrelated tests

* Removed changes from already migrated modules

* Update to latest

* Updated templates & readmes

Update to latest (Azure#4277)

Migrated module to AVM (Azure#4276)

Migrated to AVM (Azure#4275)

Updated docs (Azure#4283)

Updated test cases & added performance improvements (Azure#4273)

Push updated API Specs file

Push updated API Specs file

[Utilities] Ported 2 AVM Updates back to CARML (Azure#4263)

* Performance Update 1

* ReadMe Recursion Update

* Generated KeyVault ReadMes for review

* Regenerated docs

Added MOVED-TO-AVM (Azure#4306)

[New Feature] Add WhatIf feature to Test module locally script (Azure#4241)

* Add WhatIf feature to Test module locally script

* update

* update

* update

* update

* Update modules/web/serverfarm/tests/e2e/max/main.test.bicep

Co-authored-by: Alexander Sehr <[email protected]>

---------

Co-authored-by: Alexander Sehr <[email protected]>

[Utilities] Updated WhatIf feature to AVM changes (Azure#4308)

* Update to latest

* Implemented several fixes + aligned to AVM changes

* Update to latest

* Update to latest

* Update to latest

Added MOVED-TO-AVM (Azure#4322)

[Fixes] Added missing connection property to VPN GW deployment (Azure#4313)

* First draft

* Refreshed files

* Update to latest

* Update to latest

* Update to latest

Push updated Readme file(s)

Push updated API Specs file

Added MovedToAVM (Azure#4330)

Added MOVED-TO-AVM (Azure#4334)

Adding Moved to AVM for `power-bi-dedicated/capacity` (Azure#4338)

* Adding Moved to AVM

* Fixed MOVED TO AVM

Adding MOVED-TO-AVM.md (Azure#4340)

Added MOVED-TO-AVM (Azure#4336)

Adding MOVED-TO-AVM to network/trafficmanagerprofile (Azure#4341)

* Updated settings

* Updated settings

* Updated settings

* Updated version

* test

* test

* test

* Updated settings file

* Migrate module to AVM

* Updated readme and json

* revert settings.yml

Added MOVED-TO-AVM (Azure#4335)

[Modules] Added azureMonitorProfile to allow us to enable the Prometheus collector (Azure#4329) (Azure#4331)

* Added azureMonitorProfile to aks resource

* Update readme and generate main.json

* Add [[namePrefix]] back into test

---------

Co-authored-by: aadev1 <[email protected]>
Co-authored-by: Asad Arif <[email protected]>

Push updated Readme file(s)

Container Apps Env Upgrade to latest version 2023-05-01 (Azure#4307)

* Upgrade to latest version 2023-05-01

* Formatted

* assign subnet id if provided

* updated arm template and output defaultDomain

* Lint fix

* minor fix for ReservedCidr, ReservedDnsIP and test

Push updated Readme file(s)

ManagedCluster - WebAppRouting - Updates (Azure#4195)

* Update main.bicep

Do not attempt to load Private DNS Zone when `enableDnsZoneContributorRoleAssignment` is false.

Added output `managedCluster.properties.ingressProfile.webAppRouting.identity.objectId` so I can add role assignment for private dns zone

* Update module

* Upgraded bicep, re-ran

Push updated Readme file(s)

Added MOVED-TO-AVM (Azure#4353)

Push updated API Specs file

Added MOVED-TO-AVM for three modules (Azure#4354)

Ported fixed implemented in AVM to reenabled static test issues (Azure#4352)

Adding Moved to AVM for managed-identity/user-assigned-identity (Azure#4339)

* first draft

* updated avm draft

* moved to avm

* conflicts

* final userid

* readme update

Push updated Readme file(s)

migrated module (Azure#4364)

Bugfix for allowed value logic

Updated NSG Module VM (Azure#4365)

Regenerated all docs & json templates (Azure#4366)

[Modules] Cluster - Expose AGIC Identity Object Id (Azure#4349) (Azure#4375)

* Managed Cluster - Expose AGIC Identity Object Id (Azure#4349)

* Add AGIC identity

* Set-Module

* Update to latest

---------

Co-authored-by: Preston Alvarado <[email protected]>

Push updated Readme file(s)

Added MOVED-TO-AVM for four modules (Azure#4379)

Push updated API Specs file

[Module] Implemented workaround for fileShare role assignment (Azure#4391)

* Update to latest

* Update to latest

Push updated Readme file(s)

Users/arnoldna/4409 app managedenvironment (Azure#4410)

* Moved app/managedenvironment to AVM

* Updated Readme

Push updated API Specs file

Push updated API Specs file

[Fixes] Ensure that VirtualMachineImages are removed before MSIs are removed as there's otherwise a high chance for a lock (Azure#4418)

* Updated removal

* Update to latest

* Update to latest

* Update to latest

Added moved md (Azure#4424)

Added MOVED-TO-AVM for recently migrated modules (Azure#4429)

Updated RG readme (Azure#4431)

[Modules] Updates to the Azure Monitor Private Link Service (AMPLS) Module (Azure#4392)

* Added types and upgraded api version

* Added tests

* Uncommented code

* Added documentation to accessModeSettings and added PrivateOnly value

* Testing using condition

* PR feedback

* Removed access mode from default test

* Updated readme and main.json

* PR feedback

* Uncommented code, added description for exclusion

* Updated markdown and json

* Fixed description to adhere to test

* PR feedback

Push updated Readme file(s)

Added MOVED-TO-AVM (Azure#4435)

Added MOVED-TO-AVM (Azure#4439)

Push updated API Specs file

replace ubuntu version (Azure#4437)

[PSRule] Fix Rule Azure.VMSS.AMA (Azure#3918)

* updates

* update readme

* update

---------

Co-authored-by: Fabio Masciotra <[email protected]>

[Modules] Added missing `Moved-to-AVM.md` (Azure#4440)

* Update to latest

* Regenerated docs

[Modules] Removed excess files (Azure#4441)

* Update to latest

* Regenerated docs

* Update to latest

module moved to AVM (Azure#4453)

* module moved to AVM

* update readme

* add notes back

Push updated API Specs file

Migrate container-service/managed-cluster to AVM specs (Azure#4454)

* moved to avm

* Update readme

Push updated Readme file(s)

Added MOVED-TO-AVM (Azure#4455)

Added MOVED-TO-AVM (Azure#4457)

Push updated API Specs file

Moved to AVM (Azure#4463)

[Utilities] Ported updated reference resolution from AVM (Azure#4468)

* Updated script

* Update to latest

Updated module dependency and fixed typo (Azure#4469)

Update to latest (Azure#4470)

[Modules] moved to AVM: local-network-gateway and virtual-network-gateway (Azure#4471)

* updated modules moved to AVM

* updated readme file with AVM migration assertion

---------

Co-authored-by: Fabio Masciotra <[email protected]>

Scaling Plan MOVED-TO-AVM.md (Azure#4483)

* Create MOVED-TO-AVM.md

* updates

Update to latest

Application group MOVED-TO-AVM.md (Azure#4482)

* Create MOVED-TO-AVM.md

* updates

Workspace MOVED-TO-AVM.md (Azure#4485)

* Create MOVED-TO-AVM.md

* updates

Host pool update readme (Azure#4484)

* Create MOVED-TO-AVM.md

* Create MOVED-TO-AVM.md

* updates

[Fixes] Fixed issue with multi-line parameter descriptions (Azure#4488)

* Ported multiline fix from AVM

* Update to latest

Added moved to avm disclaimer to store account

Added moved to avm disclaimer to app container-app

Added Moved to AVM for migrate modules (Azure#4495)

Added MOVED-TO-AVM (Azure#4498)

[Utilities] Enabled Workflow-Trigger function to trigger only for module diff (ported from AVM) (Azure#4499)

* Add support for triggering workflows based on file diff

* Dummy change to test diff

* Dummy change to test diff

* Adding diff module filter

* Removed dummy changes

Moved from CARML to AVM (Azure#4501)

Added missing slash (Azure#4508)

Added MOVED-TO-AVM.md for the machine-learning workspace (Azure#4505)

Added MOVED-TO-AVM.md for the purview account (Azure#4503)

Added MOVED-TO-AVM.md for the DevTest Lab and Network Manager Modules (Azure#4513)

* added dtl

* Update Network Manager modules

Refactor role assignment filtering in Get-RoleAssignmentList.ps1 (Azure#4515)

* Refactor role assignment filtering in Get-RoleAssignmentList.ps1

* fmt

* Add optional parameter to fetch all available roles

* Refactor Get-RoleAssignmentList.ps1 to fetch relevant Role Definitions by default

* Remove unnecessary debug statements in Get-RoleAssignmentList.ps1

Added MOVED-TO-AVM.md for the CDN Profile module (Azure#4512)

Added MOVED-TO-AVM.md for the configuration store (Azure#4506)

Added MOVED-TO-AVM.md for the Signal-R modules (Azure#4517)

[CI Environment] Ported latest AVM pipline changes (e.g. naming) (Azure#4477)

* Ported several changes

* Update to latest

* Update to latest

* Fixed PSRule setup

* Updated pester test file path

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Changed pwsh

* Update to latest

* Update to latest

* Tried alternative path ref

* Added PS Rule ref

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Update to latest

* Renamed paths

* Updated to more specific naming to avoid overlaps with e.g., pwsh path var

* Undid unrelated changes

* Added Az.Resources install to PSRule prep

* Update to latest

* GH PS Rule config fix

* Update to latest

* Update to latest

Added MOVED-TO-AVM.md for the recently migrated modules (Azure#4533)

* Added MOVED-TO-AVM for Relay Namespace

* Added MOVED-TO-AVM for Web Connection

Added MOVED-TO-AVM.md for the recently migrated modules (Azure#4538)

* Added MOVED-TO-AVM.md for the Healthcare APIs Workspace

* Update README.md and MOVED-TO-AVM.md for the Application Gateway Web Application Firewall (WAF) Policies module

CARML - AVM module transition complete (Azure#4541)

* readme updates

* readme update

* new template for MOVED-TO-AVM.md

* remove old notice from README files

* updated notice

* update informational notice in the MOVED-TO-AVM.md files

* update moved-to-avm notice

* moved-to-avm, readme and retired files updated

* readme update

* deleting modules' source code

* delete README files

* rename RETIRED.md and MOVED-TO-AVM.md to README.md

* readme update

* readme updates
  • Loading branch information
CARMLPipelinePrincipal authored and Stephane Vallier committed Aug 7, 2024
1 parent 4b4aa1f commit c5a5ef1
Show file tree
Hide file tree
Showing 2,408 changed files with 9,202 additions and 399,570 deletions.
50 changes: 50 additions & 0 deletions .azuredevops/modulePipelines/ms.app.jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'App - Jobs'

parameters:
- name: staticValidation
displayName: Execute static validation
type: boolean
default: true
- name: deploymentValidation
displayName: Execute deployment validation
type: boolean
default: true
- name: removeDeployment
displayName: Remove deployed module
type: boolean
default: true
- name: prerelease
displayName: Publish prerelease module
type: boolean
default: false

pr: none

trigger:
batch: true
branches:
include:
- main
paths:
include:
- '/.azuredevops/modulePipelines/ms.app.jobs.yml'
- '/.azuredevops/pipelineTemplates/*.yml'
- '/modules/app/job/*'
- '/utilities/pipelines/*'
exclude:
- '/utilities/pipelines/deploymentRemoval/*'
- '/**/*.md'

variables:
- template: '../../settings.yml'
- group: 'PLATFORM_VARIABLES'
- name: modulePath
value: '/modules/app/job'

stages:
- template: /.azuredevops/pipelineTemplates/stages.module.yml
parameters:
staticValidation: '${{ parameters.staticValidation }}'
deploymentValidation: '${{ parameters.deploymentValidation }}'
removeDeployment: '${{ parameters.removeDeployment }}'
prerelease: '${{ parameters.prerelease }}'
1 change: 1 addition & 0 deletions .azuredevops/modulePipelines/ms.network.natgateways.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ trigger:
include:
- '/modules/network/nat-gateway/*'
- '/modules/network/public-ip-address/*'
- '/modules/network/public-ip-prefix/*'
- '/.azuredevops/modulePipelines/ms.network.natgateways.yml'
- '/.azuredevops/pipelineTemplates/*.yml'
- '/utilities/pipelines/*'
Expand Down
63 changes: 44 additions & 19 deletions .azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:

# Logic-related parameters
modulePath: '$(modulePath)'
psRuleFilterRegex: '(defaults|waf-aligned)'

##---------------------------------------------##
## TEMPLATE LOGIC ##
Expand All @@ -19,34 +20,58 @@ jobs:
name: ${{ parameters.poolName }}
steps:
- task: PowerShell@2
displayName: 'Get parameter files'
displayName: 'Get module test file paths'
name: getModuleTestFilesTask
inputs:
targetType: inline
pwsh: true
script: |
# Load used functions
. (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Get-ModuleTestFileList.ps1')
## ======= ##
## All ##
## ======= ##
$functionInput = @{
ModulePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}'
}
# Get the list of parameter file paths
$moduleFolderPath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}'
Write-Verbose "Invoke task with" -Verbose
Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose
$testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object
$testFilePaths = $testFilePaths | ForEach-Object {
$_.Replace($moduleFolderPath, '').Trim('\').Trim('/')
}
# Set agent up
$deploymentTestPaths = Get-ModuleTestFileList @functionInput -Verbose
Write-Verbose 'Found all module test files' -Verbose
$testFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose }
$testTable = @{}
foreach ($deploymentTestPath in $deploymentTestPaths) {
$deploymentTestFileName = Split-Path (Split-Path $deploymentTestPath -Parent) -Leaf
$testTable[$deploymentTestFileName] += @{
moduleTestFilePath = $deploymentTestPath
}
}
$testFilePaths | ForEach-Object {
$testFileName = Split-Path (Split-Path $_) -Leaf
$testTable[$testFileName] = @{
moduleTestFilePath = $_
moduleTestFileName = $testFileName
}
} | ConvertTo-Json -Compress
$deployCompressedOutput = $testTable | ConvertTo-Json -Compress
Write-Verbose "Publishing output: $deployCompressedOutput" -Verbose
Write-Host ('##vso[task.setVariable variable=moduleTestFilePaths;isOutput=true]{0}' -f $deployCompressedOutput)
$deploymentTestPathsOutput = $testTable | ConvertTo-Json -Compress
## =========== ##
## PS-Rule ##
## =========== ##
$psRuleTestFilePaths = $testFilePaths | Where-Object { $_ -match '${{ parameters.psRuleFilterRegex }}' }
Write-Verbose 'Found PSRule module test files' -Verbose
$psRuleTestFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose }
$psRuleTestTable = @{}
$psRuleTestFilePaths | ForEach-Object {
$testFileName = Split-Path (Split-Path $_) -Leaf
$psRuleTestTable[$testFileName] = @{
moduleTestFilePath = $_
moduleTestFileName = $testFileName
}
}
$psRuleCompressedOutput = $psRuleTestTable | ConvertTo-Json -Compress
Write-Host ('##vso[task.setVariable variable=moduleTests;isOutput=true]{0}' -f ($testTable | ConvertTo-Json -Compress))
Write-Verbose "Module test files: $deploymentTestPathsOutput" -Verbose
Write-Host ('##vso[task.setVariable variable=psRuleModuleTestFilePaths;isOutput=true]{0}' -f $psRuleCompressedOutput)
Write-Verbose "PS Rule publishing output: $psRuleCompressedOutput" -Verbose
16 changes: 5 additions & 11 deletions .azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on. | 'ubuntu20.04' |
## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline. | 120 |
## | removeDeployment | 'true' | Set to [true] to flag resources for removal. If not provided, defaults to true. | 'true' |
## | templateFilePath | '' | Path to the template file to deploy. | 'modules/analysis-services/servers/main.bicep' |
## | customTokens | '' | Additional token pairs in json format. | '{"tokenName":"tokenValue"}' |
## | jobDisplayName | '' | The display name of the job. | 'Deploy module' |
## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' |
Expand All @@ -50,7 +49,6 @@ parameters:
defaultJobTimeoutInMinutes: 120
# Logic-related parameters
removeDeployment: false
templateFilePath: ''
customTokens: ''
modulePath: '$(modulePath)'
location: '$(location)'
Expand All @@ -76,7 +74,7 @@ jobs:
dependsOn:
- getModuleTestFiles
strategy:
matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.moduleTests'] ]
matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.moduleTestFilePaths'] ]
##---------------------------------------------##
## TEMPLATE LOGIC ##
##---------------------------------------------##
Expand Down Expand Up @@ -117,20 +115,16 @@ jobs:
# [Agent] Replace tokens
#-----------------------
- task: AzurePowerShell@5
displayName: 'Replace tokens in template file via connection [${{ parameters.serviceConnection }}]'
- task: PowerShell@2
displayName: 'Replace tokens in template files'
inputs:
azureSubscription: ${{ parameters.serviceConnection }}
azurePowerShellVersion: 'latestVersion'
preferredAzurePowerShellVersion: ''
ScriptType: InlineScript
targetType: inline
pwsh: true
inline: |
script: |
# Load used functions
. (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInFileList.ps1')
. (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Get-LocallyReferencedFileList.ps1')
# Get target files
$moduleTestFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulePath)' '$(moduleTestFilePath)'
Expand Down
144 changes: 144 additions & 0 deletions .azuredevops/pipelineTemplates/jobs.validateModulePSRule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
#########################################################
## 'Validate module with Pester' Pipeline Template ##
#########################################################
##
## This pipeline template contains the logic to validate a module using a set of Pester tests
##
## Enabled levels of validation
## - Resource-Group-Level
## - Subscription-Level
## - Management-Group-Level
## - Tenant-Level
##
#########################################################
##
##---------------------------------------------##
## TEMPLATE PARAMETERS ##
##---------------------------------------------##
##
## By default it uses the variables specified in the below [parameters] section. However, you can overwrite these variables in the
## referencing pipeline by providing the parameter explicitly.
##
## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section
##
## |==============================================================================================================================================================================================================================================|
## | Parameter | Default Value | Description | Example |
## |----------------------------|-----------------------------------------------|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' |
## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' |
## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 |
## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' |
## | psrulePath | 'utilities/pipelines/staticValidation/psrule' | The path to the PS-Rule configuration | 'utilities/pipelines/staticValidation/module.tests.ps1' |
## | location | '$(location)' | The location to validate with | 'France Central' |
## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to validate with when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' |
## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to validate with. Required only for Management-Group-Level validations | '477c9620-cb01-454f-9ebc-fc6b1df48c14' |
## |==============================================================================================================================================================================================================================================|
##
##---------------------------------------------##

parameters:
# Pipeline-related parameters
poolName: '$(poolName)'
vmImage: '$(vmImage)'
defaultJobTimeoutInMinutes: 120
# Logic-related parameters
modulePath: '$(modulePath)'
psrulePath: 'utilities/pipelines/staticValidation/psrule'
location: '$(location)'
subscriptionId: '$(ARM_SUBSCRIPTION_ID)'
managementGroupId: '$(ARM_MGMTGROUP_ID)'

##---------------------------------------------##
## TEMPLATE LOGIC ##
##---------------------------------------------##
jobs:
- template: /.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml
- job:
displayName: Run PSRule tests
timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }}
pool:
${{ if ne(parameters.vmImage, '') }}:
vmImage: ${{ parameters.vmImage }}
${{ if ne(parameters.poolName, '') }}:
name: ${{ parameters.poolName }}
dependsOn:
- getModuleTestFiles
strategy:
matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.psRuleModuleTestFilePaths'] ]
steps:
# [Agent] Replace tokens
#-----------------------
- task: PowerShell@2
displayName: 'Replace tokens in template files'
inputs:
targetType: inline
pwsh: true
script: |
# Load used functions
. (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInFileList.ps1')
. (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Get-LocallyReferencedFileList.ps1')
# Get target files
$moduleTestFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulePath)' '$(moduleTestFilePath)'
# Get target files
$targetFileList = @(
$moduleTestFilePath
)
# Add all module template files as they may contain tokens
$targetFileList += (Get-LocallyReferencedFileList -FilePath $moduleTestFilePath)
$targetFileList = $targetFileList | Sort-Object -Unique
# Construct Token Function Input
$ConvertTokensInputs = @{
FilePathList = $targetFileList
Tokens = @{}
TokenPrefix = '$(tokenPrefix)'
TokenSuffix = '$(tokenSuffix)'
}
# Add enforced tokens
$ConvertTokensInputs.Tokens += @{
subscriptionId = '${{ parameters.subscriptionId }}'
managementGroupId = '${{ parameters.managementGroupId }}'
tenantId = '$(ARM_TENANT_ID)'
}
# Add local (source control) tokens
$tokenMap = @{}
foreach ($token in (Get-ChildItem env: | Where-Object -Property Name -Like "localToken_*")) {
$tokenMap += @{ $token.Name.Replace('localToken_','','OrdinalIgnoreCase') = $token.value }
}
Write-Verbose ('Using local tokens [{0}]' -f ($tokenMap.Keys -join ', ')) -Verbose
$ConvertTokensInputs.Tokens += $tokenMap
# Swap 'namePrefix' token if empty and provided as a Azure DevOps variable
if([String]::IsNullOrEmpty($ConvertTokensInputs.Tokens['namePrefix'])){
Write-Verbose 'Using [namePrefix] token from Azure DevOps Variable Groups' -Verbose
$ConvertTokensInputs.Tokens['namePrefix'] = "$(TOKEN_NAMEPREFIX)"
}
# Add custom tokens (passed in via the pipeline)
if(-not [String]::IsNullOrEmpty('${{ parameters.customTokens }}')) {
$customTokens = '${{ parameters.customTokens }}' | ConvertFrom-Json -AsHashTable
Write-Verbose ('Using custom parameter file tokens [{0}]' -f ($customTokens.Keys -join ', ')) -Verbose
$ConvertTokensInputs.Tokens += $customTokens
}
Write-Verbose "Convert Tokens Input:`n $($ConvertTokensInputs | ConvertTo-Json -Depth 10)" -Verbose
# Invoke Token Replacement Functionality [For Module]
$null = Convert-TokensInFileList @ConvertTokensInputs
- task: ps-rule-assert@2
displayName: Analyze Azure template files
inputs:
inputType: inputPath
modules: 'PSRule.Rules.Azure'
inputPath: '$(System.DefaultWorkingDirectory)/$(modulePath)/$(moduleTestFilePath)'
outputFormat: Csv
option: '${{ parameters.psrulePath}}/ps-rule.yaml' # Path to PSRule configuration options file
source: '${{ parameters.psrulePath}}/.ps-rule/' # Path to folder containing suppression rules to use for analysis.
outputPath: '$(System.DefaultWorkingDirectory)/$(modulePath)/$(moduleTestFilePath)-PSRule-output.csv'
continueOnError: true
Loading

0 comments on commit c5a5ef1

Please sign in to comment.