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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.