Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all.include_stacks option and fix all.ignore_stacks option when building dependency graph #85

Merged
merged 3 commits into from
Feb 27, 2021

Conversation

tongueroo
Copy link
Contributor

@tongueroo tongueroo commented Feb 27, 2021

This is a 🐞 bug fix.
This is a πŸ™‹β€β™‚οΈ feature or enhancement.
This is a 🧐 documentation change.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Add all.include_stacks option and fix all.ignore_stacks option when building dependency graph

Context

Fixes #80
Closes #81

Huge thanks to @d-helios digging into this. In particular, for putting together a comprehensive project example.

How to Test

Use the example project from #80

Test ignore_stacks option

Build graph with ignored demo-ssm stack.

$ grep ignore config/app.rb 
config.all.ignore_stacks = ["demo-ssm"]
$ terraspace all graph --format text
Building graph...
demo
$ 

Build graph without ignored demo-ssm stack.

$ grep ignore config/app.rb 
$ terraspace all graph --format text
Building graph...
Downloading tfstate files for dependencies defined in tfvars...
demo-ssm
└── demo
$

Test include_stacks option

$ grep include config/app.rb
  config.all.include_stacks = ["demo"]
$ terraspace all graph --format text
Building graph...
demo
$ 

Test both options together

$ grep all config/app.rb 
  config.all.include_stacks = ["demo"]
  config.all.ignore_stacks = ["demo-ssm"]
$ terraspace all graph --format text
Building graph...
demo
$ 

Version Changes

Patch

@tongueroo tongueroo merged commit d377ec6 into master Feb 27, 2021
@tongueroo tongueroo deleted the all-include-stacks branch February 27, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to apply / plan project if stack mentioned in ignore_stacks has dependencies
1 participant