Skip to content

Terramate in CI with change detection - doable? #950

Answered by switchdk
macalac asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @macalac,
To answer your last question, whether it is possible to create an output per stack, you can do something like this:

terramate run -- terraform plan -out file.plan
terramate run -- bash -c "terraform show --json file.plan > file.plan.json"

I think the reason why it creates as single json plan from terraform show is because your shell is piping everything from your terramate run command into file.plan.json.

I hope this gets you closer to your goal.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@switchdk
Comment options

Answer selected by macalac
@macalac
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants