First of all, thank you for your great work !!!
I generated happily my new Let’s encrypt certificates by Azure automation account runbook using POSH-ACME 3.11 module.
I am now testing the renewal, but I am having issues using submit-renewal with the account.
I generated a new test ssl cert for poshtesttovault2.thamescloud-dev.net , 2 days ago by and I was trying to renew the specific ssl by :
I think the issue may be specific to Azure Automation. If memory serves, the config in %LOCALAPPDATA% isn’t saved between instances. So you’re effectively starting from scratch each time and your existing account info doesn’t exist unless you specifically backed it up somewhere or used an alternate config location by setting the POSHACME_HOME environment variable. Let me see if I can confirm that though.
Unfortunately, I’m not terribly familiar with how Azure Automation works and I can’t find any concrete docs that indicate the local config is wiped between invocations of a workflow. But it makes sense if the code can’t find the previous account details.
I did find a couple articles that might be helpful though. The first one is more about using Azure DevOps than Automation, but talks about storing the config in Blob storage.
The second one is specific to Azure Automation, but appears to use a strategy of just creating everything from scratch each time.
Thank you for your help!
So, I would be more than happy to store the config location to poshacme_home environment variable if it solves the issue, I need to investigate further this path for Azure Automation.
Yeah, basically you can set POSHACME_HOME to some other filesystem location before the module is imported and it will create the local config files there instead of the default location in AppData\Local. But I’m not sure where to suggest saving it on Azure Automation. It sounds like there may not actually be a persistent filesystem location at all between invocations. Something like Blob storage may be your only choice.