terraformschema2ts
v0.1.7
Published
Convert Terraform Schema to Typescript type definitions.
Downloads
3
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.'
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
- [email protected]