Last active
February 8, 2022 12:09
-
-
Save zytek/1d82ec0d7fdff09110765c451fd54129 to your computer and use it in GitHub Desktop.
Terraform FMT check on Github Pull Requests via atlantis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will run terraform fmt check on pull requests before planning | |
# Requires atlantis >= 0.4.15 | |
version: 2 | |
automerge: true | |
projects: | |
- name: myproject | |
dir: . | |
workspace: default | |
terraform_version: v0.11.11 | |
apply_requirements: [mergeable, approved] | |
workflow: myworkflow | |
workflows: | |
myworkflow: | |
plan: | |
steps: | |
- run: terraform fmt -check=true -diff=true -write=false | |
- init | |
- plan | |
apply: | |
steps: | |
- apply |
Note: runatlantis/atlantis#490
I see this issue and the related issue were closed. Are you still running terraform fmt
in the above way?
This takes the default terraform version instead something what Atlantis can define.
e.g. /usr/local/bin/terraform0.13.7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: runatlantis/atlantis#490