ACME certificates with webroot challenge

Hello everyone!

I’m trying to automate certificate’s generation via Let’s encrypt through Terraform.

I have found this provider, which seems to be trusty, that’s documented here:

A quick example is the following:

resource "acme_certificate" "certificate" {

  # Use http_webroot_challenge to publish a record to a location 
  # on the file system. The record is  published
  # to DIRECTORY/.well-known/acme-challenge/. The resource will request an HTTP-01
  # challenge for which an out-of-band process must use this data to answer.
  http_webroot_challenge {
    directory = "/a/webserver/path"


I don’t understand where the records or certs are going to be saved when the challenge occurs, cause I clearly don’t want them to be saved in my local machine from where I run Terrafrom, I want them to be saved in a VM of my cloud provider (Digital Ocean) but the resource “acme_certificate” does not give me any option or configuration to point or select the VM I want.

Do anyone know how to use this resource with http_webroot_challenge ?

Thank you in advance,