https://www.runatlantis.io/ logo
Title
i

Isaac Wilson

04/20/2023, 11:19 PM
If using a custom workflow, is there a way to still have access to extra args passed through atlantis commands? For example
atlantis plan -p myproject — -target=myresource
and my workflow is something like this:
workflows:
  myWorkflow:
    plan:
      steps:
      - run: $(git rev-parse --show-toplevel)/plan.sh
    apply:
      steps:
      - run: $(git rev-parse --show-toplevel)/apply.sh
p

PePe Amengual

04/21/2023, 12:16 AM
yes
COMMENT_ARGS
i

Isaac Wilson

04/21/2023, 12:30 AM
But COMMENT_ARGS escapes each character so it’s not readable/useful but I’m probably missing something.
p

PePe Amengual

04/21/2023, 12:30 AM
it is escaped
for security reasons
but it is the only thing that holds those values AFAIK
i

Isaac Wilson

04/21/2023, 12:35 AM
printf might work here actually
For any time travelers, this is what you want:
"${COMMENT_ARGS//\\/}"