From db2114d630f41ba41ea6ca60fef925a0c1d2e920 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Mon, 19 May 2025 15:59:01 -0500 Subject: [PATCH] Clarify use of backend-config file (#35389) --- website/docs/language/backend/index.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/docs/language/backend/index.mdx b/website/docs/language/backend/index.mdx index b77d670674..278607ddbe 100644 --- a/website/docs/language/backend/index.mdx +++ b/website/docs/language/backend/index.mdx @@ -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