Question

I am trying to create a volume with terraform, but the error does not indicate any reason(s) why. I can create it using the web interface.

Code:

resource "digitalocean_volume" "vs001images" {
  region                  = "LON1"
  name                    = "vs001images"
  size                    = 2
  initial_filesystem_type = "ext4"
  description             = "Data volume for user and system images"
}

The error reported:

digitalocean_volume.vs001images: Creating...
  description:             "" => "Data volume for user and system images"
  droplet_ids.#:           "" => "<computed>"
  filesystem_label:        "" => "<computed>"
  filesystem_type:         "" => "<computed>"
  initial_filesystem_type: "" => "ext4"
  name:                    "" => "vs001images"
  region:                  "" => "LON1"
  size:                    "" => "2"

Error: Error applying plan:

1 error(s) occurred:

* digitalocean_volume.vs001images: 1 error(s) occurred:

* digitalocean_volume.vs001images: Error creating Volume: POST https://api.digitalocean.com/v2/volumes: 422 (request "f259a46c-de0a-46bc-979c-6ed1994c71cc") failed to create volume

I have seen that some other errors indicating that the region might not support this, but there are no signs here.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer