Skip to content
Open
Changes from all commits
Commits
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
14 changes: 10 additions & 4 deletions ACA/deploy-to-aca.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,15 @@ if ($imageExists -eq 'true') {

Write-Host "`nStep 3: Prompting for StateStore connection string..." -ForegroundColor Yellow
$secureConnString = Read-Host -Prompt "The StateStore keeps track of migration job details in a DocumentDB. You may use the same database as the Target DocumentDB or a separate one. Enter the connection string for the StateStore." -AsSecureString
$connString = [Runtime.InteropServices.Marshal]::PtrToStringAuto(
[Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureConnString)
)
$bstr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureConnString)
try {
$connString = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($bstr)
} catch {
Write-Host "`nError: Failed to read the StateStore connection string: $_" -ForegroundColor Red
exit 1
} finally {
[Runtime.InteropServices.Marshal]::ZeroFreeBSTR($bstr)
}

Write-Host "`nStep 4: Deploying Container App with application image..." -ForegroundColor Yellow

Expand All @@ -179,7 +185,7 @@ $finalBicepParams = @(
"vCores=$VCores",
"memoryGB=$MemoryGB",
"stateStoreAppID=$StateStoreAppID",
"stateStoreConnectionString=`"$connString`"",
"stateStoreConnectionString=$connString",
"aspNetCoreEnvironment=Development",
"imageTag=$ImageTag",
"ownerTag=$OwnerTag",
Expand Down