<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marcin Wyszynski</title>
    <description>The latest articles on DEV Community by Marcin Wyszynski (@marcinwyszynski).</description>
    <link>https://dev.to/marcinwyszynski</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F593680%2F0a696103-51a3-4208-a8a2-074369fbbdfd.png</url>
      <title>DEV Community: Marcin Wyszynski</title>
      <link>https://dev.to/marcinwyszynski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marcinwyszynski"/>
    <language>en</language>
    <item>
      <title>How to Quickly Improve Your Infrastructure as Code</title>
      <dc:creator>Marcin Wyszynski</dc:creator>
      <pubDate>Wed, 17 Nov 2021 22:40:00 +0000</pubDate>
      <link>https://dev.to/spacelift/how-to-quickly-improve-your-infrastructure-as-code-3b1o</link>
      <guid>https://dev.to/spacelift/how-to-quickly-improve-your-infrastructure-as-code-3b1o</guid>
      <description>&lt;p&gt;The introduction of &lt;a href="https://spacelift.io/blog/infrastructure-as-code" rel="noopener noreferrer"&gt;Infrastructure as Code&lt;/a&gt; or IaC has transformed the way you can provision and deploy high-performance cloud-based IT infrastructures.&lt;/p&gt;

&lt;p&gt;IaC tools, such as &lt;a href="https://spacelift.io/blog/what-is-terraform" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;, have been integrated into DevOps toolchains, saving DevOps IaC teams from the excessive manual effort.&lt;/p&gt;

&lt;p&gt;While these tools undoubtedly help accelerate building IT infrastructures, their limitations can impact DevOps’ ability to optimize and improve control of their IaC processes supporting future business needs.&lt;/p&gt;

&lt;p&gt;In this article, you’ll learn about IT infrastructure limitations that IaC DevOps teams deal with on a daily basis and how &lt;a href="https://spacelift.io/" rel="noopener noreferrer"&gt;Spacelift&lt;/a&gt; is able to get past them.&lt;/p&gt;

&lt;h1&gt;
  
  
  1) Workflow
&lt;/h1&gt;

&lt;p&gt;One of the most frequent challenges while using more generic IaC tools is the &lt;strong&gt;non-intuitive workflow&lt;/strong&gt; driven by its reliance on pull requests. Some solutions offer multiple workspaces, but the result can be fragile and nondeterministic. &lt;/p&gt;

&lt;p&gt;Since there’s no concept of mapping projects to branches or tags, anyone commenting on an approved pull request can deploy arbitrary code to production, even if the approval was meant for a short-lived experimental environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spacelift does not depend on pull requests.&lt;/strong&gt; It is mostly driven by push and tag events, so building a sophisticated Git flow is much easier. Spacelift reports the outcome of its jobs as commit status checks, allowing you to block merging the code on a failing Spacelift check.&lt;/p&gt;

&lt;p&gt;Triggering a run can be customized using &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy" rel="noopener noreferrer"&gt;Git push policies&lt;/a&gt;. Thanks to that, Spacelift can provide the same level of comfort and security to teams using one project per repository and those using mono repo with hundreds of interdependent projects. You can read more about our approach to VCS integration &lt;a href="https://docs.spacelift.io/integrations/source-control/github#tracked-branches" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  2) Access Control
&lt;/h1&gt;

&lt;p&gt;The majority of generic tools don’t offer access control models but rely on comments on pull requests to drive infrastructure deployments. While it is usually fine when a single repository drives a single Terraform project, it becomes a huge liability for more complex scenarios.&lt;/p&gt;

