You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Desired behavior
On first glance, I would expect that Atlantis is able to plan/apply a destroy for an entire project if the project files have been deleted in a PR.
Actual behavior
Atlantis is not able to destroy a project which was deleted due to the missing project directory.
Version
v0.15.0
Steps to reproduce
On master branch:
Create a project in the dir myproject which defines some Terraform resources
Configure autoplanner when_modified pointing to myproject in atlantis.yml
Deploy myproject manually or via atlantis in a PR which is already merged to master (in other words, make sure resources exist and are in remote TF state)
atlantis plan says "0 projects are to be planned" even though myproject resources have been deleted
atlantis logs say:
2020/09/07 16:53:59+0000 [DBUG] project_finder.go:135 chrisob/my-repo#3: Project at dir "myproject" not included because dir does not exist
I'm guessing that Atlantis only looks at the feature branch's tree to discover project info/remote state, so if the project dir no longer exists on the feature branch, then Atlantis wouldn't be able to plan against a remote state, which would explain this issue.
That being said, Atlantis is able to manage destruction of individual resources inside a project, so I'd hoped it would be possible to also delete entire projects.
Is this possible without a large refactor to do a comparison using the base branch's remote state?
The text was updated successfully, but these errors were encountered:
Is this possible without a large refactor to do a comparison using the base branch's remote state?
We might be able to detect a directory being deleted from the list of modified files but the large piece of work would then be cloning the base branch and running terraform destroy in that directory. Right now Atlantis always clones the PR branch.
Please direct further discussion onto the original issue.
Desired behavior
On first glance, I would expect that Atlantis is able to plan/apply a
destroy
for an entire project if the project files have been deleted in a PR.Actual behavior
Atlantis is not able to destroy a project which was deleted due to the missing project directory.
Version
v0.15.0
Steps to reproduce
On
master
branch:myproject
which defines some Terraform resourceswhen_modified
pointing tomyproject
inatlantis.yml
myproject
manually or via atlantis in a PR which is already merged tomaster
(in other words, make sure resources exist and are in remote TF state)In a PR/feature branch not yet merged to
master
:Delete entire
myproject
dir, commit & push to PR's feature branchatlantis plan
says "0 projects are to be planned" even thoughmyproject
resources have been deletedatlantis logs say:
I'm guessing that Atlantis only looks at the feature branch's tree to discover project info/remote state, so if the project dir no longer exists on the feature branch, then Atlantis wouldn't be able to plan against a remote state, which would explain this issue.
That being said, Atlantis is able to manage destruction of individual resources inside a project, so I'd hoped it would be possible to also delete entire projects.
Is this possible without a large refactor to do a comparison using the base branch's remote state?
The text was updated successfully, but these errors were encountered: