Atlantis is a tool that helps you automate Terraform workflows. In this guide, we'll set up Atlantis to work with GitHub Actions for managing your Terraform configurations.
- A GitHub repository containing your Terraform configurations.
- GitHub Actions enabled for your repository.
- Go to your GitHub account settings.
- Navigate to "Developer settings" > "Personal access tokens" > "Generate token."
- Select the necessary scopes such as
repo
andworkflow
. - Click "Generate token" and copy the generated token.
- In your GitHub repository, go to "Settings" > "Secrets" > "New repository secret."
- Add a new secret with the name
ATLANTIS_GH_TOKEN
and paste the GitHub Personal Access Token you generated.
-
Create a file named
.atlantis.yaml
in the root of your Terraform project.# .atlantis.yaml projects: - name: my-terraform-project dir: path/to/terraform/config autoplan: when_modified: ["*.tf", "*.hcl"]