craigmonson / colonize

A terraform tool to manage environment driven templating.
MIT License
20 stars 5 forks source link

Make Running Tasks more clear #34

Closed jyore closed 7 years ago

jyore commented 7 years ago

When running commands, especially prep/plan/apply/destroy on branches, I think we should make the current task being run more clear and separated from the colonize/terraform output. My suggestion would be to look at Ansible's play headers

For example, from a recent prep I ran on a branch

Running app/security_groups
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...
Running app/database
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...
Running app/instances
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...

The Running <branch>, seems to get a little lost in the output.

If we did something like the following, then I think it may be more clear:

Colonize [dev] ****************************************************************
Environments Dir = env
Build Order File = build_order.txt
Remote Setup File = remote_setup.sh
... Other config/options ...

PREP: [app/security_groups] ***************************************************
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...

PREP: [app/database] **********************************************************
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...

PREP: [app/instances] *********************************************************
Removing .terraform directory...
Building combined variables files...
Building combined terraform files...
Building combined derived files...
Building remote config script...
Fetching terraform modules...

Then this would obviously expand to each command, where it would follow the pattern of the command being run, followed by the output