website: update backend/swift examples to use versioning
Since object versioning is a best practice the docs should have all the examples containing it by default.
This commit is contained in:
parent
58cb47d108
commit
817be7b23f
|
@ -20,10 +20,11 @@ Stores the state as an artifact in [Swift](http://docs.openstack.org/developer/s
|
|||
terraform {
|
||||
backend "swift" {
|
||||
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.
|
||||
|
||||
|
@ -37,6 +38,7 @@ data "terraform_remote_state" "foo" {
|
|||
backend = "swift"
|
||||
config = {
|
||||
container = "terraform_state"
|
||||
archive_container = "terraform_state-archive"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue