2022-03-28 15:03:21 +02:00
#+title : :tools terraform
#+subtitle : Infrastructure as code
#+created : November 21, 2019
#+since : 21.12.0
2021-10-16 01:29:27 +02:00
* Description :unfold:
This module adds support for working with [[https://www.terraform.io ][Terraform ]] files within Emacs. This
includes syntax highlighting, intelligent code completion, and the ability to
run Terraform commands directly from Emacs.
** Maintainers
/This module has no dedicated maintainers./ [[doom-contrib-maintainer: ][Become a maintainer? ]]
** Module flags
/This module has no flags./
** Packages
- [[doom-package: ][company-terraform ]] if [[doom-package: ][:completion company ]]
- [[doom-package: ][terraform-mode ]]
** Hacks
/No hacks documented for this module./
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338 ][Enable this module in your ~doom!~ block. ]]
This module requires the ~terraform~ executable to be installed and in your
=$PATH= .
* Usage
2019-11-21 14:43:09 -05:00
** Syntax highlighting
2021-10-16 01:29:27 +02:00
Syntax highlighting is provided from ~terraform-mode~ and ~hcl-mode~ .
2019-11-21 14:43:09 -05:00
** Code formatting
2021-10-16 01:29:27 +02:00
[[doom-module: ][:tools terraform ]] does not provide code formatting directly, but [[doom-module: ][:editor format ]]
works with Terraform files.
2019-11-21 14:43:09 -05:00
** Code navigation
2021-10-16 01:29:27 +02:00
Code navigation is supported through [[doom-package: ][imenu ]] from [[doom-package: ][terraform-mode ]].
2019-11-21 14:43:09 -05:00
** Code completion
2021-10-16 01:29:27 +02:00
Code completion of Terraform builtins is provided from [[doom-package: ][company-terraform ]] and
2019-11-21 14:43:09 -05:00
generally works well despite being generated through a [[https://github.com/rafalcieslak/emacs-company-terraform/blob/master/company-terraform-data.el ][static (outdated) file ]].
2021-10-16 01:29:27 +02:00
[[doom-package: ][company-terraform ]] also provides code completion of resources within your
project.
2019-11-21 14:43:09 -05:00
** Documentation
2021-10-16 01:29:27 +02:00
Documentation is accessible through the normal [[doom-package: ][company ]] show documentation
functionality, thanks to [[doom-package: ][company-terraform ]].
2019-11-21 14:43:09 -05:00
** Executing Terraform commands
2021-10-16 01:29:27 +02:00
[[doom-module: ][:tools terraform ]] provides commands under [[kbd: ][<localleader> ]] to run the most common
Terraform operations:
| key | description |
|-----------------+--------------------------|
| [[kbd:][<localleader> i]] | Runs ~$ terraform init~ |
| [[kbd:][<localleader> p]] | Runs ~$ terraform plan~ |
| [[kbd:][<localleader> a]] | Runs ~$ terraform apply~ |
* TODO Configuration
#+begin_quote
🔨 This module has no configuration documentation yet. [[doom-contrib-module: ][Write some? ]]
#+end_quote
* Troubleshooting
/There are no known problems with this module./ [[doom-report: ][Report one? ]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq: ][Ask one? ]]
* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module: ][Write one? ]]
#+end_quote