Report this

What is the reason for this report?

Terraform cant create volumes

Posted on April 12, 2019

I am trying to spin up a volume via terraform to attach to droplets that terraform creates. Droplet creation works fine hence provider settings are correct, but volume creation constantly fails with no indication of why in the generated error

digitalocean_volume.glusterStore1: Creating...
  description:             "" => "Gluster Brick Storage - Server01"
  droplet_ids.#:           "" => "<computed>"
  filesystem_label:        "" => "<computed>"
  filesystem_type:         "" => "<computed>"
  initial_filesystem_type: "" => "xfs"
  name:                    "" => "glusterStore1"
  region:                  "" => "SFO2"
  size:                    "" => "25"

Error: Error applying plan:

1 error(s) occurred:

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

* digitalocean_volume.glusterStore1: Error creating Volume: POST https://api.digitalocean.com/v2/volumes: 422 (request "XXXXX") failed to create volume

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Anyone have any idea why its failing?



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Greetings!

Great question, thank you for posting it here. I ran this by one of our engineers, Sebastian, and he was able to locate the issue in this case. It seems that the actual error on our side was “invalid region name.” It seems that it may need to be “sfo2” instead of “SFO2” and I’ll be honest, I would not have caught that. I hope that helps!

Jarland

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.