9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Terraformで設定するdigitaloceanのパラメータ一覧

Posted at

erraformで設定するdigitaloceanのパラメータの値がわからなかったのでまとめました。

resource "digitalocean_droplet" "node" {
    image = "ubuntu-14-04-x64"  // images
    name = "xxxxx"
    region = "sgp1"  // regison
    size = "512mb"  // size
}

取得方法

[digitalocean api] (https://developers.digitalocean.com/)

regions

curl

curl -X GET "https://api.digitalocean.com/v2/sizes" -H "Authorization: Bearer $TOKEN"

regions一覧(JSON抜粋)

"slug":"nyc1"
"slug":"ams1"
"slug":"sfo1"
"slug":"nyc2"
"slug":"ams2"
"slug":"sgp1"
"slug":"lon1"
"slug":"nyc3"

size

curl

curl -X GET "https://api.digitalocean.com/v2/sizes" -H "Authorization: Bearer $TOKEN"

size一覧(JSON抜粋)

"slug":"512mb",
"slug":"1gb",
"slug":"2gb",
"slug":"4gb",
"slug":"8gb",
"slug":"16gb",
"slug":"32gb",
"slug":"48gb",
"slug":"64gb",

images

curl

curl -X GET "https://api.digitalocean.com/v2/images" -H "Authorization: Bearer $TOKEN"

images一覧(JSON抜粋)

"slug":"ruby-on-rails"
"slug":"node"
"slug":"django"
"slug":"lamp"
"slug":"lemp"
"slug":"docker"
"slug":"mean"
"slug":"dokku"
"slug":"gitlab"
"slug":"ghost"
"slug":"centos-5-8-x64"
"slug":"centos-5-8-x32"
"slug":"centos-6-4-x32"
"slug":"centos-6-4-x64"
"slug":"fedora-19-x32"
"slug":"fedora-19-x64"
"slug":"fedora-20-x32"
"slug":"fedora-20-x64"
"slug":"centos-6-5-x64"
"slug":"centos-6-5-x32"
"slug":"centos-7-0-x64"
"slug":"ubuntu-14-04-x64"
"slug":"ubuntu-14-04-x32"
"slug":"debian-7-0-x64"
"slug":"debian-7-0-x32"
"slug":"debian-6-0-x32"
"slug":"debian-6-0-x64"
"slug":"ubuntu-10-04-x32"
"slug":"ubuntu-10-04-x64"
"slug":"ubuntu-12-04-x64"
"slug":"ubuntu-12-04-x32"

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?