Aaron
02/23/2026, 7:08 PMcommands:
- name: terraform
description: Execute 'terraform' commands
# subcommands
commands:
- name: plan
description: This command executes 'terraform plan' on terraform components, passing in the current commit hash
arguments:
- name: component
description: Name of the component
flags:
- name: stack
shorthand: s
description: Name of the stack
required: true
steps:
- atmos terraform plan {{ .Arguments.component }} -s {{ .Flags.stack }} -- -var "commit=$(git rev-parse HEAD)"
It works if I don't attempt to override terraform plan -- if I change the command name to foo then I can run atmos terraform foo $component -s $stack and the commit gets passed in like I want. But I can't figure out how to override terraform plan.Erik Osterman (Cloud Posse)
02/23/2026, 7:18 PMErik Osterman (Cloud Posse)
02/23/2026, 7:18 PMErik Osterman (Cloud Posse)
02/23/2026, 7:18 PMAaron
02/23/2026, 7:19 PMErik Osterman (Cloud Posse)
02/23/2026, 7:19 PMAaron
02/23/2026, 7:19 PMErik Osterman (Cloud Posse)
02/23/2026, 7:20 PMErik Osterman (Cloud Posse)
02/23/2026, 7:20 PMErik Osterman (Cloud Posse)
02/23/2026, 7:20 PM-var "commit=$(git rev-parse HEAD)"
Erik Osterman (Cloud Posse)
02/23/2026, 7:20 PMAaron
02/23/2026, 7:21 PMErik Osterman (Cloud Posse)
02/23/2026, 7:21 PMvars:
commit: !exec git rev-parse HEADAaron
02/23/2026, 7:22 PM~ resource "azurerm_route_table" "this" {
~ tags = {
~ "commit" = "$oldcommit" -> "$newcommit"
}
}Aaron
02/23/2026, 7:22 PMAaron
02/23/2026, 7:25 PM!exec worked great, thanks a lot!Aaron
02/23/2026, 7:26 PMAaron
02/23/2026, 8:13 PM