website: Document the atlas provider

This commit is contained in:
Armon Dadgar 2014-12-07 18:42:27 -08:00 committed by Mitchell Hashimoto
parent 633a08230e
commit 15de5c3cf9
6 changed files with 141 additions and 2 deletions

View File

@ -6,6 +6,7 @@ body.page-sub{
background-color: $light-black;
}
body.layout-atlas,
body.layout-consul,
body.layout-dnsimple,
body.layout-cloudflare,

View File

@ -0,0 +1,40 @@
---
layout: "atlas"
page_title: "Provider: Atlas"
sidebar_current: "docs-atlas-index"
description: |-
The Atlas provider is used to interact with configuration,
artifacts, and metadata managed by the Atlas service.
---
# Atlas Provider
The Atlas provider is used to interact with resources, configuration,
artifacts, and metadata managed by [Atlas](https://atlas.hashicorp.com).
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 Atlas provider
provider "atlas" {
token = "${var.atlas_token}"
}
# Fetch an artifact configuration
resource "atlas_artifact" "web" {
...
}
```
## Argument Reference
The following arguments are supported:
* `address` - (Optional) Atlas server endpoint. Defaults to public Atlas.
This is only required when using an on-premise deployment of Atlas.
* `token` - (Required) API token

View File

@ -0,0 +1,68 @@
---
layout: "atlas"
page_title: "Atlas: atlas_artifact"
sidebar_current: "docs-atlas-resource-artifact"
description: |-
Provides access to deployment artifacts managed by Atlas. This can
be used to dynamically configure instantiation and provisioning
of resources.
---
# atlas\_artifact
Provides access to deployment artifacts managed by Atlas. This can
be used to dynamically configure instantiation and provisioning
of resources.
## Example Usage
```
# Read the AMI
resource "atlas_artifact" "web" {
name = "hashicorp/web"
type = "aws.ami"
metadata {
arch = "386"
}
}
# Start our instance with the dynamic ami value
resource "aws_instance" "app" {
ami = "${atlas_artifact.web.id}"
...
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Required) Name of the artifact in Atlas. This is given
in slug format like "organization/artifact".
* `type` - (Required) The type of artifact to query for.
* `version` - (Optional) By default, if no version is provided the
latest version of the artifact is used. Providing a version can
be used to pin a dependency.
* `metadata_keys` - (Optional) If given, only an artifact containing
the given keys will be returned. This is used to disambiguate when
multiple potential artifacts match. An example is "aws" to filter
on an AMI.
* `metadata` - (Optional) If given, only an artifact matching the
metadata filters will be returned. This is used to disambiguate when
multiple potential artifacts match. An example is "arch" = "386" to
filter on architecture.
## Attributes Reference
The following attributes are exported:
* `version` - The matching version of the artifact
* `id` - The ID of the artifact. This could be an AMI ID, GCE Image ID, etc.
* `file_url` - For artifacts that are binaries, this is a download path.
* `metadata_full` - Contains the full metadata of the artifact.

View File

@ -15,6 +15,6 @@ etc. Almost any infrastructure noun can be represented as a resource in Terrafor
Terraform is agnostic to the underlying platforms by supporting providers. A provider
is responsible for understanding API interactions and exposing resources. Providers
generally are an IaaS (e.g. AWS, DigitalOcean, GCE), PaaS (e.g. Heroku, CloudFoundry),
or SaaS services (e.g. DNSimple, CloudFlare).
or SaaS services (e.g. Atlas, DNSimple, CloudFlare).
Use the navigation to the left to read about the available providers.

View File

@ -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">&laquo; Documentation Home</a>
</li>
<li<%= sidebar_current("docs-atlas-index") %>>
<a href="/docs/providers/atlas/index.html">Atlas Provider</a>
</li>
<li<%= sidebar_current("docs-atlas-resource") %>>
<a href="#">Resources</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-atlas-resource-artifact") %>>
<a href="/docs/providers/atlas/r/artifact.html">atlas_artifact</a>
</li>
</ul>
</li>
</ul>
</div>
<% end %>
<%= yield %>
<% end %>

View File

@ -91,7 +91,11 @@
<li<%= sidebar_current("docs-providers") %>>
<a href="/docs/providers/index.html">Providers</a>
<ul class="nav">
<ul class="nav">
<li<%= sidebar_current("docs-providers-atlas") %>>
<a href="/docs/providers/atlas/index.html">Atlas</a>
</li>
<li<%= sidebar_current("docs-providers-aws") %>>
<a href="/docs/providers/aws/index.html">AWS</a>
</li>