SlideShare a Scribd company logo
1 of 24
Download to read offline
Collaborative Terraform
with Atlantis
2023-06-30 @ Let’s Code meetup
Introduction
Ferenc Kovács
DevOps guy from Budapest, Hungary
Infrastructure Tech Lead at IBM Budapest Lab
FLOSS enthusiast
What is Terraform?
“Terraform is an infrastructure as code
tool that lets you build, change, and
version cloud and on-prem resources
safely and efficiently.”
No but really, what is Terraform?
“Random” IaC code executed on
someone’s laptop, then not properly
merged to git.
What is the problem with local apply?
- Prone to “works on my machine” issues
- Diverging tf and provider versions.
- Diverging tf/environment vars.
- Lack of visibility/auditability
- Who applied what/when and what was the
output/error?
- People need access to the remote state.
- People need credentials for the providers.
What is the problem with local apply?
- Even if you do code reviews in Github it is
cumbersome to copy/paste plan outputs and
apply can always fail regardless(we are
dependent not just our code correctness but
the state/availability of the provider APIs).
The solution
We need a predictable, trusted and audited
environment where terraform actions can be
executed and preferably integrated with VCS.
Terraform Cloud/Enterprise
- It’s a solution from Hashicorp, it is tightly integrated with
terraform itself.
- Allows you to use remote terraform execution and it
allows you to centrally manage the env
variables/secrets.
- Requires you to store the remote state there, but they
have a self-hosted Enterprise install($$$).
- The free-tier plan is really nice, if you have max 5
people using it and you don’t mind using a closed
source third party solution.
Env0
- It is a more complex solution, supports most of the
available IaC tools (TF, CF, Pulumi, etc.).
- This is also a closed source 3rd party, but as part of
their Business/Enterprise offering they also provide
Self-hosted agents which allows you to keep your
workload and secrets on-prem.
- They have nice documentation comparing their offering
to TF Cloud and Atlantis.
- No free plan, only free-trial.
Garden.io
- It is a more complex solution, supports most of the
available IaC tools (TF, CF, Pulumi, etc.).
- It makes it possible to declare all of your heterogen
stack declaration/pipelines in an uniform way and chain
them together. Creating a new environment from a
single command.
- The Garden core tool is open-source, but the
centralized execution environment is a paid (closed
source) feature.
- They also have a self-hosted Enterprise offering.
Scalr
- They only focus on Terraform, much simpler than Env0
or Garden.
- They also provide local agents as part of the enterprise
offering, but you can’t host your secrets for yourself.
- They have a free plan of 50 runs per month, max 50
users and max 100 workspaces.
Spacelift
- It is a more complex solution, supports most of the
available IaC tools (TF, CF, Pulumi, etc.).
- This is also a closed source 3rd party, but as part of
their Enterprise offering they also provide a hybrid-saas
and a self-hosted option which allows you to keep your
workload and secrets on-prem.
- They have nice documentation comparing their offering
to TF Cloud and Atlantis.
- They have a forever free plan for 2 users.
But what about Atlantis?
- https://runatlantis.io/
- It is mostly for Terraform (but stuff like Terragrunt and
cdktf are also supported).
- It is a truly open-source solution, with a permissive
Apache license.
- Because it’s open-source there is a bunch of integration
with all kind of tools and services.
- It has an extendable workflow system, and if something
is still lacking you can send a Pull Request.
- But you have to configure and host it for yourself.
(Average)Atlantis workflow
1. You create a Pull Request with your changes.
2. You “atlantis plan” (if autoplan is not enabled), atlantis
executes terraform init & plan and comments the result
to the PR. You iterate until your plan is successful and
looks good.
3. Somebody reviews and approves your PR.
4. You “atlantis apply” (if autoapply is not enabled), atlantis
executes terraform apply and comments the result to
the PR. You iterate until your apply is successful.
5. Merge the PR.
Atlantis workflow behind the scenes
Supported Installation Methods
● Docker container
● Helm chart
● Kubernetes Manifest
● Kubernetes Kustomize
● Terraform module for AWS Fargate
● Terraform module for GCE
● Terraform module for Azure (but helm chart also works)
● Roll your own (it’s just running a single binary, really)
● For dev/test purposes you can also just run it and
expose with Ngrok (but don’t forget restricting it).
Supported VCSs
● Github/Github enterprise, with user+pat or with Github
App integration
● Gitlab/Gitlab enterprise with pat
● Bitbucket Cloud with pat
● Bitbucket Server with pat
● Azure Devops with pat
Terraform version support
● Atlantis will honor the required_version in your
workspace, but you can also explicitly specify a default
and a workspace specific terraform version in your
atlantis.yaml.
● Atlantis will resolve and install your providers/plugins as
it would happen if you manually executed terraform init.
● From personal experience if you decide to
change/bump your version constraints mid-plan you will
need to discard your current plan and plan again.
Atlantis locking
Atlantis introduces an additional lock mechanism, any
terraform workspace which have an active Atlantis plan will
be locked, so concurrent Pull Requests won’t be able to
plan for the same workspace until the previous plan is
either applied or discarded.
You can discard plans from the github PR or from the
atlantis UI.
Customizing Atlantis
1. You can have global configuration options which can be
set through arguments/config file values or environment
variables passed to the Atlantis binary.
2. For repository specific settings you can use a
Server-Side Repo Config.
3. You can also have an atlantis.yaml file in the root of
your terraform repositories, which can modify atlantis
behavior on a repo or workspace level.
Repo structures
● You can have a terraform workspace in your repo.
● You can have multiple workspaces as top level
directories in your repo.
● You can have workspace directories in a tree-like
structure.
● You can declare relations between your workspaces in
atlantis.yaml, and atlantis will help you to cascade the
plans between workspaces.
● You can have multiple repositories managed by a single
Atlantis instance.
Command Requirements
● Atlantis supports the following requirements:
○ Approved
○ Mergeable
○ UnDiverged
● You can use these as to specify when can plan, apply
and import execute.
● By default after the apply requirement are met (plan is
green, PR is approved, etc.) anybody who can comment
can atlantis apply, you can change this with
gh-team-allowlist.
Security
● Make sure to read through the security documentation:
○ https://www.runatlantis.io/docs/security.html
● Follow your company’s Security Standards and consider
Atlantis as a critical production asset.
● Use webhook secrets and you can also additionally
firewall atlantis to restrict webhook access from your
VCS only.
● You can also put a WAF in front of it just in case.
Thanks for your attention!
Slides will be here:
http://www.slideshare.net/Tyrael
If you have any questions:
tyrael@tyrael.hu
@Tyr43l

