Merge branch 'master' of github.com:hashicorp/terraform
This commit is contained in:
commit
5439e66fdb
|
@ -142,6 +142,7 @@ func resource_dnsimple_record_diff(
|
||||||
"priority",
|
"priority",
|
||||||
"domain_id",
|
"domain_id",
|
||||||
"ttl",
|
"ttl",
|
||||||
|
"hostname",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
layout: "docs"
|
||||||
|
page_title: "Interpolation Syntax"
|
||||||
|
sidebar_current: "docs-config-interpolation"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Interpolation Syntax
|
||||||
|
|
||||||
|
Embedded within strings in Terraform, whether you're using the
|
||||||
|
Terraform syntax or JSON syntax, you can interpolate other values
|
||||||
|
into strings. These interpolations are wrapped in `${}`, such as
|
||||||
|
`${var.foo}`.
|
||||||
|
|
||||||
|
The interpolation syntax is powerful and allows you to reference
|
||||||
|
variables, attributes of resources, call functions, etc.
|
||||||
|
|
||||||
|
To reference variables, use the `var.` prefix followed by the
|
||||||
|
variable name. For example, `${var.foo}` will interpolate the
|
||||||
|
`foo` variable value. If the variable is a mapping, then you
|
||||||
|
can reference static keys in the map with the syntax
|
||||||
|
`var.MAP.KEY`. For example, `${var.amis.us-east-1}` would
|
||||||
|
get the value of the `us-east-1` key within the `amis` variable
|
||||||
|
that is a mapping.
|
||||||
|
|
||||||
|
To reference attributes of other resources, the syntax is
|
||||||
|
`TYPE.NAME.ATTRIBUTE`. For example, `${aws_instance.web.id}`
|
||||||
|
will interpolate the ID attribute from the "aws\_instance"
|
||||||
|
resource named "web".
|
||||||
|
|
||||||
|
Finally, Terraform ships with built-in functions. Functions
|
||||||
|
are called with the syntax `name(arg, arg2, ...)`. For example,
|
||||||
|
to read a file: `${file("path.txt")}`. The built-in functions
|
||||||
|
are documented below.
|
||||||
|
|
||||||
|
## Built-in Functions
|
||||||
|
|
||||||
|
The supported built-in functions are:
|
||||||
|
|
||||||
|
* `file(path)` - Reads the contents of a file into the string.
|
||||||
|
|
||||||
|
* `lookup(map, key)` - Performs a dynamic lookup into a mapping
|
||||||
|
variable.
|
|
@ -8,9 +8,13 @@ sidebar_current: "docs-config-load"
|
||||||
|
|
||||||
When invoking any command that loads the Terraform configuration,
|
When invoking any command that loads the Terraform configuration,
|
||||||
Terraform loads all configuration files within the directory
|
Terraform loads all configuration files within the directory
|
||||||
specified in alphabetical order. The flies loaded must end in
|
specified in alphabetical order.
|
||||||
|
|
||||||
|
The files loaded must end in
|
||||||
either `.tf` or `.tf.json` to specify the format that is in use.
|
either `.tf` or `.tf.json` to specify the format that is in use.
|
||||||
Otherwise, the files are ignored.
|
Otherwise, the files are ignored. Multiple file formats can
|
||||||
|
be present in the same directory; it is okay to have one Terraform
|
||||||
|
configuration file be Terraform syntax and another be JSON.
|
||||||
|
|
||||||
[Override](/docs/configuration/override.html)
|
[Override](/docs/configuration/override.html)
|
||||||
files are the exception, as they're loaded after all non-override
|
files are the exception, as they're loaded after all non-override
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
---
|
||||||
|
layout: "docs"
|
||||||
|
page_title: "Overrides"
|
||||||
|
sidebar_current: "docs-config-override"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Overrides
|
||||||
|
|
||||||
|
Terraform loads all configuration files within a directory and
|
||||||
|
appends them together. Terraform also has a concept of _overrides_,
|
||||||
|
a way to create files that are loaded last and _merged_ into your
|
||||||
|
configuration, rather than appended.
|
||||||
|
|
||||||
|
Overrides have a few use cases:
|
||||||
|
|
||||||
|
* Machines (tools) can create overrides to modify Terraform
|
||||||
|
behavior without having to edit the Terraform configuration
|
||||||
|
tailored to human readability.
|
||||||
|
|
||||||
|
* Temporary modifications can be made to Terraform configurations
|
||||||
|
without having to modify the configuration itself.
|
||||||
|
|
||||||
|
Overrides names must be `override` or end in `_override`, excluding
|
||||||
|
the extension. Examples of valid override files are `override.tf`,
|
||||||
|
`override.tf.json`, `temp_override.tf`.
|
||||||
|
|
||||||
|
Override files are loaded last in alphabetical order.
|
||||||
|
|
||||||
|
Override files can be in Terraform syntax or JSON, just like non-override
|
||||||
|
Terraform configurations.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
If you have a Terraform configuration `example.tf` with the contents:
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_instance" "web" {
|
||||||
|
ami = "ami-1234567"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And you created a file `override.tf` with the contents:
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_instance" "web" {
|
||||||
|
ami = "foo"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then the AMI for the one resource will be replaced with "foo". Note
|
||||||
|
that the override syntax can be Terraform syntax or JSON. You can
|
||||||
|
mix and match syntaxes without issue.
|
|
@ -47,6 +47,11 @@ Basic bullet point reference:
|
||||||
|
|
||||||
* Strings are in double-quotes.
|
* Strings are in double-quotes.
|
||||||
|
|
||||||
|
* Strings can interpolate other values using syntax wrapped
|
||||||
|
in `${}`, such as `${var.foo}`. The full syntax for interpolation
|
||||||
|
is
|
||||||
|
[documented here](/docs/configuration/interpolation.html).
|
||||||
|
|
||||||
* Numbers are assumed to be base 10. If you prefix a number with
|
* Numbers are assumed to be base 10. If you prefix a number with
|
||||||
`0x`, it is treated as a hexadecimal number.
|
`0x`, it is treated as a hexadecimal number.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
layout: "dnsimple"
|
||||||
|
page_title: "Provider: DNSimple"
|
||||||
|
sidebar_current: "docs-dnsimple-index"
|
||||||
|
---
|
||||||
|
|
||||||
|
# DNSimple Provider
|
||||||
|
|
||||||
|
The DNSimple provider is used to interact with the
|
||||||
|
resources supported by DNSimple. 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 DNSimple provider
|
||||||
|
provider "dnsimple" {
|
||||||
|
token = "${var.dnsimple_token}"
|
||||||
|
email = "${var.dnsimple_email}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a record
|
||||||
|
resource "dnsimple_record" "www" {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `token` - (Required) The DNSimple API token
|
||||||
|
* `email` - (Required) The email associated with the token
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
---
|
||||||
|
layout: "dnsimple"
|
||||||
|
page_title: "DNSimple: dnsimple_record"
|
||||||
|
sidebar_current: "docs-dnsimple-resource-record"
|
||||||
|
---
|
||||||
|
|
||||||
|
# dnsimple\_record
|
||||||
|
|
||||||
|
Provides a DNSimple record resource.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
# Add a record to the domain
|
||||||
|
resource "dnsimple_record" "foobar" {
|
||||||
|
domain = "${var.dnsimple_domain}"
|
||||||
|
name = "terraform"
|
||||||
|
value = "192.168.0.11"
|
||||||
|
type = "A"
|
||||||
|
ttl = 3600
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `domain` - (Required) The domain to add the record to
|
||||||
|
* `name` - (Required) The name of the record
|
||||||
|
* `value` - (Required) The value of the record
|
||||||
|
* `type` - (Required) The type of the record
|
||||||
|
* `ttl` - (Optional) The TTL of the record
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `id` - The record ID
|
||||||
|
* `name` - The name of the record
|
||||||
|
* `value` - The value of the record
|
||||||
|
* `type` - The type of the record
|
||||||
|
* `ttl` - The ttl of the record
|
||||||
|
* `priority` - The priority of the record
|
||||||
|
* `domain_id` - The domain ID of the record
|
||||||
|
* `hostname` - The FQDN of the record
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
layout: "digitalocean"
|
||||||
|
page_title: "DigitalOcean: digitalocean_domain"
|
||||||
|
sidebar_current: "docs-do-resource-domain"
|
||||||
|
---
|
||||||
|
|
||||||
|
# digitalocean\_domain
|
||||||
|
|
||||||
|
Provides a DigitalOcean domain resource.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
# Create a new domain record
|
||||||
|
resource "digitalocean_domain" "default" {
|
||||||
|
name = "www.example.com"
|
||||||
|
ip_address = "${digitalocean_droplet.foo.ipv4_address}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `name` - (Required) The name of the domain
|
||||||
|
* `ip_address` - (Required) The IP address of the domain
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `id` - The name of the domain
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
---
|
||||||
|
layout: "digitalocean"
|
||||||
|
page_title: "DigitalOcean: digitalocean_record"
|
||||||
|
sidebar_current: "docs-do-resource-record"
|
||||||
|
---
|
||||||
|
|
||||||
|
# digitalocean\_record
|
||||||
|
|
||||||
|
Provides a DigitalOcean domain resource.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
# Create a new domain record
|
||||||
|
resource "digitalocean_domain" "default" {
|
||||||
|
name = "www.example.com"
|
||||||
|
ip_address = "${digitalocean_droplet.foo.ipv4_address}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add a record to the domain
|
||||||
|
resource "digitalocean_record" "foobar" {
|
||||||
|
domain = "${digitalocean_domain.default.name}"
|
||||||
|
type = "A"
|
||||||
|
name = "foobar"
|
||||||
|
value = "192.168.0.11"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `type` - (Required) The type of record
|
||||||
|
* `domain` - (Required) The domain to add the record to
|
||||||
|
* `value` - (Optional) The value of the record
|
||||||
|
* `name` - (Optional) The name of the record
|
||||||
|
* `weight` - (Optional) The weight of the record
|
||||||
|
* `port` - (Optional) The port of the record
|
||||||
|
* `priority` - (Optional) The priority of the record
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `id` - The record ID
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<li class="li-under"><a href="/intro/index.html">Intro</a></li>
|
<li class="li-under"><a href="/intro/index.html">Intro</a></li>
|
||||||
<li class="active li-under"><a href="/docs/index.html">Docs</a></li>
|
<li class="active li-under"><a href="/docs/index.html">Docs</a></li>
|
||||||
<li class="li-under"><a href="/community.html">Community</a></li>
|
<li class="li-under"><a href="/community.html">Community</a></li>
|
||||||
<li class="li-under"><a href="http://demo.terraform.io/">Demo</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-hashi col-sm-5 col-xs-12">
|
<div class="footer-hashi col-sm-5 col-xs-12">
|
||||||
|
|
|
@ -13,9 +13,17 @@
|
||||||
<li<%= sidebar_current("docs-do-resource") %>>
|
<li<%= sidebar_current("docs-do-resource") %>>
|
||||||
<a href="#">Resources</a>
|
<a href="#">Resources</a>
|
||||||
<ul class="nav nav-visible">
|
<ul class="nav nav-visible">
|
||||||
|
<li<%= sidebar_current("docs-do-resource-domain") %>>
|
||||||
|
<a href="/docs/providers/do/r/domain.html">digitalocean_domain</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-do-resource-droplet") %>>
|
<li<%= sidebar_current("docs-do-resource-droplet") %>>
|
||||||
<a href="/docs/providers/do/r/droplet.html">digitalocean_droplet</a>
|
<a href="/docs/providers/do/r/droplet.html">digitalocean_droplet</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-do-resource-record") %>>
|
||||||
|
<a href="/docs/providers/do/r/record.html">digitalocean_record</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -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/index.html">« Documentation Home</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-dnsimple-index") %>>
|
||||||
|
<a href="/docs/providers/dnsimple/index.html">DNSimple Provider</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-dnsimple-resource") %>>
|
||||||
|
<a href="#">Resources</a>
|
||||||
|
<ul class="nav nav-visible">
|
||||||
|
<li<%= sidebar_current("docs-dnsimple-resource-record") %>>
|
||||||
|
<a href="/docs/providers/dnsimple/r/record.html">dnsimple_record</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= yield %>
|
||||||
|
<% end %>
|
|
@ -17,9 +17,30 @@
|
||||||
<a href="/docs/configuration/syntax.html">Configuration Syntax</a>
|
<a href="/docs/configuration/syntax.html">Configuration Syntax</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-config-interpolation") %>>
|
||||||
|
<a href="/docs/configuration/interpolation.html">Interpolation Syntax</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-config-override") %>>
|
<li<%= sidebar_current("docs-config-override") %>>
|
||||||
<a href="/docs/configuration/override.html">Overrides</a>
|
<a href="/docs/configuration/override.html">Overrides</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-config-resources") %>>
|
||||||
|
<a href="/docs/configuration/resources.html">Resources</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-config-providers") %>>
|
||||||
|
<a href="/docs/configuration/providers.html">Providers</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-config-variables") %>>
|
||||||
|
<a href="/docs/configuration/variables.html">Variables</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-config-outputs") %>>
|
||||||
|
<a href="/docs/configuration/outputs.html">Outputs</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -63,6 +84,10 @@
|
||||||
<a href="/docs/providers/do/index.html">DigitalOcean</a>
|
<a href="/docs/providers/do/index.html">DigitalOcean</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-providers-dnsimple") %>>
|
||||||
|
<a href="/docs/providers/dnsimple/index.html">DNSimple</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-providers-heroku") %>>
|
<li<%= sidebar_current("docs-providers-heroku") %>>
|
||||||
<a href="/docs/providers/heroku/index.html">Heroku</a>
|
<a href="/docs/providers/heroku/index.html">Heroku</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -6,6 +6,7 @@ body.page-sub{
|
||||||
background-color: @light-black;
|
background-color: @light-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.layout-dnsimple,
|
||||||
body.layout-heroku,
|
body.layout-heroku,
|
||||||
body.layout-digitalocean,
|
body.layout-digitalocean,
|
||||||
body.layout-aws,
|
body.layout-aws,
|
||||||
|
|
|
@ -1271,6 +1271,7 @@ body.page-home #footer {
|
||||||
body.page-sub {
|
body.page-sub {
|
||||||
background-color: #242424;
|
background-color: #242424;
|
||||||
}
|
}
|
||||||
|
body.layout-dnsimple,
|
||||||
body.layout-heroku,
|
body.layout-heroku,
|
||||||
body.layout-digitalocean,
|
body.layout-digitalocean,
|
||||||
body.layout-aws,
|
body.layout-aws,
|
||||||
|
@ -1279,6 +1280,7 @@ body.layout-inner,
|
||||||
body.layout-intro {
|
body.layout-intro {
|
||||||
background: #242424 url('../images/sidebar-wire.png') left 62px no-repeat;
|
background: #242424 url('../images/sidebar-wire.png') left 62px no-repeat;
|
||||||
}
|
}
|
||||||
|
body.layout-dnsimple > .container .col-md-8[role=main],
|
||||||
body.layout-heroku > .container .col-md-8[role=main],
|
body.layout-heroku > .container .col-md-8[role=main],
|
||||||
body.layout-digitalocean > .container .col-md-8[role=main],
|
body.layout-digitalocean > .container .col-md-8[role=main],
|
||||||
body.layout-aws > .container .col-md-8[role=main],
|
body.layout-aws > .container .col-md-8[role=main],
|
||||||
|
@ -1288,6 +1290,7 @@ body.layout-intro > .container .col-md-8[role=main] {
|
||||||
min-height: 800px;
|
min-height: 800px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
body.layout-dnsimple > .container .col-md-8[role=main] > div,
|
||||||
body.layout-heroku > .container .col-md-8[role=main] > div,
|
body.layout-heroku > .container .col-md-8[role=main] > div,
|
||||||
body.layout-digitalocean > .container .col-md-8[role=main] > div,
|
body.layout-digitalocean > .container .col-md-8[role=main] > div,
|
||||||
body.layout-aws > .container .col-md-8[role=main] > div,
|
body.layout-aws > .container .col-md-8[role=main] > div,
|
||||||
|
|
Loading…
Reference in New Issue