Clarify use of backend-config file (#35389)

This commit is contained in:
Austin Macdonald 2025-05-19 15:59:01 -05:00 committed by GitHub
parent b3f796c711
commit db2114d630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,6 +183,16 @@ naming pattern. Terraform will not prevent you from using other names but follow
this convention will help your editor understand the content and likely provide
better editing experience as a result.
You can use the `-backend-config` argument on the CLI to provide a partial backend configuration. You can either specify a file containing a partial configuration or specify a set of key-value pairs. The configuration must already include a `backend` block to use this argument. Terraform applies the configurations to the arguments in the `backend` block, but it does not change the backend type. In the following example, Terraform stores state in the default backend using the arguments supplied in the `-backend-config` argument:
```hcl
terraform {
backend {
# values provided by backend-config file
}
}
```
### Command-line key/value pairs
The same settings can alternatively be specified on the command line as