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"