npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tfmdcli

v1.1.0

Published

Terraform Markdown CLI is a tool to convert your terraform variables or outputs into a markdown table, or to create markdown formatted example `module` blocks.

Downloads

3

Readme

tfmdcli

Terraform Markdown CLI is a tool to convert your terraform variables or outputs into a markdown table, or to create markdown formatted example module blocks.

Usage

tfmdcli <file_path> <flags>

Flags

Flag | Description | Example -----------------------|----------------------------------------------------------------------------------|-------- -o | --output-only | Output only the given fields in the table. A comma separated list must be passed | tfmdcli <file_path> -o name,default -b | --breaks | Add line breaks to the 'default' field of a variable file | tfmdcli <file_path> -b -a | --add-columns | Add additional empty columns to the table. A comma separated list must be passed.| tfmdcli <file_path> -a name,default -m | --module | The module name to use when creating an example module from a variables file. A string is required. This must be used with the --source tag. This cannot be used with any tags other than -s. | tfmdcli <file_path> -m example -s ./module/example -s | --source | The file path to use when creating an example module from a variables file. A string is required. This must be used with the --module tag.This cannot be used with any tags other than -m. | tfmdcli <file_path> -m example -s ./module/example -t | --tfvars | Create a tfvars from a variables file. This cannot be used with any tags other than -i | tfmdcli <file_path> -t -i | --ignore-defaults| Ignore defaults when creating a tfvars file. This will create an empty tfvar variable for each of variables in the file. Can only be used with -t | tfmdcli <file_path> -t -i

Examples

Example Variable Table

This is an example table from an example variable file using tfmdcli example.tf -b

Name | Type | Description | Sensitive | Default ------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------- api_key | string | The API key needed to deploy resources | true | security_group_rules | | Map of security group rules to be added to default security group | | {allow_all_inbound = {source = "0.0.0.0/0"direction = "inbound"}} disable_public_service_endpoint | bool | Disable public service endpoint for cluster | | false spoke_vpc_cidr_blocks | object({ zone-1 = list(string) zone-2 = list(string) zone-3 = list(string) }) | An object containing lists of CIDR blocks. Each CIDR block will be used to create a subnet | | {zone-1 = ["10.10.10.0/24"],zone-2 = ["10.40.10.0/24"],zone-3 = ["10.70.10.0/24"]} tags | list(string) | A list of tags to add to the cluster | | ["tag-1","tag-2"]

Example Module

This is an example table from an example variable file using tfmdcli example.tf -m=example -s=example/

module example {
  source                          = "example/"
  api_key                         = var.api_key
  security_group_rules            = var.security_group_rules
  disable_public_service_endpoint = var.disable_public_service_endpoint
  spoke_vpc_cidr_blocks           = var.spoke_vpc_cidr_blocks
  tags                            = var.tags
}

Example Tfvars

This is an example table from an example variable file using tfmdcli example.tf -t -i

api_key=""
security_group_rules=""
disable_public_service_endpoint=true
spoke_vpc_cidr_blocks={
    zone-1=[""]
    zone-2=[""]
    zone-3=[""]
}
tags=[]