website: Update swift backend documentation

This commit is contained in:
Gavin Williams 2017-06-05 17:24:41 +01:00
parent ee2e390f85
commit af5467b9fd
1 changed files with 23 additions and 9 deletions

View File

@ -12,6 +12,8 @@ description: |-
Stores the state as an artifact in [Swift](http://docs.openstack.org/developer/swift/). Stores the state as an artifact in [Swift](http://docs.openstack.org/developer/swift/).
~> Warning! It is highly recommended that you enable [Object Versioning](https://docs.openstack.org/developer/swift/overview_object_versioning.html) by setting the [`expire_after`](https://www.terraform.io/docs/backends/types/swift.html#archive_path) configuration. This allows for state recovery in the case of accidental deletions and human error.
## Example Configuration ## Example Configuration
```hcl ```hcl
@ -21,8 +23,11 @@ terraform {
} }
} }
``` ```
This will create a container called `terraform-state` and an object within that container called `tfstate.tf`.
Note that for the access credentials we recommend using a -> Note: Currently, the object name is statically defined as 'tfstate.tf'. Therefore Swift [pseudo-folders](https://docs.openstack.org/user-guide/cli-swift-pseudo-hierarchical-folders-directories.html) are not currently supported.
For the access credentials we recommend using a
[partial configuration](/docs/backends/config.html). [partial configuration](/docs/backends/config.html).
## Example Referencing ## Example Referencing
@ -43,7 +48,12 @@ The following configuration options are supported:
* `auth_url` - (Required) The Identity authentication URL. If omitted, the * `auth_url` - (Required) The Identity authentication URL. If omitted, the
`OS_AUTH_URL` environment variable is used. `OS_AUTH_URL` environment variable is used.
* `path` - (Required) The path where to store `terraform.tfstate`. * `container` - (Required) The name of the container to create for storing
the Terraform state file.
* `path` - (Optional) DEPRECATED: Use `container` instead.
The name of the container to create in order to store the state file.
* `user_name` - (Optional) The Username to login with. If omitted, the * `user_name` - (Optional) The Username to login with. If omitted, the
`OS_USERNAME` environment variable is used. `OS_USERNAME` environment variable is used.
@ -68,7 +78,7 @@ The following configuration options are supported:
`OS_PROJECT_NAME` environment variable are used. `OS_PROJECT_NAME` environment variable are used.
* `domain_id` - (Optional) The ID of the Domain to scope to (Identity v3). If * `domain_id` - (Optional) The ID of the Domain to scope to (Identity v3). If
If omitted, the following environment variables are checked (in this order): omitted, the following environment variables are checked (in this order):
`OS_USER_DOMAIN_ID`, `OS_PROJECT_DOMAIN_ID`, `OS_DOMAIN_ID`. `OS_USER_DOMAIN_ID`, `OS_PROJECT_DOMAIN_ID`, `OS_DOMAIN_ID`.
* `domain_name` - (Optional) The Name of the Domain to scope to (Identity v3). * `domain_name` - (Optional) The Name of the Domain to scope to (Identity v3).
@ -82,14 +92,18 @@ The following configuration options are supported:
* `cacert_file` - (Optional) Specify a custom CA certificate when communicating * `cacert_file` - (Optional) Specify a custom CA certificate when communicating
over SSL. If omitted, the `OS_CACERT` environment variable is used. over SSL. If omitted, the `OS_CACERT` environment variable is used.
* `cert` - (Optional) Specify client certificate file for SSL client * `cert` - (Optional) Specify client certificate file for SSL client authentication.
authentication. If omitted the `OS_CERT` environment variable is used. If omitted the `OS_CERT` environment variable is used.
* `key` - (Optional) Specify client private key file for SSL client * `key` - (Optional) Specify client private key file for SSL client authentication.
authentication. If omitted the `OS_KEY` environment variable is used. If omitted the `OS_KEY` environment variable is used.
* `archive_path` - (Optional) The path to store archived copied of `terraform.tfstate`. * `archive_container` - (Optional) The container to create to store archived copies
If specified, Swift object versioning is enabled on the container created at `path`. of the Terraform state file. If specified, Swift [object versioning](https://docs.openstack.org/developer/swift/overview_object_versioning.html) is enabled on the container created at `container`.
* `archive_path` - (Optional) DEPRECATED: Use `archive_container` instead.
The path to store archived copied of `terraform.tfstate`. If specified,
Swift [object versioning](https://docs.openstack.org/developer/swift/overview_object_versioning.html) is enabled on the container created at `path`.
* `expire_after` - (Optional) How long should the `terraform.tfstate` created at `path` * `expire_after` - (Optional) How long should the `terraform.tfstate` created at `path`
be retained for? Supported durations: `m` - Minutes, `h` - Hours, `d` - Days. be retained for? Supported durations: `m` - Minutes, `h` - Hours, `d` - Days.