-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atlantis runs apply only on the last planned directory in the same PR #2325
Comments
Hi, we have the same problem but with projects and I wanted to open also a issue today for this. We use atlantis 0.19.5 with terraform 1.1.7. If you need further information, please let me know. Our atlantis.yaml (short) version: 3
automerge: true
parallel_plan: false
parallel_apply: false
projects:
- name: project-1
dir: cld/accounts/1/project
workspace: default
autoplan:
enabled: true
when_modified:
- "**/*.tf"
- "**/*.yaml"
- "**/*.secret"
apply_requirements: [mergeable]
workflow: git-crypt
- name: project-2
dir: cld/accounts/2/project
workspace: default
autoplan:
enabled: true
when_modified:
- "**/*.tf"
- "**/*.yaml"
- "**/*.secret"
apply_requirements: [mergeable, approved]
workflow: git-crypt
- name: project-3
dir: cld/accounts/3/project
workspace: default
autoplan:
enabled: true
when_modified:
- "**/*.tf"
- "**/*.yaml"
- "**/*.secret"
apply_requirements: [mergeable]
workflow: git-crypt
- name: project-4
dir: cld/accounts/4/project
workspace: default
autoplan:
enabled: true
when_modified:
- "**/*.tf"
- "**/*.yaml"
- "**/*.secret"
apply_requirements: [mergeable, approved]
workflow: git-crypt
workflows:
git-crypt:
plan:
steps:
- env:
name: ACCOUNT_ID
command: echo $REPO_REL_DIR |awk -F/ '{print $3}'
- env:
name: AWS_PROFILE
command: echo "${ACCOUNT_ID}"
- env:
name: AWS_SHARED_CREDENTIALS_FILE
command: echo "${HOME}/.aws/credentials"
- init:
extra_args: ["-upgrade=false"]
- run: terraform refresh 1>/dev/null
- run: terraform plan -input=false -refresh=false -no-color -out $PLANFILE
apply:
steps:
- env:
name: ACCOUNT_ID
command: echo $REPO_REL_DIR |awk -F/ '{print $3}'
- env:
name: AWS_PROFILE
command: echo "${ACCOUNT_ID}"
- env:
name: AWS_SHARED_CREDENTIALS_FILE
command: echo "${HOME}/.aws/credentials"
- init:
extra_args: ["-upgrade=false"]
- apply |
Problem still exists. |
withe the latest version too? |
Yes, with v0.19.8 |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
not solved yet |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
I have noticed this too and it makes me not want to use the -d command. If a plan of a project fails while other projects succeed, you should be able to plan a directory again without losing all previous plans Perhaps we need a new flag
Thoughts? |
I do not use dir ever but I do use projects -p and I do not have this problem when using projects I believe. |
interesting. perhaps the behavior for @jamengual are you saying that if you proposed a PR and it ran 3 projects, if one of them failed, and you reran it using |
if you run -p for each project or if they get run by one invocation of |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
Still open |
Having this issue as well. Seeing it with |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
This is still happening with latest Atlantis version. |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
Still relevant |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.' |
Still an issue in atlantis 0.28.3 using '-d' |
Community Note
Overview of the Issue
Atlantis runs apply only on the last planned directory in the same PR.
For example I have 3 projects planned in my PR:
Let's say
atlantis plan
succeeds for projects 1 and 3, but fails for the 2nd one due to a timeout issue.In that case I want to replan it with a separate Atlantis command:
Now the GitHub PR shows succesfull plan status checks for all directories, so we can proceed with an apply command:
atlantis apply
.The issue is that Atlantis ignores the rest of the directories and will only attempt to apply the last planned project:
2. dir: test/ec2-instance/redis workspace: test_ec2-instance_redis
In addition to that, if I have
ATLANTIS_HIDE_PREV_PLAN_COMMENTS
variable set totrue
, Atlantis also hides all my previous plans, including those that ran only once.I would like to be able to apply all my projects at once, without considering the plan order.
Environment details
Atlantis version: 0.19.4
Atlantis server-side config file:
The text was updated successfully, but these errors were encountered: