Skip to content

Commit 3b31ed6

Browse files
committed
fix invocation
1 parent 3222743 commit 3b31ed6

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.azuredevops/templates/steps/terraform-init-plan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ steps:
273273
-AttemptAzureLogin '${{ parameters.AttemptAzureLogin }}' `
274274
-InstallCheckov '${{ parameters.InstallCheckov }}'
275275
name: RunAzTerraform
276-
displayName: 'Run Terraform orchestration'
276+
displayName: 'Run Terraform init & Terraform plan'
277277
env:
278278
${{ if eq(parameters.UseAzureServiceConnection, 'true') }}:
279279
# Always required with service connection

Run-AzTerraform.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,10 @@ finally
381381
-InvocationName $MyInvocation.MyCommand.Name
382382
}
383383

384-
if ($convertedUseAzureUserLogin)
384+
if ($convertedUseAzureUserLogin -and $convertedAttemptAzureLogin)
385385
{
386386
Disconnect-AzureCli -IsUserDeviceLogin $true
387387
}
388-
else
389-
{
390-
Disconnect-AzureCli -IsUserDeviceLogin $false
391-
}
392388

393389
$Env:TF_LOG = $null
394390
Set-Location $currentWorkingDirectory

0 commit comments

Comments
 (0)