From 561e44fe5477be6939776efeedcdb36354c09d40 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 21 Apr 2022 16:58:10 +0200 Subject: [PATCH] Added internal variables table --- knowledge base/terraform.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/knowledge base/terraform.md b/knowledge base/terraform.md index 5ccd83a..0b2b380 100644 --- a/knowledge base/terraform.md +++ b/knowledge base/terraform.md @@ -110,15 +110,27 @@ Terraform will perform the following actions: } ``` +### Useful internal variables + +Name | Description +--------------------- | ----------- +`path.root` | filesystem path of the root module of the configuration +`path.module` | filesystem path of the module where the expression is placed +`path.cwd` | filesystem path of the current working directory +`terraform.workspace` | name of the currently selected workspace + ## Further readings - [CLI Documentation] - [for_each vs count] - [Providers best practices] - [Version constraints] +- [References to Named Values] -[for_each vs count]: https://medium.com/@business_99069/terraform-count-vs-for-each-b7ada2c0b186 [cli documentation]: https://www.terraform.io/docs/cli/ [providers best practices]: https://www.terraform.io/language/providers/requirements#best-practices-for-provider-versions +[references to named values]: https://www.terraform.io/language/expressions/references [version constraints]: https://www.terraform.io/language/expressions/version-constraints + +[for_each vs count]: https://medium.com/@business_99069/terraform-count-vs-for-each-b7ada2c0b186