Skip to content

Commit

Permalink
fix(docs): move TOC to the right nav bar to free up vertical space
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed May 14, 2024
1 parent 5fafbb1 commit 0a0915c
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 47 deletions.
4 changes: 4 additions & 0 deletions runatlantis.io/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default defineConfig({
editLink: {
pattern: 'https://github.com/runatlantis/atlantis/edit/main/runatlantis.io/:path'
},
// headline "depth" the right nav will show for its TOC
//
// https://vitepress.dev/reference/frontmatter-config#outline
outline: [2, 3],
search: {
provider: 'algolia',
options: {
Expand Down
23 changes: 11 additions & 12 deletions runatlantis.io/docs/access-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
This page describes how to create credentials for your Git host (GitHub, GitLab, Gitea, Bitbucket, or Azure DevOps)

that Atlantis will use to make API calls.
[[toc]]

## Create an Atlantis user (optional)
We recommend creating a new user named **@atlantis** (or something close) or using a dedicated CI user.
Expand Down Expand Up @@ -93,17 +92,17 @@ Since v0.19.7, a new permission for `Administration` has been added. If you have
Since v0.22.3, a new permission for `Members` has been added, which is required for features that apply permissions to an organizations team members rather than individual users. Like the `Administration` permission above, updating Atlantis will not automatically add this permission, so if you wish to use features that rely on checking team membership you will need to add this manually.
:::

| Type | Access |
| --------------- | ------------------- |
| Administration | Read-only |
| Checks | Read and write |
| Commit statuses | Read and write |
| Contents | Read and write |
| Issues | Read and write |
| Metadata | Read-only (default) |
| Pull requests | Read and write |
| Webhooks | Read and write |
| Members | Read-only |
| Type | Access |
| --------------- | ------------------- |
| Administration | Read-only |
| Checks | Read and write |
| Commit statuses | Read and write |
| Contents | Read and write |
| Issues | Read and write |
| Metadata | Read-only (default) |
| Pull requests | Read and write |
| Webhooks | Read and write |
| Members | Read-only |

### GitLab
- Follow: [GitLab: Create a personal access token](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html#create-a-personal-access-token)
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/command-requirements.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Command Requirements
[[toc]]

## Intro
Atlantis requires certain conditions be satisfied **before** `atlantis apply` and `atlantis import`
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/configuring-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Atlantis needs to receive Webhooks from your Git host so that it can respond to
:::

See the instructions for your specific provider below.
[[toc]]

## GitHub/GitHub Enterprise
You can install your webhook at the [organization](https://docs.github.com/en/get-started/learning-about-github/types-of-github-accounts) level, or for each individual repository.
Expand Down
25 changes: 12 additions & 13 deletions runatlantis.io/docs/custom-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Custom workflows can be defined to override the default commands that Atlantis
runs.

[[toc]]

## Usage
Custom workflows can be specified in the Server-Side Repo Config or in the Repo-Level
Expand Down Expand Up @@ -40,7 +39,7 @@ workflows:
extra_args: ["-var-file", "staging.tfvars"]
# NOTE: no need to define the apply stage because it will default
# to the normal apply stage.

production:
plan:
steps:
Expand Down Expand Up @@ -147,11 +146,11 @@ workflows:
- run:
command: terraform init -input=false
output: hide
# If you're using workspaces you need to select the workspace using the
# $WORKSPACE environment variable.
- run: terraform workspace select $WORKSPACE
# You MUST output the plan using -out $PLANFILE because Atlantis expects
# plans to be in a specific location.
- run: terraform plan -input=false -refresh -out $PLANFILE
Expand Down Expand Up @@ -234,7 +233,7 @@ $ tree --gitignore

1. Container orchestrator (k8s/fargate/ecs/etc) uses the custom docker image of atlantis with `cdktf` installed with
the `--autoplan-file-list` to trigger on `cdk.tf.json` files and `--include-git-untracked-files` set to include the
CDKTF dynamically generated Terraform files in the Atlantis plan.
CDKTF dynamically generated Terraform files in the Atlantis plan.
1. PR branch is pushed up containing `cdktf` code changes.
1. Atlantis checks out the branch in the repo.
1. Atlantis runs the `npm i && cdktf get && cdktf synth` command in the repo root as a step in `pre_workflow_hooks`,
Expand Down Expand Up @@ -380,7 +379,7 @@ isn't set, Atlantis will use the default plan workflow which is what we want in
* A custom command will only terminate if all output file descriptors are closed.
Therefore a custom command can only be sent to the background (e.g. for an SSH tunnel during
the terraform run) when its output is redirected to a different location. For example, Atlantis
will execute a custom script containing the following code to create a SSH tunnel correctly:
will execute a custom script containing the following code to create a SSH tunnel correctly:
`ssh -f -M -S /tmp/ssh_tunnel -L 3306:database:3306 -N bastion 1>/dev/null 2>&1`. Without
the redirect, the script would block the Atlantis workflow.
:::
Expand Down Expand Up @@ -501,7 +500,7 @@ Compact:

Full
```yaml
- run:
- run:
command: custom-command arg1 arg2
output: show
```
Expand All @@ -512,9 +511,9 @@ Full
| run.output | string | "show" | no | How to post-process the output of this command when posted in the PR comment. The options are<br/>* `show` - preserve the full output<br/>* `hide` - hide output from comment (still visible in the real-time streaming output)<br/> * `strip_refreshing` - hide all output up until and including the last line containing "Refreshing...". This matches the behavior of the built-in `plan` command |

::: tip Notes
* `run` steps in the main `workflow` are executed with the following environment variables:
* `run` steps in the main `workflow` are executed with the following environment variables:
note: these variables are not available to `pre` or `post` workflows
* `WORKSPACE` - The Terraform workspace used for this project, ex. `default`.
* `WORKSPACE` - The Terraform workspace used for this project, ex. `default`.
NOTE: if the step is executed before `init` then Atlantis won't have switched to this workspace yet.
* `ATLANTIS_TERRAFORM_VERSION` - The version of Terraform used for this project, ex. `0.11.0`.
* `DIR` - Absolute path to the current directory.
Expand Down Expand Up @@ -544,10 +543,10 @@ Full
* A custom command will only terminate if all output file descriptors are closed.
Therefore a custom command can only be sent to the background (e.g. for an SSH tunnel during
the terraform run) when its output is redirected to a different location. For example, Atlantis
will execute a custom script containing the following code to create a SSH tunnel correctly:
will execute a custom script containing the following code to create a SSH tunnel correctly:
`ssh -f -M -S /tmp/ssh_tunnel -L 3306:database:3306 -N bastion 1>/dev/null 2>&1`. Without
the redirect, the script would block the Atlantis workflow.
* If a workflow step returns a non-zero exit code, the workflow will stop.
* If a workflow step returns a non-zero exit code, the workflow will stop.
:::

#### Environment Variable `env` Command
Expand All @@ -574,7 +573,7 @@ as the environment variable value.

::: tip Notes
* `env` `command`'s can use any of the built-in environment variables available
to `run` commands.
to `run` commands.
:::

#### Multiple Environment Variables `multienv` Command
Expand All @@ -594,5 +593,5 @@ The name-value pairs in the result are added as environment variables if success

::: tip Notes
* `multienv` `command`'s can use any of the built-in environment variables available
to `run` commands.
to `run` commands.
:::
7 changes: 3 additions & 4 deletions runatlantis.io/docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This page covers getting Atlantis up and running in your infrastructure.
* You have created a [webhook secret](webhook-secrets.md)
:::

[[toc]]

## Architecture Overview
### Runtime
Expand Down Expand Up @@ -67,7 +66,7 @@ To install:
```yaml
orgAllowlist: github.com/runatlantis/*
```
**Note**: For helm chart version < `4.0.2`, `orgWhitelist` must be used instead.
**Note**: For helm chart version < `4.0.2`, `orgWhitelist` must be used instead.
1. Configure any other variables (see [Atlantis Helm Chart: Customization](https://github.com/runatlantis/helm-charts#customization)
for documentation)
1. Run
Expand Down Expand Up @@ -590,7 +589,7 @@ Cloud Storage Backend and TLS certs: [sethvargo atlantis-on-gke](https://github.
Once you're done, see [Next Steps](#next-steps).
### Google Compute Engine (GCE)
Atlantis can be run on Google Compute Engine using a Terraform module that deploys it as a Docker container on a managed Compute Engine instance.
Atlantis can be run on Google Compute Engine using a Terraform module that deploys it as a Docker container on a managed Compute Engine instance.
This [Terraform module](https://registry.terraform.io/modules/runatlantis/atlantis/gce/latest) features the creation of a Cloud load balancer, a Container-Optimized OS-based VM, a persistent data disk, and a managed instance group.
Expand Down Expand Up @@ -629,7 +628,7 @@ Additionally, the /docker-entrypoint.d/ directory offers a flexible option for i
The standard [Kubernetes Helm Chart](#kubernetes-helm-chart) should work fine on [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes).
Another option is [Azure Container Instances](https://docs.microsoft.com/en-us/azure/container-instances/). See this community member's [repo](https://github.com/jplane/atlantis-on-aci) or the new and more up-to-date [Terraform module](https://github.com/getindata/terraform-azurerm-atlantis) for install scripts and more information on running Atlantis on ACI.
Another option is [Azure Container Instances](https://docs.microsoft.com/en-us/azure/container-instances/). See this community member's [repo](https://github.com/jplane/atlantis-on-aci) or the new and more up-to-date [Terraform module](https://github.com/getindata/terraform-azurerm-atlantis) for install scripts and more information on running Atlantis on ACI.
**Note on ACI Deployment:** Due to a bug in earlier Docker releases, Docker v23.0.0 or later is required for straightforward deployment. Alternatively, the Atlantis Docker image can be pushed to a private registry such as ACR and then used.
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/locking.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Which links them to the pull request that holds the lock.
Only the directory in the repo and Terraform workspace are locked, not the whole repo.
:::

[[toc]]

## Why
1. Because `atlantis apply` is being done before the pull request is merged, after
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/post-workflow-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ workflows](custom-workflows.md#custom-run-command) in that they are run
outside of Atlantis commands. Which means they do not surface their output
back to the PR as a comment.

[[toc]]

## Usage

Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/pre-workflow-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ workflows](custom-workflows.md#custom-run-command) in several ways.
2. Pre workflow hooks are run outside of Atlantis commands. Which means
they do not surface their output back to the PR as a comment.

[[toc]]

## Usage

Expand Down
5 changes: 2 additions & 3 deletions runatlantis.io/docs/repo-level-atlantis-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
An `atlantis.yaml` file specified at the root of a Terraform repo allows you
to instruct Atlantis on the structure of your repo and set custom workflows.

[[toc]]

## Do I need an atlantis.yaml file?
`atlantis.yaml` files are only required if you wish to customize some aspect of Atlantis.
Expand Down Expand Up @@ -286,9 +285,9 @@ projects:
With this config above, Atlantis runs planning/applying for project2 first, then for project1.
Several projects can have same `execution_order_group`. Any order in one group isn't guaranteed.
`parallel_plan` and `parallel_apply` respect these order groups, so parallel planning/applying works
in each group one by one.
in each group one by one.

If any plan/apply fails and `abort_on_execution_order_fail` is set to true on a repo level, all the
If any plan/apply fails and `abort_on_execution_order_fail` is set to true on a repo level, all the
following groups will be aborted. For this example, if project2 fails then project1 will not run.

Execution order groups are useful when you have dependencies between projects. However, they are only applicable in the case where
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Atlantis works with most Git hosts and Terraform setups. Read on to confirm
it works with yours.

[[toc]]

## Git Host
Atlantis integrates with the following Git hosts:
Expand Down
5 changes: 2 additions & 3 deletions runatlantis.io/docs/security.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Security
[[toc]]
## Exploits
Because you usually run Atlantis on a server with credentials that allow access to your infrastructure it's important that you deploy Atlantis securely.

Expand Down Expand Up @@ -66,7 +65,7 @@ To prevent this, you could:
### `--var-file-allowlist`
The files on your Atlantis install may be accessible as [variable definition files](https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files)
from pull requests by adding
from pull requests by adding
`atlantis plan -- -var-file=/path/to/file` comments. To mitigate this security risk, Atlantis has limited such access
only to the files allowlisted by the `--var-file-allowlist` flag. If this argument is not provided, it defaults to
Atlantis' data directory.
Expand All @@ -91,7 +90,7 @@ flags.
### Enable Authentication on Atlantis Web Server
It is very recommended to enable authentication in the web service. Enable BasicAuth using the `--web-basic-auth=true` and setup a username and a password using `--web-username=yourUsername` and `--web-password=yourPassword` flags.
You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` and `ATLANTIS_WEB_PASSWORD=yourPassword`.
You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` and `ATLANTIS_WEB_PASSWORD=yourPassword`.
:::tip Tip
We do encourage the usage of complex passwords in order to prevent basic bruteforcing attacks.
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/server-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ This page explains how to configure the `atlantis server` command.
Configuration to `atlantis server` can be specified via command line flags,
environment variables, a config file or a mix of the three.

[[toc]]

## Environment Variables
All flags can be specified as environment variables.
Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/server-side-repo-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ A Server-Side Config file is used for more groups of server config that can't re
One such usecase is to control per-repo behaviour
and what users can do in repo-level `atlantis.yaml` files.

[[toc]]

## Do I Need A Server-Side Config File?

Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/docs/terraform-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Atlantis integrates seamlessly with Terraform Cloud and Terraform Enterprise, wh
* A Private Installation of Terraform Enterprise

Read the docs below :point_down: depending on your use-case.
[[toc]]

## Using Atlantis With Free Remote State Storage
To use Atlantis with Free Remote State Storage, you need to:
Expand Down
3 changes: 1 addition & 2 deletions runatlantis.io/docs/using-atlantis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ You can use following executable names.
:::

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

---
## atlantis help
Expand Down Expand Up @@ -88,7 +87,7 @@ To perform a destructive plan that will destroy resources you can use the `-dest
atlantis plan -- -destroy
atlantis plan -d dir -- -destroy
```
::: warning NOTE
::: warning NOTE
The `-destroy` flag generates a destroy plan, If this plan is applied it can result in data loss or service disruptions. Ensure that you have thoroughly reviewed your Terraform configuration and intend to remove the specified resources before using this flag.
:::

Expand Down
1 change: 0 additions & 1 deletion runatlantis.io/guide/testing-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ If you want to set up a production-ready Atlantis installation, read [Deployment

Steps:

[[toc]]

## Install Terraform
`terraform` needs to be in the `$PATH` for Atlantis.
Expand Down

0 comments on commit 0a0915c

Please sign in to comment.