Skip to content

Generate Terraform modules documentation with terraform-docs within Emacs

License

Notifications You must be signed in to change notification settings

loispostula/terraform-docs.el

Repository files navigation

terraform-docs.el: Generate your Terraform documentation from Emacs

https://github.com/loispostula/terraform-docs.el/actions/workflows/test.yml/badge.svg https://melpa.org/packages/terraform-docs-badge.svg https://img.shields.io/badge/License-GPL%20v3-blue.svg

terraform-docs.el

An Emacs package for seamlessly integrating terraform-docs into your workflow. This package provides utilities for generating Terraform documentation from your modules, with options to view the output in a buffer, write it to a file, or both.

Installation

You can install terraform-mode.el from MELPA by package.el.

Features

  • Customizable Configuration File: Specify the configuration file name for terraform-docs (default: .terraform-docs.yml).
  • Flexible Output Options:
    • Display the generated documentation in a popup buffer.
    • Save the documentation to a dynamically named file.
    • Save the documentation to a file and open it immediately in Emacs.
  • Automatic File Naming: Output files are named dynamically based on the module directory name, using the format output-for-<module-directory>.md.

Usage

Commands

  1. Run with Default Behavior: Runs terraform-docs using the configuration file and user-defined output settings:
    M-x terraform-docs
        
  2. Output to a Temporary Buffer: Runs terraform-docs and displays the output in a temporary buffer:
    M-x terraform-docs-to-buffer
        
  3. Output to a File: Generates documentation and writes it to a file in the module directory:
    M-x terraform-docs-to-file
        
  4. Output to a File and Open: Generates documentation, writes it to a file, and opens the file in Emacs:
    M-x terraform-docs-to-file-and-open
        

About

Generate Terraform modules documentation with terraform-docs within Emacs

Resources

License

Stars

Watchers

Forks

Packages

No packages published