More Related Content

What's hot

Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編Masahito Zembutsu
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기Ian Choi
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 
Image Scanning Best Practices for Containers and Kubernetes
Image Scanning Best Practices for Containers and KubernetesImage Scanning Best Practices for Containers and Kubernetes
Image Scanning Best Practices for Containers and KubernetesDevOps.com
 
30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版Naoki (Neo) SATO
 
大規模環境のOpenStack アップグレードの考え方と実施のコツ
大規模環境のOpenStackアップグレードの考え方と実施のコツ大規模環境のOpenStackアップグレードの考え方と実施のコツ
大規模環境のOpenStack アップグレードの考え方と実施のコツTomoya Hashimoto
 
「ドメイン駆動設計」の複雑さに立ち向かう
「ドメイン駆動設計」の複雑さに立ち向かう「ドメイン駆動設計」の複雑さに立ち向かう
「ドメイン駆動設計」の複雑さに立ち向かう増田 亨
 
Keycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティKeycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティYuichi Nakamura
 
ファイルシステム比較
ファイルシステム比較ファイルシステム比較
ファイルシステム比較NaoyaFukuda
 
【メモ】一般的に設計書に定義される項目例
【メモ】一般的に設計書に定義される項目例【メモ】一般的に設計書に定義される項目例
【メモ】一般的に設計書に定義される項目例Hirokazu Yatsunami
 
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうセキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうShinodaYukihiro
 
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)NTT DATA Technology & Innovation
 
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロAmazon Web Services Japan
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraformJulien Pivotto
 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systemsTim Staley
 
FINAL FANTASY Record Keeperを支えたGolang
FINAL FANTASY Record Keeperを支えたGolangFINAL FANTASY Record Keeperを支えたGolang
FINAL FANTASY Record Keeperを支えたGolangYoshiki Shibukawa
 

What's hot (20)

vSphere 7 へのアップグレードについて
vSphere 7 へのアップグレードについてvSphere 7 へのアップグレードについて
vSphere 7 へのアップグレードについて
 
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
Helidon 概要
Helidon 概要Helidon 概要
Helidon 概要
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Image Scanning Best Practices for Containers and Kubernetes
Image Scanning Best Practices for Containers and KubernetesImage Scanning Best Practices for Containers and Kubernetes
Image Scanning Best Practices for Containers and Kubernetes
 
