In BootstrapDeployToAzure.ps1 we have:
$certificate = new-object System.Security.Cryptography.X509Certificates.X509Certificate2
-ArgumentList @($OctopusAzureCertificateFileName, $OctopusAzureCertificatePassword)
Set-AzureSubscription -CurrentStorageAccount $OctopusAzureStorageAccountName
-SubscriptionName $OctopusAzureSubscriptionName
-SubscriptionId $OctopusAzureSubscriptionId
-Certificate $certificate
The variables $OctopusAzureCertificateFileName
and $OctopusAzureCertificatePassword
aren’t available in “regular” powershell step scripts, nor are they something we can hard-code. I’d like to use them to perform some custom Azure interactions after some manual intervention steps. The tricky part is understanding how to get hold of the cert + password, if that is at all possible. So my steps look like:
- Azure Deploy
- Manual Intervention
- Custom Powershell (does some Azure stuff)
- Manual Intervention
- Custom Powershell (does some Azure stuff)
Where 3 & 5 are hard to get configured correctly.
Can you give any advice? Ultimately I want to end up running some powershell after deploying to Azure, with the correct subscription all set and ready to go.