This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Usage: | |
| # Dot source: . .\migpr.ps1 | |
| # Run: Invoke-MigPullRequest -PRNumber 123 -Repository "org/repo" | |
| # Or execute script directly: pwsh .\migpr.ps1 123 org/repo | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position = 0)] | |
| [int]$PRNumber, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Stops all waiting, in progress, and queued GitHub Action workflows (by default) on a given repository. | |
| function Stop-GHARepo { | |
| [CmdletBinding()] | |
| param ( | |
| [String]$repo, | |
| [bool]$waiting = $true, | |
| [bool]$inProgress = $true, | |
| [bool]$queued = $true | |
| ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $subs = Get-AzSubscription | |
| ForEach ($subscription in $subs) { | |
| Write-Host "Set context to Subscription: '$($subscription.Name)'" -ForegroundColor Cyan | |
| Set-AzContext -Subscription $subscription.Id | Out-Null | |
| # Get all Resource Groups in Subscription | |
| $resources = Get-AzResourceGroup | |
| $resources | ForEach-Object -Parallel { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function Cancel-GhActionsWaiting { | |
| [CmdletBinding()] | |
| param ( | |
| $repo | |
| ) | |
| if ($null -eq $repo) { | |
| $repo = Read-Host -Prompt "Please enter the GitHub Org and Repo you wish to cancel waiting jobs on, e.g. 'Azure/terraform-azurerm-avm-ptn-network-private-link-private-dns-zones'" | |
| } | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | targetScope = 'tenant' | |
| param lawResourceId string = '/subscriptions/<SUB ID>/resourceGroups/<RSG NAME>/providers/Microsoft.OperationalInsights/workspaces/<LAW NAME>' | |
| resource aadLogs 'microsoft.aadiam/diagnosticSettings@2017-04-01' = { | |
| name: 'sentToLAW' | |
| properties: { | |
| workspaceId: lawResourceId | |
| logs: [ | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $repo = "<Org/Repo>" | |
| $runs = gh run list -R $repo -s in_progress -s queued -L 500 --json databaseId | |
| $runsConverted = $runs | ConvertFrom-Json | |
| foreach ($run in $runsConverted) { | |
| gh run cancel $run.databaseId -R $repo | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Get all resource providers | |
| $resourceProviders = Get-AzResourceProvider -ListAvailable | |
| # Initialize an array to store all resource types | |
| $allResourceTypes = @() | |
| # Store all resource types in the array as objects | |
| foreach ($provider in $resourceProviders) { | |
| foreach ($resourceType in $provider.ResourceTypes) { | |
| $resourceString = "{0}/{1}" -f $provider.ProviderNamespace, $resourceType.ResourceTypeName | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // String | |
| var string1 = 'this is a string' | |
| var string2 = 'also' | |
| // Boolean | |
| var bool1 = true | |
| var bool2 = false | |
| // Integer | |
| var int1 = 1 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [ | |
| { | |
| "moduleName": "ai/bing-resource", | |
| "tags": [ | |
| "1.0.1", | |
| "1.0.2" | |
| ], | |
| "properties": { | |
| "1.0.1": { | |
| "documentationUri": "https://github.com/Azure/bicep-registry-modules/tree/ai/bing-resource/1.0.1/modules/ai/bing-resource/README.md" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | targetScope = 'tenant' | |
| param parLandingZoneMgChildren object = {} | |
| param parLandingZoneMgAlzDefaultsEnable bool = false | |
| param parLandingZoneMgConfidentialEnable bool = true | |
| // Landing Zones & Child Management Groups | 
NewerOlder