antonbabenko/terragrunt-reference-architecture

Strange output with the Terragrunt alias

konstantin-recurly opened this issue · 2 comments

I was using this

terragrunt () {
	local action=$1
	shift 1
	command terragrunt $action "$@" 2>&1 | sed -E "s|$(dirname $(pwd))/||g;s|^\[terragrunt\]( [0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})* ||g;s|(\[.*\]) [0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}|\1|g"
}

to get nice output, but what I have noticed you can see below

terragrunt apply

... 

Plan: 1 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

yes
  Enter a value:
google_project_iam_member.cluster_service_account-resourceMetadata-writer[0]: Creating...
google_container_cluster.primary: Modifying... [id=gke-cluster]

As you can see I have to type the answer and only after the answer you can see the expected field Enter a value:

Yes, this is one of the downsides of the mentioned alias. I don't know how to fix it and get used to it already. :)

If you have a working solution, please share it.

I see, thanks for explaining.
Unfortunately, I don't have a working solution.