Libterraform

Latest version: v0.5.0

Safety actively analyzes 623873 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.5.0

- `fmt` supports multi dirs
- `force_unlock` removes allow_missing_config
- only python 3.7 and above are supported

0.4.0

0.3.1

Fix memory leak.

0.3.0

TerraformCommand` supports all Terraform commands.
Compared with `v0.2.1`, the current version supports the following commands:
- `fmt`
- `force unlock` (The corresponding function is `force_unlock`)
- `graph`
- `import` (The corresponding function is `import_resource`)
- `refresh`
- `state` and all sub commands of `state`
- `taint`
- `untaint`
- `test`
- `workspace` and all sub commands of `workspace`

The project adds `Makefile` so we can use `make` command, like `make init`, `make test`, `make build` etc.

0.2.1

Implement `TerraformCommand` which is used to invoke various Terraform commands.

Currently, supports `version` and all main commands (`init`, `validate`, `plan`, `show`, `apply` and `destroy`),
returning a `CommandResult` object. The `CommandResult` object has the following properties:

- `retcode` indicates the command return code. A value of 0 or 2 is normal, otherwise is abnormal.
- `value` represents command output. If `json=True` is specified when executing the command, the output will be loaded
as json.
- `json` indicates whether to load the output as json.
- `error` indicates command error output.

0.1.0

Implement `TerraformConfig` which is used to parse Terraform config files.

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](https://github.com/hashicorp/terraform/blob/2a5420cb9acf8d5f058ad077dade80214486f1c4/internal/configs/module.go#L14) and [hcl.Diagnostic](https://github.com/hashicorp/hcl/blob/v2.11.1/diagnostic.go#L26) structures in Terraform respectively.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.