&lt;p&gt;Spacelift ships with a sophisticated mechanism &lt;strong&gt;allowing administrators to declare&lt;/strong&gt; &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy" rel="noopener noreferrer"&gt;who can log in&lt;/a&gt; (and under what circumstances) and what their &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy" rel="noopener noreferrer"&gt;level of access&lt;/a&gt; to each of the managed projects should be. Even our &lt;a href="https://docs.spacelift.io/integrations/slack" rel="noopener noreferrer"&gt;Slack integration&lt;/a&gt; can be subject to policy controls, allowing an admin to grant access to a project &lt;a href="https://docs.spacelift.io/integrations/slack#managing-access-to-stacks-with-policies" rel="noopener noreferrer"&gt;based on Slack-specific data&lt;/a&gt; (think team, channel, user, etc.).&lt;/p&gt;

&lt;h1&gt;
  
  
  3) Policy Framework
&lt;/h1&gt;

&lt;p&gt;One thing that’s not in scope for most IaC solutions is the way to ensure that your infrastructure is compliant with industry best practices and your company policies.&lt;/p&gt;

&lt;p&gt;Spacelift puts &lt;strong&gt;policy-as-code&lt;/strong&gt; in the center of its value proposition and builds a consistent, &lt;a href="https://docs.spacelift.io/concepts/policy" rel="noopener noreferrer"&gt;robust policy framework&lt;/a&gt; on top of &lt;a href="https://www.openpolicyagent.org/" rel="noopener noreferrer"&gt;Open Policy Agent&lt;/a&gt;. Apart from providing a comprehensive automated change review and ensuring compliance of your &lt;a href="https://docs.spacelift.io/concepts/policy/terraform-plan-policy" rel="noopener noreferrer"&gt;Terraform changes&lt;/a&gt;, Spacelift uses the same approach to allow you to declare rules around the &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy" rel="noopener noreferrer"&gt;account&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy" rel="noopener noreferrer"&gt;project access&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy" rel="noopener noreferrer"&gt;handling push notifications&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/policy/run-initialization-policy" rel="noopener noreferrer"&gt;starting runs&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/task-run-policy" rel="noopener noreferrer"&gt;triggering tasks&lt;/a&gt;, and creating &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;relationships between projects&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  4) Complex Workflows
&lt;/h1&gt;

&lt;p&gt;Handling interdependencies between projects has always been Terraform’s Achilles’ heel. The usual approach to this problem is adding another layer of abstraction in the form of a Terraform wrapper like &lt;a href="https://terragrunt.gruntwork.io/" rel="noopener noreferrer"&gt;Terragrunt&lt;/a&gt;. But it’s only a partial solution as it breaks the problem into smaller chunks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;Spacelift’s trigger policies&lt;/a&gt; on the other hand provide a smart, &lt;strong&gt;declarative automation layer&lt;/strong&gt; on top of vanilla Terraform. They allow you to plug into state changes of individual projects and declare dependencies that should be resolved, following the changes that have just been applied. Read more &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;here&lt;/a&gt; to discover other exciting possibilities.&lt;/p&gt;

&lt;h1&gt;
  
  
  5) Private Module Registry
&lt;/h1&gt;

&lt;p&gt;Another problem to solve externally when using some of the generic tools is authoring and maintaining reusable &lt;a href="https://spacelift.io/blog/what-are-terraform-modules-and-how-do-they-work" rel="noopener noreferrer"&gt;Terraform modules&lt;/a&gt; for your organization. Terraform is flexible in allowing modules to come from &lt;a href="https://www.terraform.io/docs/language/modules/sources.html" rel="noopener noreferrer"&gt;various sources&lt;/a&gt;, but ensuring confidential access, as well as testing and versioning, are left to you, the user.&lt;/p&gt;

&lt;p&gt;Until now, the golden standard in that regard has been the &lt;a href="https://www.terraform.io/docs/cloud/registry/index.html" rel="noopener noreferrer"&gt;private module registry from HashiCorp&lt;/a&gt;. But Spacelift offers much more. Far from being just a glorified package manager, Spacelift adds a &lt;a href="https://docs.spacelift.io/vendors/terraform/module-registry" rel="noopener noreferrer"&gt;full CI solution for Terraform modules&lt;/a&gt;, out of the box and free of charge. You can thus ensure that your private modules are healthy before you distribute them to the rest of your organization.&lt;/p&gt;

