Altlantis : Lesson 1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atlantis Website : https://www.runatlantis.io/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
How to automate Terraform deployments smartly with Atlantis.
What is Atlantis -- ?
Atlantis is an application for automating Terraform via pull requests. It is deployed as a standalone application into your infrastructure. No third-party has access to your credentials.
Atlantis listens for GitHub, GitLab or Bitbucket webhooks about Terraform pull requests. It then runs terraform plan and comments with the output back on the pull request.
When you want to apply, comment atlantis apply on the pull request and Atlantis will run terraform apply and comment back with the output.
The video helps to see it in action
https://www.youtube.com/watch?v=ASdnj59iG2E
- Atlatis is a Open Source tool for automating Terraform deployments
- Uses Pull request
- Can be used with GitHub , GitLab and BigBucket
Why should we use Atlatis ?
- Increase Visibility : When some one creates a new pull request say there is a change in s3 bucket or a new resource has come up . your other team member can tag the new changes and collaborate with you. can also update the existing PR.
- Collaboration: It increases the visibility among your team members, what new resources
or existing resources are changed and what kind of behavior are we
expecting in our infrastructure via terraform
- Review Terraform Plan : Supports the review which is indirectly the terraform plan. So when there is a new PR created it will create the plan for us . It will generate pretty smart output
- Terraform Locking : It also supports Terraform locking because. Because locking is a native feature of terraform, so lets say one PR is using specific backend lets say S3 and at the sametime when some executes a new PR , it will lock that PR and inform that the other PR is also working in the same state. Firstly you will have to apply the earlier PR or unlock it first to continue your other PR work.
- Faster Deployments :
- Auto Merge
Checkout this link for the "atlantis server" command :
https://www.runatlantis.io/docs/server-configuration.html
# NOTE: Use single quotes to avoid shell expansion of *.
atlantis server --repo-allowlist='github.com/myorg/*'
atlantis server -gh-user USER_NAME --gh-token PERSONAL_ACCESS_TOKEN -- repo-allowlist REPO_TO_USE --gh-org ORAGANIZATION_NAME --port 80 --automerge
atlantis server -gh-user USER_NAME --gh-token PERSONAL_ACCESS_TOKEN -- repo-allowlist REPO_TO_USE --gh-org ORAGANIZATION_NAME --port 80 --automerge


Comments
Post a Comment