Python binding for Terraform.
Installation
$ pip install libterraform
Usage
For now, only supply TerraformConfig.load_config_dir
method which reads the .tf and .tf.json files in the given directory
as config files and then combines these files into a single Module. This method returns (mod, diags)
which are both dict, corresponding to the *Module
and hcl.Diagnostic structures in Terraform respectively.
>>> from libterraform import TerraformConfig
>>> mod, _ =TerraformConfig.load_config_dir('tests/config/sleep')
>>> mod['ManagedResources'].keys()
dict_keys(['time_sleep.wait'])