&lt;h1&gt;
  
  
  6) Effortless Setup and Customization
&lt;/h1&gt;

&lt;p&gt;If you manage a single or a handful of rarely changing projects, it’s likely that you just set your IaC up once and forget about it. But in a more dynamic environment, where microservices come and go, new environments proliferate and new product teams require their own Terraform workspaces. The need to configure it each and every time become a major nuisance, putting a lot of pressure on your DevOps team.&lt;/p&gt;

&lt;p&gt;Enter Spacelift. In Spacelift, much of the &lt;strong&gt;configuration can be handled by the project owners&lt;/strong&gt; themselves—you can add Terraform and/or &lt;a href="https://docs.spacelift.io/concepts/configuration/environment" rel="noopener noreferrer"&gt;environment variables&lt;/a&gt; and mount files (even inject Terraform code!) programmatically or through the GUI without the need for administrative privileges or changing the central server configuration. For administrators, adding new projects requires minimal hassle since there’s no need to set up webhooks or change any YAML. And it can all be done programmatically using Terraform.&lt;/p&gt;

&lt;h1&gt;
  
  
  7) Programmatic Configuration
&lt;/h1&gt;

&lt;p&gt;What comes as a pleasant surprise to users of generic CI tools, Spacelift entities such as stacks, contexts, modules or policies can be managed in a declarative way using your favorite infra-as-code tool (this rule applies also to their configuration). Yes, that’s right—&lt;a href="https://docs.spacelift.io/vendors/terraform/terraform-provider" rel="noopener noreferrer"&gt;Spacelift offers a Terraform provider&lt;/a&gt; that allows you to &lt;strong&gt;programmatically manage the lifecycle of its own resources&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Administrative stacks get credential-less access to the subset of our &lt;a href="https://docs.spacelift.io/integrations/api" rel="noopener noreferrer"&gt;GraphQL API&lt;/a&gt; that does not involve managing the actual infrastructure. For more sophisticated use cases, Spacelift allows you to generate API keys that are subject to the same access controls as normal users are, allowing you to create single-purpose tokens for restricted use by your internal scripts.&lt;/p&gt;

&lt;h1&gt;
  
  
  8) Drift Detection
&lt;/h1&gt;

&lt;p&gt;Generic IaC platforms do not provide any mechanisms to detect if your infrastructure is undergoing drift. Drift is a condition that represents the difference between the desired and the actual state of the infrastructure managed by your tool of choice – &lt;a href="https://www.terraform.io/" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;, &lt;a href="https://www.pulumi.com/" rel="noopener noreferrer"&gt;Pulumi&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudformation/" rel="noopener noreferrer"&gt;CloudFormation&lt;/a&gt; or another. Drift can be caused by either or a combination of changes directly introduced by external actors – either humans or machines (scripts) or via the dependency of your resources on external data sources. In any case, drift is not good.&lt;/p&gt;

&lt;p&gt;Spacelift has got you covered here. You can configure periodic &lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection" rel="noopener noreferrer"&gt;drift detection&lt;/a&gt; to &lt;strong&gt;notify you whenever drift happens&lt;/strong&gt;, and take immediate action. You can even go a step further with optional automatic &lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection#to-reconcile-or-not-to-reconcile" rel="noopener noreferrer"&gt;reconciliation&lt;/a&gt;, ensuring your infrastructure always resembles your Terraform configuration.&lt;/p&gt;

&lt;h1&gt;
  
  
  9) Resource Visualization
&lt;/h1&gt;

&lt;p&gt;General-purpose CI/CD platforms provide little to no insight into resource utilization from either a real-time or historical perspective. Which resources are over-or underutilized? &lt;/p&gt;

&lt;p&gt;Developers need to be able to intimately understand the material they’re working with. With regards to infra-as-code, the most important part of this story is understanding the managed resources in-depth. Both from the current perspective and through being able to put each resource in its historical context.&lt;/p&gt;

&lt;p&gt;The resources view in Spacelift gives you &lt;strong&gt;greater visibility into each and every resource&lt;/strong&gt;. With this deep insight into resources, DevOps are able to gain an understanding of the lifecycle of each resource managed by Spacelift and document it, regardless of the technology used — &lt;a href="https://www.terraform.io/" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;, &lt;a href="https://github.com/gruntwork-io/terragrunt" rel="noopener noreferrer"&gt;Terragrunt&lt;/a&gt;, &lt;a href="//pulumi.com"&gt;Pulumi&lt;/a&gt;, or &lt;a href="https://aws.amazon.com/cloudformation/" rel="noopener noreferrer"&gt;CloudFormation&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creature Comforts
&lt;/h1&gt;

&lt;p&gt;Last but not least, Spacelift puts an emphasis on great user experience, offering a myriad of creature comforts. &lt;a href="https://docs.spacelift.io/concepts/configuration/context" rel="noopener noreferrer"&gt;Contexts&lt;/a&gt; for example allow you to attach entire collections of configuration to individual stacks and modules. &lt;a href="https://docs.spacelift.io/concepts/run/task" rel="noopener noreferrer"&gt;Tasks&lt;/a&gt; provide a powerful audited way of running one-off administrative commands on an initialized Terraform environment – subject to &lt;a href="https://docs.spacelift.io/concepts/run/task" rel="noopener noreferrer"&gt;their own policy constraints&lt;/a&gt;. &lt;a href="https://docs.spacelift.io/concepts/stack#stack-locking" rel="noopener noreferrer"&gt;Stack locking&lt;/a&gt; allows a single individual to take exclusive control over a stack to ensure that nobody is able to modify its state while crucial changes are being made. &lt;/p&gt;

&lt;h1&gt;
  
  
  Why Spacelift
&lt;/h1&gt;

&lt;p&gt;Spacelift is an innovative and sophisticated SaaS product for Infrastructure as Code which helps IaC DevOps develop and deploy new infrastructures or changes quickly and with confidence.&lt;/p&gt;

&lt;p&gt;Spacelift offers a unique set of IaC management capabilities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a more intuitive, &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy" rel="noopener noreferrer"&gt;versatile&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/run#run-state-machine" rel="noopener noreferrer"&gt;robust&lt;/a&gt; workflow&lt;/li&gt;
&lt;li&gt;extremely granular access controls on &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy" rel="noopener noreferrer"&gt;account&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy" rel="noopener noreferrer"&gt;project level&lt;/a&gt; that work well with &lt;a href="https://docs.spacelift.io/integrations/single-sign-on" rel="noopener noreferrer"&gt;an identity provider of your choice&lt;/a&gt; (SSO);&lt;/li&gt;
&lt;li&gt;an &lt;a href="https://docs.spacelift.io/concepts/policy/terraform-plan-policy" rel="noopener noreferrer"&gt;automated code review&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/task-run-policy" rel="noopener noreferrer"&gt;threat detection&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;the ability to &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;declare complex workflows&lt;/a&gt; between projects across multiple repositories&lt;/li&gt;
&lt;li&gt;a &lt;a href="https://docs.spacelift.io/concepts/modules" rel="noopener noreferrer"&gt;built-in private module registry&lt;/a&gt; with a full CI system for modules&lt;/li&gt;
&lt;li&gt;effortless setup and customization with &lt;a href="https://docs.spacelift.io/concepts/configuration/environment" rel="noopener noreferrer"&gt;per-project environment management&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/integrations/docker" rel="noopener noreferrer"&gt;Docker integration&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/integrations/terraform-provider" rel="noopener noreferrer"&gt;programmatic configuration&lt;/a&gt; using Terraform;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection" rel="noopener noreferrer"&gt;drift detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spacelift.io/concepts/resources" rel="noopener noreferrer"&gt;resource visualization&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;… and a myriad of creature comforts like &lt;a href="https://docs.spacelift.io/concepts/configuration/context" rel="noopener noreferrer"&gt;contexts&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/run/task" rel="noopener noreferrer"&gt;tasks&lt;/a&gt; or &lt;a href="https://docs.spacelift.io/concepts/stack#stack-locking" rel="noopener noreferrer"&gt;stack locking&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Key Points
&lt;/h1&gt;

