Next question - how can I configure Atmos to autom...
# atmos
j
Next question - how can I configure Atmos to automatically run
atmos terraform clean
before running any subsequent commands?
you can override an existing Atmos command, e.g.
atmos terraform apply
, and execute
atmos terraform clean
in the steps
Copy code
# Custom CLI commands
commands:
  - name: terraform
    description: Execute 'terraform' commands
    # subcommands
    commands:
      - name: apply
        description: This command executes 'atmos terraform clean' and 'atmos terraform apply' on terraform components
        arguments:
          - name: component
            description: Name of the component
        flags:
          - name: stack
            shorthand: s
            description: Name of the stack
            required: true
        steps:
          - atmos terraform clean {{ .Arguments.component }} -s {{ .Flags.stack }} 
          - atmos terraform apply {{ .Arguments.component }} -s {{ .Flags.stack }}
🙌 1
d
so cool! I've been wanting this as well.
a
if you don’t want to override an existing command, you can add a new one with the two steps, eg atmos terraform provision