30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版30分でわかるマイクロサービスアーキテクチャ 第2版
30分でわかるマイクロサービスアーキテクチャ 第2版
 
大規模環境のOpenStack アップグレードの考え方と実施のコツ
大規模環境のOpenStackアップグレードの考え方と実施のコツ大規模環境のOpenStackアップグレードの考え方と実施のコツ
大規模環境のOpenStack アップグレードの考え方と実施のコツ
 
「ドメイン駆動設計」の複雑さに立ち向かう
「ドメイン駆動設計」の複雑さに立ち向かう「ドメイン駆動設計」の複雑さに立ち向かう
「ドメイン駆動設計」の複雑さに立ち向かう
 
Keycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティKeycloak入門-OpenID ConnectによるAPIセキュリティ
Keycloak入門-OpenID ConnectによるAPIセキュリティ
 
ファイルシステム比較
ファイルシステム比較ファイルシステム比較
ファイルシステム比較
 
【メモ】一般的に設計書に定義される項目例
【メモ】一般的に設計書に定義される項目例【メモ】一般的に設計書に定義される項目例
【メモ】一般的に設計書に定義される項目例
 
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうセキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
 
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)
Kubernetes環境に対する性能試験(Kubernetes Novice Tokyo #2 発表資料)
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
[Aurora事例祭り]AWS Database Migration Service と Schema Conversion Tool の使いドコロ
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systems
 
FINAL FANTASY Record Keeperを支えたGolang
FINAL FANTASY Record Keeperを支えたGolangFINAL FANTASY Record Keeperを支えたGolang
FINAL FANTASY Record Keeperを支えたGolang
 

Similar to Collaborative Terraform with Atlantis

Self-service PR-based Terraform
Self-service PR-based TerraformSelf-service PR-based Terraform
Self-service PR-based TerraformAndrew Kirkpatrick
 
Terraform + ansible talk
Terraform + ansible talkTerraform + ansible talk
Terraform + ansible talkJames Strong
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs PulumiHoaiNam307
 
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...Deltares
 
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfHashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfssuser705051
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on TerraformDevops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on TerraformDrew Malone
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform DevOpsColumbia
 
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...7mind
 
Terraform Abstractions for Safety and Power
Terraform Abstractions for Safety and PowerTerraform Abstractions for Safety and Power
Terraform Abstractions for Safety and PowerCalvin French-Owen
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesdrupalindia
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒StephaneBoghossian1
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloTerraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloAnton Babenko
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*Haggai Philip Zagury
 
Introduction to Terra space Presentation
Introduction to Terra space PresentationIntroduction to Terra space Presentation
Introduction to Terra space PresentationKnoldus Inc.
 
Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Knoldus Inc.
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleDamien Garros
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practicesAnton Babenko
 
TYPO3 CMS v8 in the cloud
TYPO3 CMS v8 in the cloudTYPO3 CMS v8 in the cloud
TYPO3 CMS v8 in the cloudJohannes Goslar
 

Similar to Collaborative Terraform with Atlantis (20)

Self-service PR-based Terraform
Self-service PR-based TerraformSelf-service PR-based Terraform
Self-service PR-based Terraform
 
Terraform + ansible talk
Terraform + ansible talkTerraform + ansible talk
Terraform + ansible talk
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs Pulumi
 
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...
DSD-INT 2022 Singularity containers - simplifying the use of Delft3D FM on Hi...
 
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfHashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
 
Terraform-2.pdf
Terraform-2.pdfTerraform-2.pdf
Terraform-2.pdf
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on TerraformDevops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
 
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
 
Terraform Abstractions for Safety and Power
Terraform Abstractions for Safety and PowerTerraform Abstractions for Safety and Power
Terraform Abstractions for Safety and Power
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloTerraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group Oslo
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*
 
Introduction to Terra space Presentation
Introduction to Terra space PresentationIntroduction to Terra space Presentation
Introduction to Terra space Presentation
 
Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and Ansible
 
Terraform training 🎒 - Basic
Terraform training 🎒 - BasicTerraform training 🎒 - Basic
Terraform training 🎒 - Basic
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practices
 
TYPO3 CMS v8 in the cloud
TYPO3 CMS v8 in the cloudTYPO3 CMS v8 in the cloud
TYPO3 CMS v8 in the cloud
 

More from Ferenc Kovács

Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside OutFerenc Kovács
 
A PHP 5.5 újdonságai.
A PHP 5.5 újdonságai.A PHP 5.5 újdonságai.
A PHP 5.5 újdonságai.Ferenc Kovács
 
A PHP 5.4 újdonságai
A PHP 5.4 újdonságaiA PHP 5.4 újdonságai
A PHP 5.4 újdonságaiFerenc Kovács
 
Biztonságos webalkalmazások fejlesztése
Biztonságos webalkalmazások fejlesztéseBiztonságos webalkalmazások fejlesztése
Biztonságos webalkalmazások fejlesztéseFerenc Kovács
 
Webalkalmazások teljesítményoptimalizálása
Webalkalmazások teljesítményoptimalizálásaWebalkalmazások teljesítményoptimalizálása
Webalkalmazások teljesítményoptimalizálásaFerenc Kovács
 
PHP alkalmazások minőségbiztosítása
PHP alkalmazások minőségbiztosításaPHP alkalmazások minőségbiztosítása
PHP alkalmazások minőségbiztosításaFerenc Kovács
 

More from Ferenc Kovács (8)

Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside Out
 
Monitorama
MonitoramaMonitorama
Monitorama
 
A PHP 5.5 újdonságai.
A PHP 5.5 újdonságai.A PHP 5.5 újdonságai.
A PHP 5.5 újdonságai.
 
Php 5.5
Php 5.5Php 5.5
Php 5.5
 
A PHP 5.4 újdonságai
A PHP 5.4 újdonságaiA PHP 5.4 újdonságai
A PHP 5.4 újdonságai
 
Biztonságos webalkalmazások fejlesztése
Biztonságos webalkalmazások fejlesztéseBiztonságos webalkalmazások fejlesztése
Biztonságos webalkalmazások fejlesztése
 
Webalkalmazások teljesítményoptimalizálása
Webalkalmazások teljesítményoptimalizálásaWebalkalmazások teljesítményoptimalizálása
Webalkalmazások teljesítményoptimalizálása
 
PHP alkalmazások minőségbiztosítása
PHP alkalmazások minőségbiztosításaPHP alkalmazások minőségbiztosítása
PHP alkalmazások minőségbiztosítása
 

Recently uploaded

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 

Recently uploaded (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 

Collaborative Terraform with Atlantis

  • 2. Introduction Ferenc Kovács DevOps guy from Budapest, Hungary Infrastructure Tech Lead at IBM Budapest Lab FLOSS enthusiast
  • 3. What is Terraform? “Terraform is an infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.”
  • 4. No but really, what is Terraform? “Random” IaC code executed on someone’s laptop, then not properly merged to git.
  • 5. What is the problem with local apply? - Prone to “works on my machine” issues - Diverging tf and provider versions. - Diverging tf/environment vars. - Lack of visibility/auditability - Who applied what/when and what was the output/error? - People need access to the remote state. - People need credentials for the providers.
  • 6. What is the problem with local apply? - Even if you do code reviews in Github it is cumbersome to copy/paste plan outputs and apply can always fail regardless(we are dependent not just our code correctness but the state/availability of the provider APIs).
  • 7. The solution We need a predictable, trusted and audited environment where terraform actions can be executed and preferably integrated with VCS.
  • 8. Terraform Cloud/Enterprise - It’s a solution from Hashicorp, it is tightly integrated with terraform itself. - Allows you to use remote terraform execution and it allows you to centrally manage the env variables/secrets. - Requires you to store the remote state there, but they have a self-hosted Enterprise install($$$). - The free-tier plan is really nice, if you have max 5 people using it and you don’t mind using a closed source third party solution.
  • 9. Env0 - It is a more complex solution, supports most of the available IaC tools (TF, CF, Pulumi, etc.). - This is also a closed source 3rd party, but as part of their Business/Enterprise offering they also provide Self-hosted agents which allows you to keep your workload and secrets on-prem. - They have nice documentation comparing their offering to TF Cloud and Atlantis. - No free plan, only free-trial.
  • 10. Garden.io - It is a more complex solution, supports most of the available IaC tools (TF, CF, Pulumi, etc.). - It makes it possible to declare all of your heterogen stack declaration/pipelines in an uniform way and chain them together. Creating a new environment from a single command. - The Garden core tool is open-source, but the centralized execution environment is a paid (closed source) feature. - They also have a self-hosted Enterprise offering.
  • 11. Scalr - They only focus on Terraform, much simpler than Env0 or Garden. - They also provide local agents as part of the enterprise offering, but you can’t host your secrets for yourself. - They have a free plan of 50 runs per month, max 50 users and max 100 workspaces.
  • 12. Spacelift - It is a more complex solution, supports most of the available IaC tools (TF, CF, Pulumi, etc.). - This is also a closed source 3rd party, but as part of their Enterprise offering they also provide a hybrid-saas and a self-hosted option which allows you to keep your workload and secrets on-prem. - They have nice documentation comparing their offering to TF Cloud and Atlantis. - They have a forever free plan for 2 users.
  • 13. But what about Atlantis? - https://runatlantis.io/ - It is mostly for Terraform (but stuff like Terragrunt and cdktf are also supported). - It is a truly open-source solution, with a permissive Apache license. - Because it’s open-source there is a bunch of integration with all kind of tools and services. - It has an extendable workflow system, and if something is still lacking you can send a Pull Request. - But you have to configure and host it for yourself.
  • 14. (Average)Atlantis workflow 1. You create a Pull Request with your changes. 2. You “atlantis plan” (if autoplan is not enabled), atlantis executes terraform init & plan and comments the result to the PR. You iterate until your plan is successful and looks good. 3. Somebody reviews and approves your PR. 4. You “atlantis apply” (if autoapply is not enabled), atlantis executes terraform apply and comments the result to the PR. You iterate until your apply is successful. 5. Merge the PR.
  • 16. Supported Installation Methods ● Docker container ● Helm chart ● Kubernetes Manifest ● Kubernetes Kustomize ● Terraform module for AWS Fargate ● Terraform module for GCE ● Terraform module for Azure (but helm chart also works) ● Roll your own (it’s just running a single binary, really) ● For dev/test purposes you can also just run it and expose with Ngrok (but don’t forget restricting it).
  • 17. Supported VCSs ● Github/Github enterprise, with user+pat or with Github App integration ● Gitlab/Gitlab enterprise with pat ● Bitbucket Cloud with pat ● Bitbucket Server with pat ● Azure Devops with pat
  • 18. Terraform version support ● Atlantis will honor the required_version in your workspace, but you can also explicitly specify a default and a workspace specific terraform version in your atlantis.yaml. ● Atlantis will resolve and install your providers/plugins as it would happen if you manually executed terraform init. ● From personal experience if you decide to change/bump your version constraints mid-plan you will need to discard your current plan and plan again.
  • 19. Atlantis locking Atlantis introduces an additional lock mechanism, any terraform workspace which have an active Atlantis plan will be locked, so concurrent Pull Requests won’t be able to plan for the same workspace until the previous plan is either applied or discarded. You can discard plans from the github PR or from the atlantis UI.
  • 20. Customizing Atlantis 1. You can have global configuration options which can be set through arguments/config file values or environment variables passed to the Atlantis binary. 2. For repository specific settings you can use a Server-Side Repo Config. 3. You can also have an atlantis.yaml file in the root of your terraform repositories, which can modify atlantis behavior on a repo or workspace level.
  • 21. Repo structures ● You can have a terraform workspace in your repo. ● You can have multiple workspaces as top level directories in your repo. ● You can have workspace directories in a tree-like structure. ● You can declare relations between your workspaces in atlantis.yaml, and atlantis will help you to cascade the plans between workspaces. ● You can have multiple repositories managed by a single Atlantis instance.
  • 22. Command Requirements ● Atlantis supports the following requirements: ○ Approved ○ Mergeable ○ UnDiverged ● You can use these as to specify when can plan, apply and import execute. ● By default after the apply requirement are met (plan is green, PR is approved, etc.) anybody who can comment can atlantis apply, you can change this with gh-team-allowlist.
  • 23. Security ● Make sure to read through the security documentation: ○ https://www.runatlantis.io/docs/security.html ● Follow your company’s Security Standards and consider Atlantis as a critical production asset. ● Use webhook secrets and you can also additionally firewall atlantis to restrict webhook access from your VCS only. ● You can also put a WAF in front of it just in case.
  • 24. Thanks for your attention! Slides will be here: http://www.slideshare.net/Tyrael If you have any questions: tyrael@tyrael.hu @Tyr43l