Skip to content

Commit

Permalink
website: update backend/swift examples to use versioning
Browse files Browse the repository at this point in the history
Since object versioning is a best practice the docs should have all the
examples containing it by default.
  • Loading branch information
cardoe committed Oct 4, 2018
1 parent 3249db3 commit 732b925
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions website/docs/backends/types/swift.html.md
Expand Up @@ -19,11 +19,12 @@ Stores the state as an artifact in [Swift](http://docs.openstack.org/developer/s
```hcl
terraform {
backend "swift" {
container = "terraform-state"
container = "terraform-state"
archive_container = "terraform-state-archive"
}
}
```
This will create a container called `terraform-state` and an object within that container called `tfstate.tf`.
This will create a container called `terraform-state` and an object within that container called `tfstate.tf`. It will enable versioning using the `terraform-state-archive` container to contain the older version.

-> 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.

Expand All @@ -36,7 +37,8 @@ For the access credentials we recommend using a
data "terraform_remote_state" "foo" {
backend = "swift"
config {
container = "terraform_state"
container = "terraform_state"
archive_container = "terraform_state-archive"
}
}
```
Expand Down

0 comments on commit 732b925

Please sign in to comment.