Allow the use of custom Terraform/Tofu commands without the need for a custom workflow

https://docs.spacelift.io/vendors/terraform/workflow-tool

As per the above doc, the current behaviour of Spacelift using custom terraform or tofu commands requires the use of a custom workflow meaning that Spacelift will no longer manage the Terraform or tofu binary and this must be done either with a pre_init hook or custom runtime image.


It would be a great advantage to be able to use the Terraform or Tofu versions managed by Spacelift but allow custom terraform workflow commands to be configured in Spacelift. The below commands could be configured in the stack or the workflow.yml without the requirement of changing terraform_workflow_tool.

Example:

init: terraform init -backend-config="{{ .WorkspaceName }}"/state.config 
plan: terraform plan -var-file="{{ .WorkspaceName }}"/terraform.tfvars 
apply: terraform apply -auto-approve -var-file="{{ .WorkspaceName }}"/terraform.tfvars 

Workaround
-
Problem
-

Please authenticate to join the conversation.

Upvoters
Status

πŸ”­ Discovery

Board

πŸ’‘ Feature Requests

Tags

OpenTofu

Date

7 months ago

Subscribe to post

Get notified by email when there are changes.