&lt;p&gt;There are many ways of working with Terraform. Each way is different in terms of complexity and offers a different set of features. It is important to keep in mind that choosing one way or another should be based on business and technical requirements. Most often, there is no point in implementing an in-house solution as the cost and effort of building and maintaining it may exceed its potential benefits. It is much easier and more efficient to leverage platforms such as &lt;a href="https://spacelift.io/product" rel="noopener noreferrer"&gt;Spacelift&lt;/a&gt; to provide these features for you instead. You can &lt;a href="https://spacelift.io/free-trial" rel="noopener noreferrer"&gt;try Spacelift for free&lt;/a&gt; or &lt;a href="https://spacelift.io/schedule-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; with one of our engineers. &lt;/p&gt;

</description>
      <category>devops</category>
      <category>iac</category>
      <category>cicd</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Alternative to Atlantis</title>
      <dc:creator>Marcin Wyszynski</dc:creator>
      <pubDate>Sun, 24 Oct 2021 23:13:32 +0000</pubDate>
      <link>https://dev.to/spacelift/alternative-to-atlantis-ap5</link>
      <guid>https://dev.to/spacelift/alternative-to-atlantis-ap5</guid>
      <description>&lt;p&gt;Atlantis is an old and battle-tested self-hosted tool that provides a layer of automation and collaboration for Terraform. Lacking a user interface other than server &lt;a href="https://www.runatlantis.io/docs/server-configuration.html#flags"&gt;flags&lt;/a&gt; and &lt;a href="https://www.runatlantis.io/docs/server-side-repo-config.html#do-i-need-a-server-side-repo-config-file"&gt;YAML configuration files&lt;/a&gt;, Atlantis uses your VCS as one, listening for pull request notifications and posting feedback as comments.&lt;/p&gt;

&lt;p&gt;Using Atlantis has two major benefits over running Terraform in a “generic” CI system. First, it strikes the right balance between specialized and flexible: &lt;a href="https://www.runatlantis.io/docs/custom-workflows.html"&gt;custom workflows&lt;/a&gt; give you a level of control that’s not possible within a tool like &lt;a href="https://www.terraform.io/docs/cloud/index.html"&gt;Terraform Cloud&lt;/a&gt;. Second, it runs on your infrastructure, which allows it to access resources inside a VPC or use cloud-specific dynamic credentials.&lt;/p&gt;

&lt;p&gt;Spacelift embraces all those characteristics of Atlantis but offers them in as a modern and sophisticated SaaS product that provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a more intuitive, &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy"&gt;versatile&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/run#run-state-machine"&gt;robust&lt;/a&gt; workflow;&lt;/li&gt;
&lt;li&gt;extremely granular access controls on &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy"&gt;account&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy"&gt;project level&lt;/a&gt; that work well with &lt;a href="https://docs.spacelift.io/integrations/single-sign-on"&gt;an identity provider of your choice&lt;/a&gt; (SSO);&lt;/li&gt;
&lt;li&gt;an &lt;a href="https://docs.spacelift.io/concepts/policy/terraform-plan-policy"&gt;automated code review&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/task-run-policy"&gt;threat detection&lt;/a&gt; using a consistent open-source &lt;a href="https://www.openpolicyagent.org/"&gt;policy-as-code framework&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;the ability to &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy"&gt;declare complex workflows&lt;/a&gt; between projects across multiple repositories;&lt;/li&gt;
&lt;li&gt;a &lt;a href="https://docs.spacelift.io/concepts/modules"&gt;built-in private module registry&lt;/a&gt; with a full CI system for modules;&lt;/li&gt;
&lt;li&gt;effortless setup and customization with &lt;a href="https://docs.spacelift.io/concepts/configuration/environment"&gt;per-project environment management&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/integrations/docker"&gt;Docker integration&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/integrations/terraform-provider"&gt;programmatic configuration&lt;/a&gt; using Terraform;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection"&gt;drift detection&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;… and a myriad of creature comforts like &lt;a href="https://docs.spacelift.io/concepts/configuration/context"&gt;contexts&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/run/task"&gt;tasks&lt;/a&gt; or &lt;a href="https://docs.spacelift.io/concepts/stack#stack-locking"&gt;stack locking&lt;/a&gt;;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s talk through each of these features one by one.&lt;/p&gt;

