# terraformschema2ts

> Convert Terraform Schema to Typescript type definitions.

Latest version **0.1.7** (published 2023-01-14) · MIT license · 0 weekly downloads

## Install

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

Provides the command `terraformschema2ts`.

## 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.7 |
| Published | 2023-01-14 |
| First published | 2023-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | neruneruo |
| Maintainers | neruneruo |
| Keywords | Terraform |

## Links

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

## Dependencies (19)

- [config](https://npm.io/package/config.md) ^3.3.8
- [eslint](https://npm.io/package/eslint.md) ^8.31.0
- [log4js](https://npm.io/package/log4js.md) ^6.7.0
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [ts-jest](https://npm.io/package/ts-jest.md) ^29.0.3
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.0
- [mustache](https://npm.io/package/mustache.md) ^4.2.0
- [typescript](https://npm.io/package/typescript.md) ^4.8.4
- [@types/node](https://npm.io/package/@types/node.md) ^16.11.64
- [@types/config](https://npm.io/package/@types/config.md) ^3.3.0
- [@types/eslint](https://npm.io/package/@types/eslint.md) ^8.4.10
- [tsconfig-paths](https://npm.io/package/tsconfig-paths.md) ^4.1.1
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^11.0.0
- [@types/mustache](https://npm.io/package/@types/mustache.md) ^4.2.2
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^17.0.0
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.0.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^5.41.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^5.41.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.7 (latest) — 2023-01-14
- 0.1.6 — 2023-01-09
- 0.1.5 — 2023-01-09
- 0.1.4 — 2023-01-09
- 0.1.3 — 2023-01-09
- 0.1.2 — 2023-01-09
- 0.1.1 — 2023-01-08

## README

# Terraform Schema to Type Script
Convert Terraform Schema to Typescript type definitions.

# Usage
```
npm install -g terraformschema2ts
terraformschema2ts
```

# How to make input files
```
terraform providers schema --json | jq . > terraform_schema.json
```

# Settings
To configure the application, change 'config/default.ts.'  
If you change the property file locally, set the environment variable 'NODE_CONFIG_DIR.'

```typescript
import path from 'path';

export = {
  resourceFilters: [
    // List Terraform resource names you want to extract from the schema.
    'aws_lambda_function',
  ],

  inputFilePath: path.join(process.env.npm_package_config_execute_path!, './input/terraform_schema.json'),
  outputDirPath: path.join(process.env.npm_package_config_execute_path!, './output'),
  eslintrcFilePath: path.join(process.env.npm_package_config_package_path!, '.eslintrc.js'),

  // You can specify the property 'logLevel' to 'default' or 'debug.'
  logLevel: 'default',
};
```

```
export NODE_CONFIG_DIR=.
```

# Author
* neruneruo
* rkubota.neru@gmail.com

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