-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added page documenting useful Environment Variables #2601
Merged
catsby
merged 6 commits into
hashicorp:master
from
nathanielks:feature/docs-environment-variables
Aug 12, 2015
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
382cad0
Added page documenting useful Environment Variables
nathanielks 80d77df
fixed indentation
nathanielks d857746
tweaking indentation settings
nathanielks e38ced7
retabd
nathanielks 03554ec
fixed formatting glitches
nathanielks c29b4a9
adding more verbose description to Environment Variables page, explai…
nathanielks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
website/source/docs/configuration/environment-variables.html.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
layout: "docs" | ||
page_title: "Environment Variables" | ||
sidebar_current: "docs-config-environment-variables" | ||
description: |- | ||
Something on Environment Variables! | ||
--- | ||
|
||
# Environment Variables | ||
|
||
## TF_LOG | ||
|
||
If set to any value, enables detailed logs to appear on stderr which is useful for debugging. For example: | ||
|
||
``` | ||
export TF_LOG=1 | ||
``` | ||
|
||
To disable, either unset it or set it to empty. For example: | ||
|
||
``` | ||
export TF_LOG= | ||
``` | ||
|
||
For more on debugging Terraform, check out the section on [Debugging](/docs/internals/debugging.html). | ||
|
||
## TF_LOG_PATH | ||
|
||
This specifies where the log should persist its output to. Note that even when `TF_LOG_PATH` is set, `TF_LOG` must be set in order for any logging to be enabled. For example, to always write the log to the directory you're currently running terraform from: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should highlight that when this is unset, terraform logs to stderr. |
||
|
||
``` | ||
export TF_LOG_PATH=./terraform.log | ||
``` | ||
|
||
For more on debugging Terraform, check out the section on [Debugging](/docs/internals/debugging.html). | ||
|
||
## TF_INPUT | ||
|
||
If set to "false" or "0", causes terraform commands to behave as if the `-input=false` flag was specified. This is used when you want to disable prompts for variables that haven't had their values specified. For example: | ||
|
||
``` | ||
export TF_INPUT=0 | ||
``` | ||
|
||
## TF_MODULE_DEPTH | ||
|
||
When given a value, causes terraform commands to behave as if the `-module=depth=VALUE` flag was specified. Modules are treated like a black box and terraform commands do not show what resources within the module will be created. By setting this to -1, for example, you enable commands such as [plan](/docs/commands/plan.html) and [graph](/docs/commands/graph.html) to display more detailed information. | ||
|
||
``` | ||
export TF_MODULE_DEPTH=-1 | ||
``` | ||
|
||
For more information regarding modules, check out the section on [Using Modules](/docs/modules/usage.html). | ||
|
||
## TF_VAR_name | ||
|
||
Environment variables can be used to set variables. The environment variables must be in the format `TF_VAR_name` and this will be checked last for a value. For example: | ||
|
||
``` | ||
export TF_VAR_region=us-west-1 | ||
export TF_VAR_ami=ami-049d8641 | ||
``` | ||
|
||
For more on how to use `TF_VAR_name` in context, check out the section on [Variable Configuration](/docs/configuration/variables.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just say something like "Details on the environment variables that can be used to configure various aspects of Terraform"