Refactor autogenerated terraform code
MIT License
Refactors terraform code generated by terraformer.
It does two things
Requires nodejs
npm i -g terrafactor
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
Currently it does the following postprocessing steps
id
with "${resource_type.resource_name.id}"
variables.tf
file.main.tf
import all the modules. mod_0
constains all resources which have a very small cluster ( < 2 )
Planned
count
property of terraform.