tfparse

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 4 Imported by: 0

README

tfparse

A command line tool for parsing Terraform configuration files.

Currently it just prints out all input variables in json format.

This is useful if you want to generate tfvars files and need to know what input variables a configuration expects.

(Inspired by tfjson)

Installation

$ go get github.com/clearbank/tfparse

Usage

Running against the following configuration:

variable "environment" {
  type        = string
  description = "Name of the environment"
}

Output:

$ tfparse /terraform-module-folder

{
  "environment": {
    "Name": "environment",
    "Description": "Name of the environment",
    "Default": {},
    "Type": "string",
    "ParsingMode": 76,
    "DescriptionSet": true,
    "DeclRange": {
      "Filename": "/terraform-module-folder/example.tf",
      "Start": {
        "Line": 1,
        "Column": 1,
        "Byte": 0
      },
      "End": {
        "Line": 1,
        "Column": 23,
        "Byte": 22
      }
    }
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL