From df188433037e18258efa8c6713b5d6612e97cb50 Mon Sep 17 00:00:00 2001 From: Marcin Cuber Date: Thu, 27 Jun 2019 19:53:35 +0100 Subject: [PATCH] website: Add partial config file example for remote backend (#21520) --- website/docs/backends/types/remote.html.md | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/website/docs/backends/types/remote.html.md b/website/docs/backends/types/remote.html.md index 1224e1a19..98617284a 100644 --- a/website/docs/backends/types/remote.html.md +++ b/website/docs/backends/types/remote.html.md @@ -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 The following configuration options are supported: