terraconv
v0.1.10
Published
Convert Terraform state file(tfstate) to other format.
Downloads
6
Readme
TerraConv
Convert Terraform state file(tfstate) to other format.
Usage
npm install -g terraconv
terraconv
How to make input files
See Terraform Schema to Type Script. https://www.npmjs.com/package/terraformschema2ts
Settings
To configure the application, change 'config/default.ts.'
If you change the property file locally, set the environment variable 'NODE_CONFIG_DIR.'
// Add Modules generated from terraformschema2ts
import { awsDynamodbTable } from '../types/awsDynamodbTable';
import { awsLambdaFunction } from '../types/awsLambdaFunction';
// ... and so on
export = {
tfstateDirPath: './input',
tfstateEnvNames: [
'staging',
'production',
],
outputFilePath: './output/output.html',
// Add Resource definitions like this sample code
targetResources: [
{
identifier: 'DynamoDB',
className: awsDynamodbTable.className,
constructor: (input: any) => {
return new awsDynamodbTable(input); // eslint-disable-line new-cap
},
},
{
identifier: 'Lambda',
className: awsLambdaFunction.className,
constructor: (input: any) => {
return new awsLambdaFunction(input); // eslint-disable-line new-cap
},
},
// ... and so on
],
// You can specify the property 'logLevel' to 'default' or 'debug.'
logLevel: 'default',
};
export NODE_CONFIG_DIR=.
Author
- neruneruo
- [email protected]