From 7061448d74a0524eb4f50f54c65ffea8f3436fcc Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Sat, 10 Oct 2015 21:24:54 -0700 Subject: [PATCH] Docs for InfluxDB provider and database resource --- website/source/assets/stylesheets/_docs.scss | 1 + .../providers/influxdb/index.html.markdown | 40 +++++++++++++++++++ .../providers/influxdb/r/database.html.md | 30 ++++++++++++++ website/source/layouts/docs.erb | 4 ++ website/source/layouts/influxdb.erb | 26 ++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 website/source/docs/providers/influxdb/index.html.markdown create mode 100644 website/source/docs/providers/influxdb/r/database.html.md create mode 100644 website/source/layouts/influxdb.erb diff --git a/website/source/assets/stylesheets/_docs.scss b/website/source/assets/stylesheets/_docs.scss index 1630ffb47..866feee53 100755 --- a/website/source/assets/stylesheets/_docs.scss +++ b/website/source/assets/stylesheets/_docs.scss @@ -23,6 +23,7 @@ body.layout-dyn, body.layout-github, body.layout-google, body.layout-heroku, +body.layout-influxdb, body.layout-mailgun, body.layout-mysql, body.layout-openstack, diff --git a/website/source/docs/providers/influxdb/index.html.markdown b/website/source/docs/providers/influxdb/index.html.markdown new file mode 100644 index 000000000..bf8f49c98 --- /dev/null +++ b/website/source/docs/providers/influxdb/index.html.markdown @@ -0,0 +1,40 @@ +--- +layout: "influxdb" +page_title: "Provider: InfluxDB" +sidebar_current: "docs-influxdb-index" +description: |- + The InfluxDB provider configures databases, etc on an InfluxDB server. +--- + +# InfluxDB Provider + +The InfluxDB provider allows Terraform to create Databases in +[InfluxDB](https://influxdb.com/). InfluxDB is a database server optimized +for time-series data. + +The provider configuration block accepts the following arguments: + +* ``url`` - (Optional) The root URL of a InfluxDB server. May alternatively be + set via the ``INFLUXDB_URL`` environment variable. Defaults to + `http://localhost:8086/`. + +* ``username`` - (Optional) The name of the user to use when making requests. + May alternatively be set via the ``INFLUXDB_USERNAME`` environment variable. + +* ``password`` - (Optional) The password to use when making requests. + May alternatively be set via the ``INFLUXDB_PASSWORD`` environment variable. + +Use the navigation to the left to read about the available resources. + +## Example Usage + +``` +provider "influxdb" { + url = "http://influxdb.example.com/" + username = "terraform" +} + +resource "influxdb_database" "metrics" { + name = "awesome_app" +} +``` diff --git a/website/source/docs/providers/influxdb/r/database.html.md b/website/source/docs/providers/influxdb/r/database.html.md new file mode 100644 index 000000000..0508e5fb3 --- /dev/null +++ b/website/source/docs/providers/influxdb/r/database.html.md @@ -0,0 +1,30 @@ +--- +layout: "influxdb" +page_title: "InfluxDB: influxdb_database" +sidebar_current: "docs-influxdb-resource-database" +description: |- + The influxdb_database resource allows an InfluxDB database to be created. +--- + +# influxdb\_database + +The database resource allows a database to be created on an InfluxDB server. + +## Example Usage + +``` +resource "influxdb_database" "metrics" { + name = "awesome_app" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name for the database. This must be unique on the + InfluxDB server. + +## Attributes Reference + +This resource exports no further attributes. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 94a8d1ba7..8ea90cf1a 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -197,6 +197,10 @@ Heroku + > + InfluxDB + + > Mailgun diff --git a/website/source/layouts/influxdb.erb b/website/source/layouts/influxdb.erb new file mode 100644 index 000000000..24a764e9f --- /dev/null +++ b/website/source/layouts/influxdb.erb @@ -0,0 +1,26 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %>