# terraform2md

> Generate the Markdown from a terraform.tfstate file.

Latest version **0.1.4** (published 2016-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install terraform2md
pnpm add terraform2md
yarn add terraform2md
bun add terraform2md
```

Provides the command `terraform2md`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2016-08-23 |
| First published | 2016-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bryan LOT |
| Maintainers | shambarick |
| Keywords | terraform, tfstate, generator, markdown |

## Links

- npm: https://www.npmjs.com/package/terraform2md
- Repository: https://github.com/shambarick/terraform2md
- Homepage: https://github.com/shambarick/terraform2md#readme
- Issues: https://github.com/shambarick/terraform2md/issues
- npm.io page: https://npm.io/package/terraform2md

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.15.0
- [json2md](https://npm.io/package/json2md.md) ^1.5.2
- [commander](https://npm.io/package/commander.md) ^2.9.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2016-08-23
- 0.1.3 — 2016-08-23
- 0.1.2 — 2016-08-17
- 0.1.1 — 2016-08-16
- 0.1.0 — 2016-08-16

## README

# terraform2md

Generate a .md from a terraform.tfstate

## Installation

For CLI usage

```
npm install -g terraform2md
```

For project usage

```
npm install --save terraform2md
```

## Usage

### CLI

Print the markdown in the console from the terraform.tfstate of the current directory

```
terraform2md generate
```

Generate the terraform.md from the terraform.tfstate of the current directory

```
terraform2md generate -o terraform.md
```

### Project

Example

```
var tf2md = require('terraform2md');

data = tf2md.loadFromFile('./terraform.tfstate');

data.resources.forEach(function (vm, index) {
    tf2md.addRow({ h1: vm.data.primary.id });
    tf2md.addRow({ ul: [
        "Domain: " + vm.data.primary.attributes.domain,
        "Cluster: " + vm.data.primary.attributes.cluster,
        "Datacenter: " + vm.data.primary.attributes.datacenter,
        "Cpu: " + vm.data.primary.attributes.vcpu,
        "Memory: " + vm.data.primary.attributes.memory,
        "Ip: " + vm.data.primary.attributes["network_interface.0.ipv4_address"],
        "Passerelle: " + vm.data.primary.attributes["network_interface.0.ipv4_gateway"],
        "TimeZone: " + vm.data.primary.attributes.time_zone
    ]});
});

tf2md.generate(); // Print console
tf2md.generate('terraform.md'); // Generate a terraform.md
```

### JSON2MD

See: [https://github.com/IonicaBizau/json2md#memo-documentation](https://github.com/IonicaBizau/json2md#memo-documentation)

## License

MIT

---
_Source: https://npm.io/package/terraform2md · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
