-
Notifications
You must be signed in to change notification settings - Fork 1.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
Bug: Atlantis loses planfiles when running on multiple projects. #1139
Comments
Do you have -out=$PLANFILE as part of the plan command for your workflow? |
Yes I do. This is my ATLANTIS_REPO_CONFIG_JSON environment variable. Converted from ---
repos:
- id: "/.*/"
apply_requirements:
- mergeable
allowed_overrides:
- apply_requirements
- workflow
workflow: terragrunt
workflows:
terragrunt:
plan:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: echo "terraform${ATLANTIS_TERRAFORM_VERSION}"
- run: terragrunt plan -no-color -out=$PLANFILE
apply:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: echo "terraform${ATLANTIS_TERRAFORM_VERSION}"
- run: terragrunt apply -no-color $PLANFILE |
Hey @lkysow, Don't want to keep bugging but is there a way out of this? 😅 |
This should be working. I think at this point it looks like more of an issue with your setup than with Atlantis because no one else is reporting this. Is it possible the local Docker setup is losing its data? Can you try running just on your laptop and debug from there? |
@vedantrathore did you figure it out this? |
I think I ran into this same potential bug. I was working to handle #1508 The gist is this....
the atlantis website only shows one lock, for but the PR ends up in this weird state where it sayd "1/2 projects planned successfully" and there's no way to fix your issue, besides "starting over" not the end of the world, but very confusing...... |
Hello,
So I was experimenting with atlantis for my organization. Currently, I'm using a local docker setup to test stuff out and then will move that to ECS/EKS.
I've setup my workflow using terragrunt as specified in the official documentation and I'm generating a new project for each directory that contains a separate
terragrunt.hcl
file (Basically each project is of the format account_env_module).While testing out, I sent a PR that changes a module tag ref in all the projects, so atlantis ran plan using terragrunt for around 19 projects and also commented in the plan for each project:
This plan was saved to: /home/atlantis/.atlantis/repos/vedant.rathore/infrastructure-live/15/default/path/to/config/project_name-default.tfplan
According to the output, a separate tfplan should be saved in each project's terragrunt config path but as I exec into the docker container and traverse to the path, there is no such file. Even the locks for each project are automatically deleted once the plan for that project finishes (Since it's 19 projects, it's going sequentially).
Due to this, when I comment
atlantis apply -p project_name
I get an error that the tfplan does not exist.Apply output
Here is the
atlantis.yaml
jinja template I'm using. I'm generating this for each commit using a pre-commit hook.Please let me know if I'm doing something wrong here and how would the workflow be handling multiple projects. Also what should be the ideal definition of a
Project
?The text was updated successfully, but these errors were encountered: