boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
674 stars 46 forks source link

terraspace fmt: generalize and pass through fmt option #332

Closed tongueroo closed 11 months ago

tongueroo commented 11 months ago

This is a 🙋‍♂️ feature or enhancement.

Summary

Pass through args to the fmt command so that these all work

terraspace fmt demo -check
terraspace fmt demo -write=false -list
terraspace fmt -write=false -list

Example with output

❯ terraspace fmt -write=false -list
Formatting terraform files
app/modules/example
=> terraform fmt -write=false
app/stacks/demo
=> terraform fmt -write=false
main.tf

Context

Related https://github.com/boltops-tools/terraspace/pull/316

How to Test

Run example commands above

Version Changes

Patch