Skip to content
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

docs: add more commands in using-atlantis.md #2808

Merged
merged 9 commits into from
Dec 18, 2022
2 changes: 1 addition & 1 deletion runatlantis.io/docs/custom-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ workflows:
extra_args: ["-lock=false"]
```

If [policy checking](https://www.runatlantis.io/docs/policy-checking.html#how-it-works) is enabled, `extra_args` can also be used to change the default behaviour of conftest.
If [policy checking](/docs/policy-checking.html#how-it-works) is enabled, `extra_args` can also be used to change the default behaviour of conftest.

```yaml
workflows:
Expand Down
2 changes: 2 additions & 0 deletions runatlantis.io/docs/how-atlantis-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ This section of docs talks about how Atlantis at deeper level.

* [Locking](locking.html)
* [Autoplanning](autoplanning.html)
* [Automerging](automerging.html)
* [Security](security.html)
Binary file removed runatlantis.io/docs/images/pr-comment-apply.png
Binary file not shown.
Binary file removed runatlantis.io/docs/images/pr-comment-plan.png
Binary file not shown.
51 changes: 47 additions & 4 deletions runatlantis.io/docs/using-atlantis.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
# Using Atlantis

Atlantis currently supports three commands that can be run via pull request comments:
Atlantis triggers commands via pull request comments.
![Help Command](./images/pr-comment-help.png)

::: tip
You can use following executable names.
* `atlantis help`
* `atlantis` is executable name. You can configure by [Executable Name](/docs/server-configuration.html#executable-name).
* `run help`
* `run` is a global executable name.
* `@GithubUser help`
* `@GithubUser` is the VCS host user which you connected to Atlantis by user token.
:::
Copy link
Contributor Author

@krrrr38 krrrr38 Dec 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it is better to drop run help feature... it seems a little bit hidden function.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's your opinion to drop the run help feature because it's a hidden function?

Wouldn't you want to add the run help feature because it's a hidden function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to remove run help feature. so remove this doc.

ee9777a

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the run help feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess no one use run apply and almost users doesnot know this feature. Not to execute it untentionally by just comment it, I think it is better to drop it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible people still use it. We don't collect analytics for this. It's probably best not to introduce a breaking change, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Generally, we should not do a breaking change. it must be introduced into major update and so on. In this PR, just add docs and not to drop it and so on. Currently, we already provide this feature, so I add docs 👌

3358e38


Currently, Atlantis supports the following commands.
[[toc]]

---
## atlantis help
![Help Command](./images/pr-comment-help.png)
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
```bash
atlantis help
```
### Explanation
View help

---
## atlantis version
```bash
atlantis version
```

### Explanation
Print the output of 'terraform version'.

---
## atlantis plan
![Plan Command](./images/pr-comment-plan.png)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's difficult to capture same image for other commands. So just show one image on the page top.

```bash
atlantis plan [options] -- [terraform plan flags]
```
Expand Down Expand Up @@ -60,7 +81,6 @@ If you always need to append a certain flag, see [Custom Workflow Use Cases](cus

---
## atlantis apply
![Apply Command](./images/pr-comment-apply.png)
```bash
atlantis apply [options] -- [terraform apply flags]
nitrocode marked this conversation as resolved.
Show resolved Hide resolved
```
Expand Down Expand Up @@ -104,3 +124,26 @@ Because Atlantis under the hood is running `terraform apply plan.tfplan`, any Te
They're ignored because they can't be specified for an already generated planfile.
If you would like to specify these flags, do it while running `atlantis plan`.

---
## atlantis unlock
```bash
atlantis unlock
```

### Explanation
Removes all atlantis locks and discards all plans for this PR.
To unlock a specific plan you can use the Atlantis UI.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy from

Commands:
plan Runs 'terraform plan' for the changes in this pull request.
To plan a specific project, use the -d, -w and -p flags.
apply Runs 'terraform apply' on all unapplied plans from this pull request.
To only apply a specific plan, use the -d, -w and -p flags.
unlock Removes all atlantis locks and discards all plans for this PR.
To unlock a specific plan you can use the Atlantis UI.
approve_policies
Approves all current policy checking failures for the PR.
version Print the output of 'terraform version'
help View help.


---
## atlantis approve_policies
```bash
atlantis approve_policies
```

### Explanation
Approves all current policy checking failures for the PR.

See also [policy checking](/docs/policy-checking.html).

### Options
* `--verbose` Append Atlantis log to comment.