We have made a mistake and accidentally re-created some of our intra around 10 times due to some bad erraform provider
Since we have automated certificate provisioning with LE, we re-issues our cert around 10 times (successfully) and then we were blocked by LE for a week.
Unfortunatley we do not have the private keys of any of the previous revisions so we can't really switch back to the latest certificate.
That is strange because we did around 10 re-creations of our VM that had only one domain configured there. The error we got was:
module.vm_mattermost_setup_mattermost.null_resource.script (remote-exec): An unexpected error occurred:
module.vm_mattermost_setup_mattermost.null_resource.script (remote-exec): Error creating new order :: too many certificates (5) already issued for this exact set of domains in the last 168 hours: xxxxxx, retry after 2024-02-03T01:10:59Z: see https://letsencrypt.org/docs/duplicate-certificate-limit/
Changing to another CA would be a lot of change for us as we have wrapped everything with LE
@rg305 do you mean to add another domain or switch to www.?
Another workaround is to add another valid hostname (e.g. temp.chat.rso.dev also resolving to the same IP) to your certificate, this will be seen as a new order. You can take it out later once things have settled down.
For potentially ephemeral infrastructure I recommend acquiring certs and storing them either in a persistent volume or a secrets store, with renewal independent from the service that requires them. That way you can recreate your infrastructure as often as you like.