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
fix: Delete locks and workdirs with potentially stale previous plans which fixes 1624 (runatlantis#1704)
* Delete previous plans on autoplan or atlantis plan
When using non-default workspaces, plans are stored
in pr-and-workspace-specific directories.
If a PR is subsequently updated it might happen that
some of the plans are no longer relevant with regards
to the latest changes.
This change ensures that plans are always deleted
when a generic plan is triggered either by autoplan
or by a "atlantis plan" command.
NB Plans are not cleaned up when specific projects are
planned explicitly with "atlantis plan -p/-d/-w".
* Use DeleteLockCommand to delete locks and workdirs
containing previous plans
Co-authored-by: giuli007 <[email protected]>
Copy file name to clipboardExpand all lines: runatlantis.io/docs/using-atlantis.md
+5
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,10 @@ atlantis plan -w staging
45
45
*`-w workspace` Switch to this [Terraform workspace](https://www.terraform.io/docs/state/workspaces.html) before planning. Defaults to `default`. If not using Terraform workspaces you can ignore this.
46
46
*`--verbose` Append Atlantis log to comment.
47
47
48
+
::: warning NOTE
49
+
A `atlantis plan` (without flags), like autoplans, discards all plans previously created with `atlantis plan``-p`/`-d`/`-w`
50
+
:::
51
+
48
52
### Additional Terraform flags
49
53
50
54
If you need to run `terraform plan` with additional arguments, like `-target=resource` or `-var 'foo-bar'` or `-var-file myfile.tfvars`
@@ -65,6 +69,7 @@ Runs `terraform apply` for the plan that matches the directory/project/workspace
65
69
66
70
::: tip
67
71
If no directory/project/workspace is specified, ex. `atlantis apply`, this command will apply **all unapplied plans from this pull request**.
72
+
This includes all projects that have been planned manually with `atlantis plan``-p`/`-d`/`-w` since the last autoplan or `atlantis plan` command.
0 commit comments