mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
migrate docs to mdx
This commit is contained in:
24
website/docs/language/functions/abspath.mdx
Normal file
24
website/docs/language/functions/abspath.mdx
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
page_title: abspath - Functions - Configuration Language
|
||||
description: The abspath function converts the argument to an absolute filesystem path.
|
||||
sidebar_title: abspath
|
||||
---
|
||||
|
||||
# `abspath` Function
|
||||
|
||||
`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`](/language/functions/file) (where
|
||||
only the contents are then stored) or in `connection` and `provisioner` blocks.
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
> abspath(path.root)
|
||||
/home/user/some/terraform/root
|
||||
```
|
||||
Reference in New Issue
Block a user