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.

October 30, 2018 446 views
Terraform CentOS

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:

digitaloceanvolume.vs001images: Creating...
description: "" => "Data volume for user and system images"
droplet
ids.#: "" => "<computed>"
filesystemlabel: "" => "<computed>"
filesystem
type: "" => "<computed>"
initialfilesystemtype: "" => "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.

Be the first one to answer this question.