A Ruby wrapper for invoking Terraform commands programmatically from Ruby applications, RSpec tests, or Rakefiles.
RubyTerraform is a Ruby gem that provides a programmatic wrapper for the Terraform CLI, allowing developers to execute Terraform commands directly from Ruby code. It solves the problem of integrating Terraform-based infrastructure provisioning into Ruby applications, test suites (like RSpec), and automation scripts (like Rakefiles) without shelling out manually.
Ruby developers and DevOps engineers who manage infrastructure-as-code with Terraform and want to integrate it into Ruby-based workflows, automated testing, or deployment pipelines.
Developers choose RubyTerraform because it offers a clean, type-safe Ruby API for all Terraform commands, supports flexible configuration and logging, and eliminates the need for brittle shell invocations, making infrastructure code more maintainable and testable.
A simple Ruby wrapper for invoking terraform commands.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Wraps all Terraform commands up to version 1.5.7 except console, test, and version, covering most infrastructure-as-code workflows without shelling out manually.
Provides clean Ruby methods (e.g., RubyTerraform.plan) and configurable command classes, making it easy to integrate Terraform into Ruby scripts, tests, and Rake tasks.
Maps Ruby data types (booleans, arrays, hashes) to CLI options with support for singular/plural keys and aliases, reducing parameter-passing errors.
Allows per-command configuration of the Terraform binary, logging, I/O streams, and environment variables (like TF_LOG), as shown in the configuration examples.
Does not support Terraform's console, test, and version commands, limiting functionality for testing configurations or interactive debugging in Ruby workflows.
Tied to Terraform 1.5.7; updates to newer Terraform versions may not be immediately supported, potentially causing compatibility issues with recent features.
Setting up custom logging and I/O streams (e.g., using MultiIO) requires additional Ruby code, which can be overkill for simple automation scripts.