You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/backends/types/oss.html.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,6 @@ the `tablestore_table` field to an existing TableStore table name.
18
18
19
19
-> **Note:** The OSS backend is available from terraform version 0.12.2.
20
20
21
-
!> **Warning:** If you set `tablestore_table`, please ensure the table does not contain primary key named
22
-
`LockID`, `Info` and `Digest`. Otherwise, there will throw an error `OTSParameterInvalid Duplicated attribute column ...`.
23
-
24
21
## Example Configuration
25
22
26
23
```hcl
@@ -39,7 +36,7 @@ terraform {
39
36
This assumes we have a [OSS Bucket](https://www.terraform.io/docs/providers/alicloud/r/oss_bucket.html) created called `bucket-for-terraform-state`,
40
37
a [OTS Instance](https://www.terraform.io/docs/providers/alicloud/r/ots_instance.html) called `terraform-remote` and
41
38
a [OTS TableStore](https://www.terraform.io/docs/providers/alicloud/r/ots_table.html) called `statelock`. The
42
-
Terraform state will be written into the file `path/mystate/version-1.tfstate`. The `TableStore` must have a primary key of type `string`.
39
+
Terraform state will be written into the file `path/mystate/version-1.tfstate`. The `TableStore` must have a primary key named `LockID`of type `String`.
43
40
44
41
45
42
## Data Source Configuration
@@ -90,7 +87,7 @@ The following configuration options or environment variables are supported:
90
87
*`prefix` - (Opeional) The path directory of the state file will be stored. Default to "env:".
91
88
*`key` - (Optional) The name of the state file. Defaults to `terraform.tfstate`.
92
89
*`tablestore_endpoint` / `ALICLOUD_TABLESTORE_ENDPOINT` - (Optional) A custom endpoint for the TableStore API.
93
-
*`tablestore_table` - (Optional) A TableStore table for state locking and consistency.
90
+
*`tablestore_table` - (Optional) A TableStore table for state locking and consistency. The table must have a primary key named `LockID` of type `String`.
94
91
*`encrypt` - (Optional) Whether to enable server side
95
92
encryption of the state file. If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.
96
93
*`acl` - (Optional) [Object
@@ -113,4 +110,3 @@ The nested `assume_role` block supports the following:
113
110
*`session_expiration` - (Optional) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud use own default value). It supports environment variable `ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION`.
114
111
115
112
-> **Note:** If you want to store state in the custom OSS endpoint, you can specify a environment variable `OSS_ENDPOINT`, like "oss-cn-beijing-internal.aliyuncs.com"
0 commit comments