&lt;h1&gt;
  
  
  1) Workflow
&lt;/h1&gt;

&lt;p&gt;One of most frequent challenges while using Atlantis in practice is a non-intuitive workflow driven by its reliance on pull requests. Not only is it a lot of work to set up multiple &lt;a href="https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#use-cases"&gt;workspaces&lt;/a&gt; pointing to the same Git repository but the result is fragile and nondeterministic. Since there’s no concept of mapping projects to branches or tags, anyone that can comment on an approved pull request can deploy arbitrary code to production, even if the approval was meant for a short-lived experimental environment.&lt;/p&gt;

&lt;p&gt;Spacelift does not depend on pull requests. Sure, it will post beautiful comments there for your convenience, but it’s mostly driven by push and tag events, so it’s easy to build a sophisticated Git flow. Spacelift will report the outcome of its jobs as commit status checks, which then allows you to block merging the code on a failing Spacelift check. There are &lt;a href="https://docs.spacelift.io/concepts/run#where-do-runs-come-from"&gt;two main types of runs&lt;/a&gt; – proposed and tracked. By default, each project points at a particular branch (and optionally also a path) – pushing to that branch will trigger a tracked run – one that can be applied. This behavior can be customized using &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy"&gt;Git push policies&lt;/a&gt;. Thanks to that, Spacelift can provide the same level of comfort and security to teams using one project per repository and those using monorepos with hundreds of interdependent projects. You can read more about our approach to VCS integration &lt;a href="https://docs.spacelift.io/integrations/source-control/github#tracked-branches"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  2) Access Control
&lt;/h1&gt;

&lt;p&gt;Another pain point when using Atlantis at scale is its access control model. By relying on comments on pull requests to drive infrastructure deployments, Atlantis effectively yields control over your infrastructure to the VCS provider. While this is usually fine when a single repository drives a single Terraform project, this becomes a huge liability for more complex scenarios.&lt;/p&gt;

&lt;p&gt;Spacelift ships with a sophisticated mechanism allowing administrators to declare &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy"&gt;who can log in&lt;/a&gt; (and under what circumstances) and &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy"&gt;what should be their level of access&lt;/a&gt; to each of the managed projects. Since it’s 2020, Spacelift ships with SSO out of the box, supporting every identity provider that speaks SAML 2.0 protocol. Even our &lt;a href="https://docs.spacelift.io/integrations/slack"&gt;Slack integration&lt;/a&gt; can be subject to policy controls, allowing an admin to grant access to a project &lt;a href="https://docs.spacelift.io/integrations/slack#managing-access-to-stacks-with-policies"&gt;based on Slack-specific data&lt;/a&gt; (think team, channel, user etc.). For extra protection, powerful features like Tasks have their own independent policy controls.&lt;/p&gt;

&lt;h1&gt;
  
  
  3) Policy Framework
&lt;/h1&gt;

&lt;p&gt;Both Spacelift and Atlantis let you use &lt;a href="https://www.openpolicyagent.org/"&gt;Open Policy Agent&lt;/a&gt; – an open-source solution endorsed by &lt;a href="https://www.cncf.io/"&gt;Cloud Native Computing Foundation&lt;/a&gt; – to ensure that your infrastructure is compliant with industry best practices and your company policies. Atlantis integrates with &lt;a href="https://www.runatlantis.io/docs/policy-checking.html#how-it-works"&gt;conftest&lt;/a&gt; to achieve that and lets you verify each Terraform plan using OPA policies.&lt;/p&gt;

&lt;p&gt;Spacelift goes a few steps further though and puts policy-as-code in the center of its value proposition and builds a consistent, &lt;a href="https://docs.spacelift.io/concepts/policy"&gt;robust policy framework&lt;/a&gt;. Apart from providing a comprehensive automated change review and ensuring compliance of your &lt;a href="https://docs.spacelift.io/concepts/policy/terraform-plan-policy"&gt;Terraform changes&lt;/a&gt;, Spacelift uses the same approach to allow you to declare rules around &lt;a href="https://docs.spacelift.io/concepts/policy/login-policy"&gt;account&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy"&gt;project access&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy"&gt;handling push notifications&lt;/a&gt;, &lt;a href="https://docs.spacelift.io/concepts/policy/run-initialization-policy"&gt;starting runs&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/concepts/policy/task-run-policy"&gt;triggering tasks&lt;/a&gt;, and creating &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy"&gt;relationships between projects&lt;/a&gt;. It also provides the Policy Workbench, which lets you view past executions of your policy – including the inputs and decisions that have been made – and lets you interactively edit your policy, while simulating its execution on these previous inputs. You can use our &lt;a href="https://github.com/spacelift-io/terraform-starter"&gt;starter repo&lt;/a&gt; to quickly provision a bunch of policies and get a feel for how you can work with them in Spacelift.&lt;/p&gt;

&lt;h1&gt;
  
  
  4) Complex Workflows
&lt;/h1&gt;

&lt;p&gt;Handling interdependencies between projects has always been Terraform’s Achilles’ heel and Atlantis is no different in that regard. The usual approach to this problem is adding another layer of abstraction in the form of a Terraform wrapper like &lt;a href="https://terragrunt.gruntwork.io/"&gt;Terragrunt&lt;/a&gt;. While this breaks the problem into smaller chunks, it’s only a partial solution achieved at a cost of locking yourself into another dependency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy"&gt;Spacelift’s trigger policies&lt;/a&gt; on the other hand provide a smart, declarative automation layer on top of vanilla Terraform. These allow you to plug into state changes of individual projects and declare dependencies that should be resolved following the changes that have just been applied. In fact, this is just a subset of all use cases covered by trigger policies. &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy"&gt;Read more&lt;/a&gt; to discover other exciting possibilities.&lt;/p&gt;

&lt;h1&gt;
  
  
  5) Private Module Registry
&lt;/h1&gt;

&lt;p&gt;Another problem that one needs to solve externally when using Atlantis is authoring and maintaining reusable Terraform modules for your organization. Terraform is flexible in allowing modules to come from &lt;a href="https://www.terraform.io/docs/language/modules/sources.html"&gt;various sources&lt;/a&gt; but ensuring confidential access as well as testing and versioning are left to you, the user.&lt;/p&gt;

&lt;p&gt;Until now, the golden standard in that regard has been the &lt;a href="https://www.terraform.io/docs/cloud/registry/index.html"&gt;private module registry from HashiCorp&lt;/a&gt;. But Spacelift offers that, and much more. Far from being just a glorified package manager, Spacelift adds a &lt;a href="https://docs.spacelift.io/vendors/terraform/module-registry"&gt;full CI solution for Terraform modules&lt;/a&gt;, out of the box and free of charge. You can thus ensure that your private modules are healthy before you distribute them to the rest of your organization.&lt;/p&gt;

&lt;h1&gt;
  
  
  6) Effortless Setup and Customization
&lt;/h1&gt;

&lt;p&gt;If you manage a single or a handful of rarely changing projects using Atlantis, it’s likely that you just set it up once and forget about it. But in a more dynamic environment, where microservices come and go, new environments proliferate and new product teams require their own Terraform workspaces, the need to configure Atlantis each and every time becomes a major nuisance putting a lot of pressure on your DevOps team.&lt;/p&gt;

