A Python wrapper for OpenTofu and Terraform that simplifies usage and enforces best practices for infrastructure as code.
tfwrapper is a Python-based command-line wrapper for OpenTofu and Terraform that standardizes infrastructure-as-code workflows. It enforces a consistent directory structure for managing stacks across accounts, environments, and regions, and automates backend configuration and credential management for AWS, Azure, and GCP. The tool is designed to reduce complexity and human error in team-based infrastructure management.
Infrastructure and platform engineers working in team environments who need to manage Terraform or OpenTofu stacks across multiple cloud providers (AWS, Azure, GCP) with consistent practices. It is particularly suited for organizations requiring enforced state centralization and standardized project layouts.
Developers choose tfwrapper for its opinionated framework that abstracts away repetitive setup tasks like backend configuration, version management, and provider authentication. Its unique selling point is the enforcement of organizational standards and best practices through a structured file system and automated stack bootstrapping, which is not provided by the base Terraform/OpenTofu CLI.
Claranet France Terraform & OpenTofu Wrapper
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Mandates a consistent directory structure based on account, environment, region, and stack, reducing human error in team environments. The README specifies a strict layout like 'account/environment/region/stack'.
Configures and enforces remote state backends (AWS S3, Azure Blob Storage) using templates, ensuring centralization. Evidence includes the 'state.tf.jinja2' template requirement and backend migration steps.
Integrates authentication for AWS, Azure, and GCP, caching credentials and supporting modes like AWS profiles and Azure Service Principals. The README details environment variable setup for each provider.
Automatically downloads and uses specified OpenTofu/Terraform versions per stack, managing tooling dynamically. Stack configurations include a 'terraform.version' field for this purpose.
Supports the 'foreach' subcommand to run commands across multiple stacks sequentially, streamlining workflows. Examples show filtering by account, environment, region, or stack.
Requires manual creation of configuration files (conf/, templates/, .run/) and pre-existing state backends, which is time-consuming. The README outlines multiple required directories and template files.
Primarily optimized for AWS S3 and Azure Blob Storage; other backends require manual authentication, reducing out-of-the-box utility. The 'States centralization configuration' section notes this limitation.
Adopting tfwrapper locks teams into its opinionated file structure and workflow, making it difficult to revert or integrate with alternative tools without significant refactoring.
Relies on additional software like azure-cli for Azure authentication and specific Python versions, adding complexity to the runtime environment. The 'Runtime Dependencies' section lists these requirements.