You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Pull Request
## Description
Support SP auth and skip az cli checks. Issue spotted in e2e tests.
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
message="Azure environment variables are set, but are not unique GUIDs. There is at least one duplicate:$envVarValidationOutput."
102
+
result="Failure"
103
+
}
104
+
$hasFailure=$true
67
105
}
68
106
} else {
69
-
$checkResults+=@{
70
-
message="Azure CLI is not logged in. Please login to Azure CLI using 'az login -t `"00000000-0000-0000-0000-000000000000}`"', replacing the empty GUID with your tenant ID."
message="At least one environment variable is set, but the other expected environment variables are not set. This could cause Terraform to fail in unexpected ways. Set environment variables:$envVarValidationOutput."
115
+
result="Warning"
116
+
}
117
+
}
118
+
119
+
# Check if Azure CLI is installed
120
+
Write-Verbose"Checking Azure CLI installation"
121
+
$azCliPath=Get-Command az -ErrorAction SilentlyContinue
122
+
if ($azCliPath) {
123
+
$checkResults+=@{
124
+
message="Azure CLI is installed."
125
+
result="Success"
126
+
}
127
+
} else {
128
+
$checkResults+=@{
129
+
message="Azure CLI is not installed. Follow the instructions here: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli"
130
+
result="Failure"
131
+
}
132
+
$hasFailure=$true
133
+
}
134
+
135
+
# Check if Azure CLI is logged in
136
+
Write-Verbose"Checking Azure CLI login status"
137
+
$azCliAccount=$(az account show -o json) |ConvertFrom-Json
138
+
if ($azCliAccount) {
139
+
$checkResults+=@{
140
+
message="Azure CLI is logged in. Tenant ID: $($azCliAccount.tenantId), Subscription: $($azCliAccount.name) ($($azCliAccount.id))"
141
+
result="Success"
142
+
}
143
+
} else {
144
+
$checkResults+=@{
145
+
message="Azure CLI is not logged in. Please login to Azure CLI using 'az login -t `"00000000-0000-0000-0000-000000000000}`"', replacing the empty GUID with your tenant ID."
0 commit comments