New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

terrafactor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terrafactor

Refactors terraform code generated by terraformer

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

Terrafactor

Refactors terraform code generated by terraformer.

It does two things

  • Merges all the terraform states.
  • Some post processing

Installation

Requires nodejs

npm i -g terrafactor

Usage

terrafactor ./inputDir ./outputDir

It will generate three directories ./outputDir, ./outputDir_mst and ./outputDir_processed.

If you want to opt out of the modularize feature. You can run.

terrafactor ./inputDir ./outputDir --modularize=false

Post processing

Currently it does the following postprocessing steps

  • Replaces all hardcoded id with "${resource_type.resource_name.id}"
  • Maintains DRY-ness by refactoring out repeated values into a variables.tf file.
  • Generate modules containing clusters of all connected components. Then have the main.tf import all the modules. mod_0 constains all resources which have a very small cluster ( < 2 )

Planned

  • Support for count property of terraform.

Keywords

cloud

FAQs

Package last updated on 19 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts