Last active
March 28, 2020 22:25
-
-
Save vidhyachari/ef1b40af77daccdcf05e11e3500ead1f to your computer and use it in GitHub Desktop.
atlantis.yaml file
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
## atlantis.yaml file - This file overwrites the Server Side Repo Config section specfied in the values.yaml file | |
version: 3 | |
automerge: true | |
projects: | |
- name: staging | |
dir: /staging/terraform | |
workspace: default | |
terraform_version: v0.12.20 | |
autoplan: | |
enabled: true | |
workflow: mycustomworkflow | |
- name: production | |
dir: /production/terraform | |
workspace: default | |
terraform_version: v0.12.20 | |
autoplan: | |
enabled: true | |
workflow: mycustomworkflow | |
workflows: | |
mycustomworkflow: | |
plan: | |
steps: | |
## Use environment variables to specify path to terraform plugin directory. This needs to be explicitly given if you use any custom/third party maintained terraform plugins , e.g runscope | |
- env: | |
name: TF_PLUGIN_CACHE_DIR | |
value: "/home/atlantis/.terraform.d/plugins/" | |
## Setup google credentials for all the google cloud projects (staging , production). | |
## This is required for the helm tf provider | |
- run: mkdir -p .gcloud; | |
- run: echo ${GOOGLE_CREDENTIALS} > .gcloud/gcloud_key.json; | |
- env: | |
name: GOOGLE_APPLICATION_CREDENTIALS | |
value: .gcloud/gcloud_key.json | |
- run: gcloud auth activate-service-account --key-file ${GOOGLE_APPLICATION_CREDENTIALS}; | |
- run: gcloud container clusters get-credentials staging --region us-west1 --project staging; | |
- run: gcloud container clusters get-credentials production --region us-west1 --project production; | |
## Script to download any custom/third party tf providers, eg. runscope | |
- run: cd ../../../download-plugin-script.sh | |
- init | |
- plan: | |
extra_args: ["-lock=true"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment