Skip to content

Terraform Docs Build

Actions
Build docs site by generating data publishing npm build to docs branch
v0.1.23
Latest
Star (0)

Tf-Config-Docs

Project utilises the hashicorp/terraform-config-inspect golang library to obtain high level metadata about a given terraform codebase, and has a react app that presents a user interface for it. Future features will include a query search for similar modules, versions, etc and anayltics on the codebase.

Project can easily be added to any terraform codebase in github, by adding the action to render the documents website, this will overwrite the target branch (docs by default) ./docs folder

Example

A fork of the eks module has been used to demonstrate the potentail of the project;

Example Site

Usage

Enable github pages on the given repository, and set the branch to docs, with the folder being ./docs.

Add the following workflow to .github/workflows/actions.yaml

Currently, the docs branch needs to be unprotected for this action to work.

name: 'Terraform Documentation'
on:
  push:
    branches:
      - master

jobs:
  main:
    name: build docs
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Terraform Docs Build
      uses: lukegriffith/[email protected]

If the github pages documentation shows a module as /workspace/github, use the following configuration;


name: 'Terraform Documentation'
on:
  push:
    branches:
      - master

jobs:
  main:
    name: build docs
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Terraform Docs Build
      uses: lukegriffith/[email protected]
      with:
        tf-module-load-env-name: true
      env:
        WORKDIR_FRIENDLY_NAME: ${{ github.repository }}

Terraform Docs Build is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Build docs site by generating data publishing npm build to docs branch
v0.1.23
Latest

Terraform Docs Build is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.