Skip to content

Commit

Permalink
provider/powerdns: Add site documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alkersan authored and jen20 committed Jan 28, 2016
1 parent a9d5dd5 commit 3cfe337
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions website/source/assets/stylesheets/_docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ body.layout-mysql,
body.layout-openstack,
body.layout-packet,
body.layout-postgresql,
body.layout-powerdns,
body.layout-rundeck,
body.layout-statuscake,
body.layout-template,
Expand Down
36 changes: 36 additions & 0 deletions website/source/docs/providers/powerdns/index.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: "powerdns"
page_title: "Provider: PowerDNS"
sidebar_current: "docs-powerdns-index"
description: |-
The PowerDNS provider is used manipulate DNS records supported by PowerDNS server. The provider needs to be configured with the proper credentials before it can be used.
---

# PowerDNS Provider

The PowerDNS provider is used manipulate DNS records supported by PowerDNS server. 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 PowerDNS provider
provider "powerdns" {
api_key = "${var.pdns_api_key}"
server_url = "${var.pdns_server_url}"
}
# Create a record
resource "powerdns_record" "www" {
...
}
```

## Argument Reference

The following arguments are supported:

* `api_key` - (Required) The PowerDNS API key. This can also be specified with `PDNS_API_KEY` environment variable.
* `server_url` - (Required) The address of PowerDNS server. This can also be specified with `PDNS_SERVER_URL` environment variable.
35 changes: 35 additions & 0 deletions website/source/docs/providers/powerdns/r/record.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: "powerdns"
page_title: "PowerDNS: powerdns_record"
sidebar_current: "docs-powerdns-resource-record"
description: |-
Provides a PowerDNS record resource.
---

# powerdns\_record

Provides a PowerDNS record resource.

## Example Usage

```
# Add a record to the zone
resource "powerdns_record" "foobar" {
zone = "example.com"
name = "www.example.com"

This comment has been minimized.

Copy link
@linuxus

linuxus Feb 18, 2016

In this example the name value should be terminated by a . (dot) otherwise an error is raised during Terraform apply: powerdns_record.www: Failed to create PowerDNS Record: Error creating record set: www.example.org-A, reason: "DNS Name 'www.example.org' is not canonical"

So the example under the "powerdns_record" should be as follow: name = "www.example.com**.**"

type = "A"
ttl = 300
records = ["192.168.0.11"]
}
```

## Argument Reference

The following arguments are supported:

* `zone` - (Required) The name of zone to contain this record.
* `name` - (Required) The name of the record.
* `type` - (Required) The record type.
* `ttl` - (Required) The TTL of the record.
* `records` - (Required) A string list of records.

4 changes: 4 additions & 0 deletions website/source/layouts/docs.erb
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
<a href="/docs/providers/postgresql/index.html">PostgreSQL</a>
</li>

<li<%= sidebar_current("docs-providers-powerdns") %>>
<a href="/docs/providers/powerdns/index.html">PowerDNS</a>
</li>

<li<%= sidebar_current("docs-providers-rundeck") %>>
<a href="/docs/providers/rundeck/index.html">Rundeck</a>
</li>
Expand Down
26 changes: 26 additions & 0 deletions website/source/layouts/powerdns.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<div class="docs-sidebar hidden-print affix-top" role="complementary">
<ul class="nav docs-sidenav">
<li<%= sidebar_current("docs-home") %>>
<a href="/docs/providers/index.html">&laquo; Documentation Home</a>
</li>

<li<%= sidebar_current("docs-powerdns-index") %>>
<a href="/docs/providers/powerdns/index.html">PowerDNS Provider</a>
</li>

<li<%= sidebar_current(/^docs-powerdns-resource/) %>>
<a href="#">Resources</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-powerdns-resource-record") %>>
<a href="/docs/providers/powerdns/r/record.html">powerdns_record</a>
</li>
</ul>
</li>
</ul>
</div>
<% end %>
<%= yield %>
<% end %>

0 comments on commit 3cfe337

Please sign in to comment.