&lt;p&gt;Enter Spacelift. In Spacelift, much of the configuration can be handled by the project owners themselves – you can add Terraform and/or &lt;a href="https://docs.spacelift.io/concepts/configuration/environment"&gt;environment variables&lt;/a&gt; and mount files (even inject Terraform code!) programmatically or through the GUI without the need for administrative privileges or changing the central server configuration. For administrators, adding new projects requires minimal hassle since there’s no need to set up webhooks or change any YAML. And it can all be done programmatically, using Terraform.&lt;/p&gt;

&lt;h1&gt;
  
  
  7) Programmatic Configuration
&lt;/h1&gt;

&lt;p&gt;What comes as a pleasant surprise to long-time Atlantis users, Spacelift entities like stacks, contexts, modules or policies as well as their configuration can be managed in a declarative way using your favorite infra-as-code tool. Yes, that’s right – &lt;a href="https://docs.spacelift.io/vendors/terraform/terraform-provider"&gt;Spacelift offers a Terraform provider&lt;/a&gt; that allows you to manage the lifecycle of its own resources programmatically.&lt;/p&gt;

&lt;p&gt;Administrative stacks get credential-less access to the subset of our &lt;a href="https://docs.spacelift.io/integrations/api"&gt;GraphQL API&lt;/a&gt; that does not involve managing the actual infrastructure. For more sophisticated use cases, Spacelift allows you to generate API keys that are subject to the same access controls as normal users are, allowing you to create single-purpose tokens for restricted use by your internal scripts.&lt;/p&gt;

&lt;h1&gt;
  
  
  8) Drift Detection
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.hashicorp.com/blog/detecting-and-managing-drift-with-terraform"&gt;Infrastructure drift happens&lt;/a&gt;. Either somebody will make manual changes while debugging and then forget about them, or you might have data sources whose outputs change periodically. Normally, you would notice these changes only after you execute your next plan or apply.&lt;/p&gt;

&lt;p&gt;Spacelift has got you covered here. You can configure periodic &lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection"&gt;drift detection&lt;/a&gt; to be notified whenever drift happens and take immediate action. You can go a step further too with optional automatic &lt;a href="https://docs.spacelift.io/concepts/stack/drift-detection#to-reconcile-or-not-to-reconcile"&gt;reconciliation&lt;/a&gt;, ensuring your infrastructure always resembles your Terraform configuration.&lt;/p&gt;

&lt;h1&gt;
  
  
  9) Creature Comforts
&lt;/h1&gt;

&lt;p&gt;Last but not least, Spacelift puts an emphasis on great user experience, offering a myriad of creature comforts. &lt;a href="https://docs.spacelift.io/concepts/configuration/context"&gt;Contexts&lt;/a&gt; for example allow you to attach entire collections of configuration to individual stacks and modules. &lt;a href="https://docs.spacelift.io/concepts/run/task"&gt;Tasks&lt;/a&gt; provide a powerful audited way of running one-off administrative commands on an initialized Terraform environment – subject to &lt;a href="https://docs.spacelift.io/concepts/run/task"&gt;their own policy constraints&lt;/a&gt;. &lt;a href="https://docs.spacelift.io/concepts/stack#stack-locking"&gt;Stack locking&lt;/a&gt; allows a single individual to take exclusive control over a stack to ensure that nobody is able to modify its state while crucial changes are being made. The &lt;a href="https://docs.spacelift.io/concepts/resources"&gt;resources visualization&lt;/a&gt; shows you all the resources you’re managing in your account, when and how they’ve last been updated, and lets you slice and dice them using a plethora of views, filters and groupings.&lt;/p&gt;

</description>
      <category>atlantis</category>
      <category>terraform</category>
      <category>devops</category>
      <category>cicd</category>
    </item>
  </channel>
</rss>
