1 error(s) occurred:
digitalocean_droplet.master: 1 error(s) occurred:
digitalocean_droplet.master: Error creating droplet: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.
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.
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
With Terraform, the image value should be the “slug” of a public DigitalOcean image or the ID of a snapshot you’ve taken of a Droplet. You can get the full list of DigitalOcean image slugs by querying the API:
https://api.digitalocean.com/v2/images
For reference, here are the slugs for the available versions of CentOS:
Other base distribution images follow the same pattern.
Check out the images section of the API documentation for more information: