website: Add partial config file example for remote backend (#21520)
This commit is contained in:
parent
56e6ff8e51
commit
df18843303
|
@ -119,6 +119,32 @@ data "terraform_remote_state" "foo" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Example configuration using CLI input
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
# main.tf
|
||||||
|
terraform {
|
||||||
|
required_version = "~> 0.12.0"
|
||||||
|
|
||||||
|
backend "remote" {}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Backend configuration file:
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
# backend.hcl
|
||||||
|
workspaces { name = "workspace" }
|
||||||
|
hostname = "app.terraform.io"
|
||||||
|
organization = "company"
|
||||||
|
```
|
||||||
|
|
||||||
|
Running `terraform init` with the backend file:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
terraform init -backend-config=backend.hcl
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration variables
|
## Configuration variables
|
||||||
|
|
||||||
The following configuration options are supported:
|
The following configuration options are supported:
|
||||||
|
|
Loading…
Reference in New Issue