-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
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
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,30 @@ | ||
--- | ||
layout: "functions" | ||
page_title: "abspath - Functions - Configuration Language" | ||
sidebar_current: "docs-funcs-file-abspath" | ||
description: |- | ||
The abspath function converts the argument to an absolute filesystem path. | ||
--- | ||
|
||
# `abspath` Function | ||
|
||
-> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and | ||
earlier, see | ||
[0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). | ||
|
||
`abspath` takes a string containing a filesystem path and converts it | ||
to an absolute path. That is, if the path is not absolute, it will be joined | ||
with the current working directory. | ||
|
||
Referring directly to filesystem paths in resource arguments may cause | ||
spurious diffs if the same configuration is applied from multiple systems or on | ||
different host operating systems. We recommend using filesystem paths only | ||
for transient values, such as the argument to [`file`](./file.html) (where | ||
only the contents are then stored) or in `connection` and `provisioner` blocks. | ||
|
||
## Examples | ||
|
||
``` | ||
> abspath(path.root) | ||
/home/user/some/terraform/root | ||
``` |
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