boltops-tools / terraspace

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

fix all down by building child nodes #215

Closed tongueroo closed 2 years ago

tongueroo commented 2 years ago

This is a 🐞 bug fix.

Summary

Fix terraspace all down.

The #196 change in v1.1.0 means only required stacks are built. It works for terraspace all up, and then terraspace all down would work as long as the .terraspace-cache folder still exist.

However, on a clean machine without .terraspace-cache, terraspace all down wouldn't work because the dependent stacks were not built and available for terraform state pull to work.

This fixes the issue by building the dependent stacks. Additionally, added a codebuild project with an acceptance test for terraspace all has been added. See: #216

Context

How to Test

git clone https://github.com/boltops-tools/terraspace-graph-demo
cd terraspace-graph-demo
terraspace all up -y
terraspace clean all -y
terraspace all down -y # should work

Version Changes

Patch

tongueroo commented 2 years ago

Released in 1.1.7