Dan Yasny
04/25/2024, 2:22 PMextra_args applying a different vars-file. I created 2 different workflows with different extra_args and in atlantis.yaml I use those with the same dir but a different path in when_modified
This causes an apply error:
Apply Error
building command for dir "path/to/dir": must specify project name: more than one project defined in atlantis.yaml matched dir: "path/to/dir" workspace: "default"
I cannot disable parallel_apply for the entire repo, so I tried instead to place the two workflows under different numbered execution_order_group but that didn't solve the issueDan Yasny
04/25/2024, 3:29 PMparallel_apply and it also didn't workPePe Amengual
04/25/2024, 4:38 PMDan Yasny
04/26/2024, 2:39 AMdeploy-wf1:
plan:
steps:
- multienv: multienv /secrets/dev.env
- init
- plan:
extra_args: ["-var-file", "wf1.tfvars"]
apply:
steps:
- multienv: multienv /secrets/dev.env
- apply:
extra_args: ["-var-file", "wf1.tfvars"]
deploy-wf2:
plan:
steps:
- multienv: multienv /secrets/dev.env
- init
- plan:
extra_args: ["-var-file", "wf2.tfvars"]
apply:
steps:
- multienv: multienv /secrets/dev.env
- apply:
extra_args: ["-var-file", "wf2.tfvars"]
And then in the repo, I have the following in atlantis.yaml:
---
version: 3
parallel_plan: true
parallel_apply: true
abort_on_execution_order_fail: true
projects:
- workflow: deploy
dir: mydir
execution_order_group: 1
autoplan:
when_modified:
- "*.tf*"
- "../subdir1/*/*.yml"
- "!../subdir1/subdir11/*.yml"
- "!../subdir1/subdir22/*.yml"
- name: wf1
execution_order_group: 2
workflow: deploy-wf1
dir: mydir
autoplan:
when_modified:
- "../subdir1/subdir11/*.yml"
- name: wf2
execution_order_group: 3
workflow: deploy-wf2
dir: mydir
autoplan:
when_modified:
- "../subdir1/subdir22/*.yml"PePe Amengual
04/26/2024, 3:23 AMDan Yasny
04/26/2024, 12:36 PMDan Yasny
04/26/2024, 12:36 PM