Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
72a5b5a
Support Azure DevOps (#19)
matt-FFFFFF Jul 16, 2020
79219e6
Merge commit
ljtill Jul 30, 2020
883ebd5
Update public/
ljtill Jul 30, 2020
8c22f3e
Update guidance/
ljtill Jul 30, 2020
f3e5ed9
Update guidance/
ljtill Jul 30, 2020
3abd661
Move providerfeatures.json & resourceproviders.json
ljtill Jul 30, 2020
affe605
Update Dockerfile
ljtill Jul 31, 2020
f68f4ee
Update public/
ljtill Jul 31, 2020
0496c44
Add Azure DevOps support
ljtill Aug 3, 2020
6e38d7a
Fix export raw templates env var
ljtill Aug 3, 2020
8e6c03f
Fix auxiliary path
ljtill Aug 3, 2020
9b5bd77
Update comment formatting
ljtill Aug 3, 2020
271ec34
Add branch name parsing
ljtill Aug 3, 2020
f802fa0
Add azure devops global vars
ljtill Aug 3, 2020
400b0a0
Add azure devops support
ljtill Aug 3, 2020
4d92162
Update entrypoint.ps1
ljtill Aug 4, 2020
aade617
Merge commit
ljtill Aug 4, 2020
f481002
Update Invoke-AzOpsGitPull.ps1
ljtill Aug 4, 2020
890c0b5
Remove blank space
ljtill Aug 4, 2020
fe32176
Fix parameter name
ljtill Aug 4, 2020
4d53b06
Update default scm logic
ljtill Aug 4, 2020
bb4aa4f
Set default scm platform
ljtill Aug 4, 2020
fcee6f1
Add pull request wait
ljtill Aug 4, 2020
02d72ae
Update Invoke-AzOpsGitPush.ps1
ljtill Aug 5, 2020
3d4f4d6
Add git fetch
ljtill Aug 5, 2020
7a06bbb
Update Invoke-AzOpsGitPush.ps1
ljtill Aug 5, 2020
67046c4
Update Invoke-AzOpsGitPush.ps1
ljtill Aug 5, 2020
9386739
Workflow test
ljtill Aug 6, 2020
d8165a3
Revert workflow test
ljtill Aug 6, 2020
d90baf6
Update push / pull workflow
ljtill Aug 6, 2020
bbb2bc3
Update git push workflow
ljtill Aug 6, 2020
e1f0467
Update push workflow
ljtill Aug 6, 2020
164110e
Workflow test
ljtill Aug 6, 2020
eda66f8
Add skip logic
ljtill Aug 6, 2020
1db0788
Fix status variable
ljtill Aug 6, 2020
64817f4
Revert test workflow
ljtill Aug 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ ARG azure_resources=2.3.0

RUN [ "/bin/bash", "-c", "apt-get update &> /dev/null && apt-get install -y git wget &> /dev/null" ]
RUN [ "/bin/bash", "-c", "wget https://github.com/cli/cli/releases/download/v${github}/gh_${github}_linux_amd64.deb -O /tmp/gh_${github}_linux_amd64.deb &> /dev/null" ]
RUN [ "/bin/bash", "-c", "curl -sL https://aka.ms/InstallAzureCLIDeb | bash &> /dev/null"]
RUN [ "/bin/bash", "-c", "az extension add --name azure-devops --system &> /dev/null"]
RUN [ "/bin/bash", "-c", "dpkg -i /tmp/gh_${github}_linux_amd64.deb &> /dev/null" ]
RUN [ "/usr/bin/pwsh", "-Command", "$ProgressPreference = 'SilentlyContinue'; Install-Module -Name Az.Accounts -RequiredVersion ${azure_accounts} -Scope AllUsers -Force" ]
RUN [ "/usr/bin/pwsh", "-Command", "$ProgressPreference = 'SilentlyContinue'; Install-Module -Name Az.Resources -RequiredVersion ${azure_resources} -Scope AllUsers -Force" ]

COPY . /action
COPY . /var/lib/app

ENV AzOpsMainTemplate='/action/template/template.json'
ENV AzOpsStateConfig='/action/src/AzOpsStateConfig.json'
ENV AzOpsMainTemplate='/var/lib/app/template/template.json'
ENV AzOpsStateConfig='/var/lib/app/src/AzOpsStateConfig.json'

ENTRYPOINT ["pwsh", "/action/entrypoint.ps1"]
ENTRYPOINT ["pwsh", "/var/lib/app/entrypoint.ps1"]
57 changes: 46 additions & 11 deletions entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,54 @@ function Initialization {
Connect-AzAccount -TenantId $credentials.tenantId -ServicePrincipal -Credential $credential -SubscriptionId $credentials.subscriptionId -WarningAction SilentlyContinue | Out-Null

# Configure git
Start-AzOpsNativeExecution {
git config --global user.email $env:GITHUB_EMAIL
git config --global user.name $env:GITHUB_USERNAME
} | Out-Host
switch ($env:SCM_PLATFORM) {
"AzureDevOps" {
Start-AzOpsNativeExecution {
git config --global user.name $env:AZDEVOPS_USERNAME
git config --global user.email $env:AZDEVOPS_EMAIL
} | Out-Host
}
default {
Start-AzOpsNativeExecution {
git config --global user.name $env:GITHUB_USERNAME
git config --global user.email $env:GITHUB_EMAIL
} | Out-Host
}
}

# Update branch names
if (($env:SCM_PLATFORM -eq "AzureDevOps") -and ($env:INPUT_MODE -eq "Push")) {
$env:AZDEVOPS_HEAD_REF = ($env:AZDEVOPS_HEAD_REF).Replace("refs/heads/", "")
$env:AZDEVOPS_BASE_REF = ($env:AZDEVOPS_BASE_REF).Replace("refs/heads/", "")
}

# Print environment variables
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_STATE is $($env:AZOPS_STATE)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_ENROLLMENT_ACCOUNT is $($env:AZOPS_ENROLLMENT_ACCOUNT)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_OFFER_TYPE is $($env:AZOPS_OFFER_TYPE)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_DEFAULT_DEPLOYMENT_REGION is $($env:AZOPS_DEFAULT_DEPLOYMENT_REGION)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_INVALIDATE_CACHE is $($env:AZOPS_INVALIDATE_CACHE)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_IGNORE_CONTEXT_CHECK is $($env:AZOPS_IGNORE_CONTEXT_CHECK)"
Write-AzOpsLog -Level Information -Topic "entrypoint" -Message "AZOPS_THROTTLE_LIMIT is $($env:AZOPS_THROTTLE_LIMIT)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_MODE: $($env:INPUT_MODE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_STATE: $($env:AZOPS_STATE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_ENROLLMENT_ACCOUNT: $($env:AZOPS_ENROLLMENT_ACCOUNT)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_OFFER_TYPE: $($env:AZOPS_OFFER_TYPE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_DEFAULT_DEPLOYMENT_REGION: $($env:AZOPS_DEFAULT_DEPLOYMENT_REGION)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_INVALIDATE_CACHE: $($env:AZOPS_INVALIDATE_CACHE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_IGNORE_CONTEXT_CHECK: $($env:AZOPS_IGNORE_CONTEXT_CHECK)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_THROTTLE_LIMIT: $($env:AZOPS_THROTTLE_LIMIT)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZOPS_STRICT_MODE: $($env:AZOPS_STRICT_MODE)"
switch ($env:SCM_PLATFORM) {
"AzureDevOps" {
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZDEVOPS_AUTO_MERGE: $($env:AZDEVOPS_AUTO_MERGE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZDEVOPS_EMAIL: $($env:AZDEVOPS_EMAIL)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZDEVOPS_USERNAME: $($env:AZDEVOPS_USERNAME)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "AZDEVOPS_PULL_REQUEST: $($env:AZDEVOPS_PULL_REQUEST)"
}
default {
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_AUTO_MERGE: $($env:GITHUB_AUTO_MERGE)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_EMAIL: $($env:GITHUB_EMAIL)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_USERNAME: $($env:GITHUB_USERNAME)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_PULL_REQUEST: $($env:GITHUB_PULL_REQUEST)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_HEAD_REF: $($env:GITHUB_HEAD_REF)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_BASE_REF: $($env:GITHUB_BASE_REF)"
Write-AzOpsLog -Level Information -Topic "env-var" -Message "GITHUB_COMMENTS: $($env:GITHUB_COMMENTS)"
}
}

# Initialize global variables
Initialize-AzOpsGlobalVariables
Expand Down
18 changes: 18 additions & 0 deletions src/auxiliary/guidance/strict/azdevops/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## AzOps

The 'main' branch in the repository does not contain the latest configuration of Azure.

It is strongly recommended to ensure that 'feature' and 'main' branches contain the current Azure configuration.

### Remediation

[Re-initialize](https://github.com/Azure/Enterprise-Scale/blob/main/docs/Deploy/setup-azuredevops.md#discover-environment) your repository to pull latest changes from Azure by invoking the Azure Pipeline. You can monitor the status of the Pipeline in `Pipelines` section.

Upon successful completion, the action will create a new `system` branch and a new `Azure Change Notification` pull request containing the latest configuration.

- Please merge Pull Request from `system` branch in to your `main` branch.

- Update you feature branch from main `git pull origin/main`

- Push your branch to `origin` by running following command `git push`

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It is strongly recommended to ensure that 'feature' and 'main' branches contain

### Remediation

[Re-initialization](https://github.com/Azure/Enterprise-Scale/blob/main/docs/Deploy/discover-environment.md#initialize-existing-environment) of the repository to pull the latest changes from Azure by manually invoking the GitHub Action.
[Re-initialize](https://github.com/Azure/Enterprise-Scale/blob/main/docs/Deploy/discover-environment.md#initialize-existing-environment) of the repository to pull the latest changes from Azure by manually invoking the GitHub Action.

Upon successful completion, the action will create a new `system` branch and a new `Azure Change Notification` pull request containing the latest configuration.

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/private/ConvertTo-AzOpsState.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function ConvertTo-AzOpsState {
}
}
else {
Write-AzOpsLog -Level Warning -Topic "ConvertTo-AzOpsState" -Message "Unable to find valid object to convert."
Write-AzOpsLog -Level Warning -Topic "ConvertTo-AzOpsState" -Message "Unable to find valid object to convert"
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/private/Get-AzOpsAllSubscription.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Get-AzOpsAllSubscription {
$IncludedSubscriptions = $AllSubscriptionsResults | Where-Object { $_.state -notin $ExcludedStates -and $_.subscriptionPolicies.quotaId -notin $ExcludedOffers }
# Validate that subscriptions were found
if ($null -eq $IncludedSubscriptions) {
Write-AzOpsLog -Level Error -Topic "Get-AzOpsAllSubscription" -Message "Found [$($IncludedSubscriptions.count)] subscriptions - verify appropriate permissions or that excluded offers and states are correct."
Write-AzOpsLog -Level Error -Topic "Get-AzOpsAllSubscription" -Message "Found [$($IncludedSubscriptions.count)] subscriptions - verify appropriate permissions or that excluded offers and states are correct"
}
else {
# Calculate no of excluded subscriptions
Expand Down
8 changes: 4 additions & 4 deletions src/private/Get-AzOpsResourceDefinitionAtScope.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ function Get-AzOpsResourceDefinitionAtScope {
catch {
if ($retryCount -lt $maxRetryCount) {
$sleepTimeInSeconds = [math]::Pow($backoffMultiplier, $retryCount)
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Caught error finding Resource Groups (retryCount=$retryCount). Waiting for $sleepTimeInSeconds seconds."
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Caught error finding Resource Groups (retryCount=$retryCount). Waiting for $sleepTimeInSeconds seconds"
Start-Sleep -Seconds $sleepTimeInSeconds
}
elseif ($retryCount -ge $maxRetryCount) {
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Timeout exporting Resource Groups from Subscription $($context.Subscription.Id)."
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Timeout exporting Resource Groups from Subscription $($context.Subscription.Id)"
Write-AzOpsLog -Level Error -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "$($_.Exception.Message | Out-String)"
break
}
Expand Down Expand Up @@ -206,11 +206,11 @@ function Get-AzOpsResourceDefinitionAtScope {
catch {
if ($retryCount -lt $maxRetryCount) {
$sleepTimeInSeconds = [math]::Pow($backoffMultiplier, $retryCount)
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Caught error finding Resources (retryCount=$retryCount). Waiting for $sleepTimeInSeconds seconds."
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Caught error finding Resources (retryCount=$retryCount). Waiting for $sleepTimeInSeconds seconds"
Start-Sleep -Seconds $sleepTimeInSeconds
}
elseif ($retryCount -ge $maxRetryCount) {
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Timeout exporting Resources from Resource Group [$($rg.ResourceGroupName)]."
Write-AzOpsLog -Level Warning -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "Timeout exporting Resources from Resource Group [$($rg.ResourceGroupName)]"
Write-AzOpsLog -Level Error -Topic "Get-AzOpsResourceDefinitionAtScope" -Message "$($_.Exception.Message | Out-String)"
break
}
Expand Down
2 changes: 1 addition & 1 deletion src/private/New-AzOpsStateDeployment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function New-AzOpsStateDeployment {
New-AzResourceGroupDeployment -ResourceGroupName $scope.resourcegroup -TemplateFile $templatePath -TemplateParameterFile $filename -Name $deploymentName
}
else {
Write-AzOpsLog -Level Error -Topic "New-AzOpsStateDeployment" -Message "Resource Group [$($scope.resourcegroup)] not found. Unable to initiate deployment."
Write-AzOpsLog -Level Error -Topic "New-AzOpsStateDeployment" -Message "Resource Group [$($scope.resourcegroup)] not found. Unable to initiate deployment"
}
}
elseif ($scope.subscription -and $PSCmdlet.ShouldProcess("Start Subscription Deployment?")) {
Expand Down
35 changes: 26 additions & 9 deletions src/public/Initialize-AzOpsGlobalVariables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ function Initialize-AzOpsGlobalVariables {

# Required environment variables hashtable with default values
$AzOpsEnvVariables = @{
# AzOps
AZOPS_STATE = @{ AzOpsState = (Join-Path $pwd -ChildPath "azops") } # Folder to store AzOpsState artefact
AZOPS_MAIN_TEMPLATE = @{ AzOpsMainTemplate = "$PSScriptRoot\..\..\template\template.json" } # Main template json
AZOPS_STATE_CONFIG = @{ AzOpsStateConfig = "$PSScriptRoot\..\AzOpsStateConfig.json" } # Configuration file for resource serialization
AZOPS_ENROLLMENT_PRINCIPAL_NAME = @{ AzOpsEnrollmentAccountPrincipalName = $null }
AZOPS_ENROLLMENT_ACCOUNT = @{ AzOpsEnrollmentAccountPrincipalName = $null }
AZOPS_EXCLUDED_SUB_OFFER = @{ AzOpsExcludedSubOffer = "AzurePass_2014-09-01,FreeTrial_2014-09-01,AAD_2015-09-01" } # Excluded QuotaIDs as per https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers
AZOPS_EXCLUDED_SUB_STATE = @{ AzOpsExcludedSubState = "Disabled,Deleted,Warned,Expired,PastDue" } # Excluded subscription states as per https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/list#subscriptionstate
AZOPS_OFFER_TYPE = @{ AzOpsOfferType = 'MS-AZR-0017P' }
Expand All @@ -60,15 +61,31 @@ function Initialize-AzOpsGlobalVariables {
AZOPS_STRICT_MODE = @{ AzOpsStrictMode = 0 }
AZOPS_SKIP_RESOURCE_GROUP = @{ AzOpsSkipResourceGroup = 1 }
AZOPS_SKIP_POLICY = @{ AzOpsSkipPolicy = 0 }
GITHUB_API_URL = @{ GitHubApiUrl = $null }
GITHUB_PULL_REQUEST = @{ GitHubPullRequest = $null }
GITHUB_REPOSITORY = @{ GitHubRepository = $null }
GITHUB_TOKEN = @{ GitHubToken = $null }
GITHUB_AUTO_MERGE = @{ GitHubAutoMerge = 1 }
GITHUB_BRANCH = @{ GitHubBranch = $null }
GITHUB_COMMENTS = @{ GitHubComments = $null }
# Azure DevOps
AZDEVOPS_AUTO_MERGE = @{ AzDevOpsAutoMerge = 1 }
AZDEVOPS_EMAIL = @{ AzDevOpsEmail = $null }
AZDEVOPS_USERNAME = @{ AzDevOpsUsername = $null }
AZDEVOPS_PULL_REQUEST = @{ AzDevOpsPullRequest = $null }
AZDEVOPS_PULL_REQUEST_ID = @{ AzDevOpsPullRequestId = $null }
AZDEVOPS_HEAD_REF = @{ AzDevOpsHeadRef = $null }
AZDEVOPS_BASE_REF = @{ AzDevOpsBaseRef = $null }
AZDEVOPS_API_URL = @{ AzDevOpsApiUrl = $null }
AZDEVOPS_PROJECT_ID = @{ AzDevOpsProjectId = $null }
AZDEVOPS_REPOSITORY = @{ AzDevOpsRepository = $null }
AZDEVOPS_TOKEN = @{ AzDevOpsToken = $null }
# GitHub
GITHUB_AUTO_MERGE = @{ GitHubAutoMerge = 1 } # Auto merge pull requests for pull workflow
GITHUB_EMAIL = @{ GitHubEmail = $null }
GITHUB_USERNAME = @{ GitHubUsername = $null }
GITHUB_PULL_REQUEST = @{ GitHubPullRequest = $null } # Pull Request title
GITHUB_HEAD_REF = @{ GitHubHeadRef = $null }
GITHUB_BASE_REF = @{ GitHubBaseRef = $null }
GITHUB_API_URL = @{ GitHubApiUrl = $null } # Built-in env var
GITHUB_REPOSITORY = @{ GitHubRepository = $null } # Built-in env var
GITHUB_TOKEN = @{ GitHubToken = $null } # Built-in env var
GITHUB_COMMENTS = @{ GitHubComments = $null } # Built-in env var
# Source Control
SCM_PLATFORM = @{ SCMPlatform = "GitHub" }
}
# Iterate through each variable and take appropriate action
foreach ($AzOpsEnv in $AzOpsEnvVariables.Keys) {
Expand Down Expand Up @@ -165,7 +182,7 @@ function Initialize-AzOpsGlobalVariables {

}
else {
Write-AzOpsLog -Level Error -Topic "Initialize-AzOpsGlobalVariables" -Message "Cannot access root management group $RootScope. Verify that principal $((Get-AzContext).Account.Id) have access or set env:AZOPS_SUPPORT_PARTIAL_MG_DISCOVERY to 1 for partial discovery support."
Write-AzOpsLog -Level Error -Topic "Initialize-AzOpsGlobalVariables" -Message "Cannot access root management group $RootScope. Verify that principal $((Get-AzContext).Account.Id) have access or set env:AZOPS_SUPPORT_PARTIAL_MG_DISCOVERY to 1 for partial discovery support"
}

}
Expand Down
6 changes: 3 additions & 3 deletions src/public/Initialize-AzOpsRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ function Initialize-AzOpsRepository {
}
# Set environment variable ExportRawTemplate to 1 if switch ExportRawTemplate switch has been used
if ($PSBoundParameters['ExportRawTemplate']) {
$env:ExportRawTemplate = 1
$env:AZOPS_EXPORT_RAW_TEMPLATES = 1
}
# Initialize Global Variables and return error if not set
Initialize-AzOpsGlobalVariables
if (-not (Test-AzOpsVariables)) {
Write-AzOpsLog -Level Error -Topic "Initialize-AzOpsRepository" -Message "AzOps Global Variables not set."
Write-AzOpsLog -Level Error -Topic "Initialize-AzOpsRepository" -Message "AzOps Global Variables not set"
}
# Get tenant id for current Az Context
$TenantId = (Get-AzContext).Tenant.Id
Expand All @@ -123,7 +123,7 @@ function Initialize-AzOpsRepository {
#Handle migration from old folder structure by checking for parenthesis pattern
$MigrationRequired = (Get-ChildItem -Recurse -Force -Path $global:AzOpsState -File | Where-Object { $_.Name -like "Microsoft.Management-managementGroups_$TenantId.parameters.json" } | Select-Object -ExpandProperty FullName -First 1) -notmatch '\((.*)\)'
if ($MigrationRequired) {
Write-AzOpsLog -Level Verbose -Topic "Initialize-AzOpsRepository" -Message "Migration from old to new structure required. All artifacts will be lost."
Write-AzOpsLog -Level Verbose -Topic "Initialize-AzOpsRepository" -Message "Migration from old to new structure required. All artifacts will be lost"
}
if ($PSBoundParameters['Force'] -or $true -eq $MigrationRequired) {
# Force will delete $global:AzOpsState directory
Expand Down
Loading