From e81e9d6d739bf0b854ee6d903672e499f3513b32 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Thu, 24 Jul 2014 10:29:42 -0400 Subject: [PATCH] website: Document digitalocean --- .../docs/providers/do/index.html.markdown | 34 ++++++++++++ .../docs/providers/do/r/droplet.html.markdown | 53 +++++++++++++++++++ website/source/layouts/digitalocean.erb | 26 +++++++++ website/source/stylesheets/_docs.less | 3 +- website/source/stylesheets/main.css | 3 ++ 5 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 website/source/docs/providers/do/index.html.markdown create mode 100644 website/source/docs/providers/do/r/droplet.html.markdown create mode 100644 website/source/layouts/digitalocean.erb diff --git a/website/source/docs/providers/do/index.html.markdown b/website/source/docs/providers/do/index.html.markdown new file mode 100644 index 000000000..c074d6ac2 --- /dev/null +++ b/website/source/docs/providers/do/index.html.markdown @@ -0,0 +1,34 @@ +--- +layout: "digitalocean" +page_title: "Provider: DigitalOcean" +sidebar_current: "docs-do-index" +--- + +# DigitalOcean Provider + +The DigitalOcean (DO) provider is used to interact with the +resources supported by DigitalOcean. The provider needs to be configured +with the proper credentials before it can be used. + +Use the navigation to the left to read about the available resources. + +## Example Usage + +``` +# Configure the DigitalOcean Provider +provider "digitalocean" { + token = "${var.do_token}" +} + +# Create a web server +resource "digitalocean_droplet" "web" { + ... +} +``` + +## Argument Reference + +The following arguments are supported: + +* `token` - (Required) This is the DO API token. + diff --git a/website/source/docs/providers/do/r/droplet.html.markdown b/website/source/docs/providers/do/r/droplet.html.markdown new file mode 100644 index 000000000..6a913d71e --- /dev/null +++ b/website/source/docs/providers/do/r/droplet.html.markdown @@ -0,0 +1,53 @@ +--- +layout: "digitalocean" +page_title: "DigitalOcean: digitalocean_droplet" +sidebar_current: "docs-do-resource-droplet" +--- + +# digitalocean\_droplet + +Provides a DigitalOcean droplet resource. This can be used to create, +modify, and delete droplets. Droplets also support +[provisioning](/docs/provisioners/index.html). + +## Example Usage + +``` +# Create a new Web droplet in the nyc2 region +resource "digitalocean_droplet" "web" { + image = "ubuntu1404" + name = "web-1" + region = "nyc2" + size = "512mb" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `image` - (Required) The droplet image ID or slug. +* `name` - (Required) The droplet name +* `region` - (Required) The region to start in +* `size` - (Required) The instance size to start +* `backups` - (Optional) Boolean controling if backups are made. +* `ipv6` - (Optional) Boolean controling if IPv6 is enabled. +* `private_networking` - (Optional) Boolean controling if private networks are enabled. +* `ssh_keys` - (Optional) A list of SSH IDs or fingerprints to enable. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the droplet +* `name`- The name of the droplet +* `region` - The region of the droplet +* `image` - The image of the droplet +* `ipv6` - Is IPv6 enabled +* `ipv6_address` - The IPv6 address +* `ipv4_address` - The IPv4 address +* `locked` - Is the Droplet locked +* `private_networking` - Is private networking enabled +* `size` - The instance size +* `status` - The status of the droplet + diff --git a/website/source/layouts/digitalocean.erb b/website/source/layouts/digitalocean.erb new file mode 100644 index 000000000..1a6023be2 --- /dev/null +++ b/website/source/layouts/digitalocean.erb @@ -0,0 +1,26 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> + <% end %> diff --git a/website/source/stylesheets/_docs.less b/website/source/stylesheets/_docs.less index 89cf52dc7..4b5e20707 100755 --- a/website/source/stylesheets/_docs.less +++ b/website/source/stylesheets/_docs.less @@ -6,6 +6,7 @@ body.page-sub{ background-color: @light-black; } +body.layout-digitalocean, body.layout-aws, body.layout-docs, body.layout-inner, @@ -252,7 +253,7 @@ body.layout-intro{ } } } - } + } .bs-docs-section{ h1{ diff --git a/website/source/stylesheets/main.css b/website/source/stylesheets/main.css index 3f10fba3a..69efff06e 100644 --- a/website/source/stylesheets/main.css +++ b/website/source/stylesheets/main.css @@ -1110,12 +1110,14 @@ body.page-home #footer { body.page-sub { background-color: #242424; } +body.layout-digitalocean, body.layout-aws, body.layout-docs, body.layout-inner, body.layout-intro { background: #242424 url('../images/sidebar-wire.png') left 62px no-repeat; } +body.layout-digitalocean > .container .col-md-8[role=main], body.layout-aws > .container .col-md-8[role=main], body.layout-docs > .container .col-md-8[role=main], body.layout-inner > .container .col-md-8[role=main], @@ -1123,6 +1125,7 @@ body.layout-intro > .container .col-md-8[role=main] { min-height: 800px; background-color: white; } +body.layout-digitalocean > .container .col-md-8[role=main] > div, body.layout-aws > .container .col-md-8[role=main] > div, body.layout-docs > .container .col-md-8[role=main] > div, body.layout-inner > .container .col-md-8[role=main] > div,