patrickchugh / terravision

Terravision creates Professional Cloud Architecture Diagrams from your Terraform code automatically. Supports AWS, Google and Azure.
Mozilla Public License 2.0
768 stars 77 forks source link

Added workspace support #106

Closed thatguyfig closed 7 months ago

thatguyfig commented 7 months ago

Added workspace support

Type of Change

Info

Adds the ability to use the --workspace parameter to activate the relevant terraform workspace before running terraform plan. Also defaults to default if it is not supplied, if terraform fails to activate the workspace, then the execution fails.

Have been able to use this personally and works well.

P.S - all the other changes were formatter related where lines were too complicated (style)

thatguyfig commented 7 months ago

Cheers - just an FYI - terravision uses terraform show -json which is only possibly in >=v1.0.0 so i also added a version check to the checking for terraform exe