swift
Kind: Standard (with no locking)
Stores the state as an artifact in Swift.
Warning! It is highly recommended that you enable Object Versioning by setting the
expire_afterconfiguration. This allows for state recovery in the case of accidental deletions and human error.
Example Configuration
terraform {
backend "swift" {
path = "terraform-state"
}
}
This will create a container called terraform-state and an object within that container called tfstate.tf.
Note: Currently, the object name is statically defined as 'tfstate.tf'. Therefore Swift pseudo-folders are not currently supported.
For the access credentials we recommend using a partial configuration.
Example Referencing
data "terraform_remote_state" "foo" {
backend = "swift"
config {
path = "terraform_state"
}
}
Configuration variables
The following configuration options are supported:
-
auth_url- (Required) The Identity authentication URL. If omitted, theOS_AUTH_URLenvironment variable is used. -
container- (Required) The name of the container to create for storing the Terraform state file. -
path- (Optional) DEPRECATED: Usecontainerinstead. The name of the container to create in order to store the state file. -
user_name- (Optional) The Username to login with. If omitted, theOS_USERNAMEenvironment variable is used. -
user_id- (Optional) The User ID to login with. If omitted, theOS_USER_IDenvironment variable is used. -
password- (Optional) The Password to login with. If omitted, theOS_PASSWORDenvironment variable is used. -
token- (Optional) Access token to login with instead of user and password. If omitted, theOS_AUTH_TOKENvariable is used. -
region_name(Required) - The region in which to storeterraform.tfstate. If omitted, theOS_REGION_NAMEenvironment variable is used. -
tenant_id(Optional) The ID of the Tenant (Identity v2) or Project (Identity v3) to login with. If omitted, theOS_TENANT_IDorOS_PROJECT_IDenvironment variables are used. -
tenant_name- (Optional) The Name of the Tenant (Identity v2) or Project (Identity v3) to login with. If omitted, theOS_TENANT_NAMEorOS_PROJECT_NAMEenvironment variable are used. -
domain_id- (Optional) The ID of the Domain to scope to (Identity v3). If omitted, the following environment variables are checked (in this order):OS_USER_DOMAIN_ID,OS_PROJECT_DOMAIN_ID,OS_DOMAIN_ID. -
domain_name- (Optional) The Name of the Domain to scope to (Identity v3). If omitted, the following environment variables are checked (in this order):OS_USER_DOMAIN_NAME,OS_PROJECT_DOMAIN_NAME,OS_DOMAIN_NAME,DEFAULT_DOMAIN. -
insecure- (Optional) Trust self-signed SSL certificates. If omitted, theOS_INSECUREenvironment variable is used. -
cacert_file- (Optional) Specify a custom CA certificate when communicating over SSL. If omitted, theOS_CACERTenvironment variable is used. -
cert- (Optional) Specify client certificate file for SSL client authentication. If omitted theOS_CERTenvironment variable is used. -
key- (Optional) Specify client private key file for SSL client authentication. If omitted theOS_KEYenvironment variable is used. -
archive_container- (Optional) The container to create to store archived copies of the Terraform state file. If specified, Swift object versioning is enabled on the container created atcontainer. -
archive_path- (Optional) DEPRECATED: Usearchive_containerinstead. The path to store archived copied ofterraform.tfstate. If specified, Swift object versioning is enabled on the container created atpath. -
expire_after- (Optional) How long should theterraform.tfstatecreated atpathbe retained for? Supported durations:m- Minutes,h- Hours,d- Days.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/backends/types/swift.html