@causa/workspace-terraform v0.6.0
@causa/workspace-terraform module
This repository contains the source code for the @causa/workspace-terraform Causa module. It provides Causa features and implementations of cs commands for Terraform infrastructure projects. For more information about the Causa CLI cs, checkout its repository.
➕ Requirements
The Causa Terraform module requires Terraform to be installed.
🎉 Installation
Add @causa/workspace-terraform to your Causa configuration in causa.modules.
🔧 Configuration
For all the configuration in your Causa files related to Terraform, look at the schema for the TerraformConfiguration.
✨ Supported project types and commands
This module supports Causa projects with project.type set to infrastructure and project.language set to terraform.
Infrastructure commands
cs infrastructure prepare: Runsterraform plan.cs infrastructure deploy: Runsterraform applyusing a previously computed plan.
The dictionary defined in the infrastructure.variables configuration can be used to pass input Terraform variables. This dictionary is rendered before being used, meaning it can contain formatting templates referencing other configuration values and secrets.
The terraform.workspace configuration determines the Terraform workspace set prior to running any operation. Combined with Causa environments, this can be a powerful feature to manage the infrastructure of several deployment environments.
Project commands
The Terraform module also supports some of the project-level commands, namely:
cs init: Runsterraform init.cs lint: Runsterraform fmt. The format operation is run with the-checkargument, such that it only lints the code without fixing it. This operation supports theproject.externalFilesconfiguration, by linting all Terraform files matching the glob patterns.cs dependencies update: Runsterraform initwith the-upgradeoption, allowing the update of dependencies and the lock file.