I’m recently getting an error on an Azure PowerShell step, and I’m getting the same error for Web App deployment steps. I think I have narrowed it to the Azure CLI, which is not behaving as expected when running in a USGov azure region. The powershell script executed fine (and does not use the Azure CLI btw). Here’s the log output:
03:24:04 Verbose | Authenticating with Service Principal
03:24:04 Verbose | Account : <redacted>
03:24:04 Verbose | SubscriptionName : <redacted>
03:24:04 Verbose | SubscriptionId : <redacted>
03:24:04 Verbose | TenantId : <redacted>
03:24:04 Verbose | Environment : AzureUSGovernment
03:24:06 Error | ERROR: No subscriptions were found for '<redacted>'. If this is expected, use '--allow-no-subscriptions' to have tenant level accesses
03:24:08 Error | ERROR: The subscription of '<redacted>' doesn't exist in cloud 'AzureCloud'.
03:24:08 Verbose | Successfully authenticated with the Azure CLI
03:24:08 Verbose | Invoking target script "C:\Octopus\Work\20180829032401-57804-1496\Script.ps1" with parameters
03:24:08 Info | Loading Existing AppSettings
03:24:09 Info | Applying New AppSettings
03:24:09 Info | Saving AppSettings
03:24:11 Info | AppSettings Updated
03:24:12 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20180829032401-57804-1496 exited with code 1
03:24:12 Verbose | Updating manifest with output variables
03:24:12 Verbose | Updating manifest with action evaluated variables
03:24:12 Fatal | The remote script failed with exit code 1
03:24:12 Fatal | The action Configure App on <redacted> failed
What jumps out at me is the following since this is in AzureUSGovernment:
ERROR: The subscription of '<redacted>' doesn't exist in cloud 'AzureCloud'.