<?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>Forem: Ryan Cartwright</title>
    <description>The latest articles on Forem by Ryan Cartwright (@ryan_devops).</description>
    <link>https://forem.com/ryan_devops</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%2F384330%2Fb49444f0-dbf7-4b5d-bc2a-a24d6ff25d83.jpg</url>
      <title>Forem: Ryan Cartwright</title>
      <link>https://forem.com/ryan_devops</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ryan_devops"/>
    <language>en</language>
    <item>
      <title>Resourcely adds Atlantis Support</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Sat, 03 Aug 2024 02:40:27 +0000</pubDate>
      <link>https://forem.com/resourcely/resourcely-adds-atlantis-support-8nl</link>
      <guid>https://forem.com/resourcely/resourcely-adds-atlantis-support-8nl</guid>
      <description>&lt;p&gt;You can integrate Resourcely with Atlantis to automatically evaluate your Terraform plans on pull requests. The Resourcely guardrail evaluation will result in findings that help developers address the violations.&lt;/p&gt;

&lt;p&gt;In order to set up Resourcely with Atlantis, you must perform the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verifying Prerequisites&lt;/li&gt;
&lt;li&gt;Change management&lt;/li&gt;
&lt;li&gt;Setup Resourcely with Custom workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Verifying Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before adding Resourcely to existing workflows, please verify that your Atlantis server environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has internet egress access to download the Resourcely CLI binary or container (e.g., through a NAT Gateway).&lt;/li&gt;
&lt;li&gt;Is configured to allow custom workflows.&lt;/li&gt;
&lt;li&gt;Is used with GitHub as a VCS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Change Management
&lt;/h2&gt;

&lt;p&gt;This setup assumes you have already completed the integration of Source Code Management (SCM). If you have not, please follow this guide to complete the &lt;a href="https://docs.resourcely.io/resourcely-terms/settings/change-management/github" rel="noopener noreferrer"&gt;SCM integration&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup Resourcely with Custom workflows
&lt;/h2&gt;

&lt;p&gt;This requires an Atlantis server-side &lt;code&gt;workflow&lt;/code&gt; written in Atlantis YAML. Create a new file called &lt;code&gt;repos.yaml&lt;/code&gt; or update your existing YAML and add the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repos:
  - id: /.*/
    workflow: resourcely_guardrails
    allow_custom_workflows: true
    policy_check: false
    pre_workflow_hooks:
      # Install resourcely cli, use location `/opt/resourcely-cli` to run the CLI
      - run: |
            LATEST_RELEASE_TAG=$(curl -s -I &amp;lt;https://github.com/Resourcely-Inc/resourcely-container-registry/releases/latest&amp;gt; | awk -F '/' '/^location/ {print  substr($NF, 1, length($NF)-1)}')
            curl -s -L -O &amp;lt;https://github.com/Resourcely-Inc/resourcely-container-registry/releases/download/$LATEST_RELEASE_TAG/resourcely-cli-${LATEST_RELEASE_TAG}-linux-amd64.tar.gz&amp;gt; &amp;gt; /dev/null &amp;amp;&amp;amp; tar xvzf resourcely-cli-${LATEST_RELEASE_TAG}-linux-amd64.tar.gz &amp;amp;&amp;amp; mv resourcely-cli /opt/resourcely-cli
workflows:
  resourcely_guardrails:
    plan:
      steps:
        - env:
            name: RESOURCELY_API_TOKEN
            value: '&amp;lt;RESOURCELY_API_TOKEN&amp;gt;' # get a token from https://portal.resourcely.io/settings/generate-api-token
        - init
        - plan
        - show 
        # Run Resourcely 
        - run: /opt/resourcely-cli --log debug --api_host https://api.resourcely.io evaluate --change_request_url $PULL_URL  --change_request_sha $HEAD_COMMIT --format plain --plan $SHOWFILE
        description: Running Resourcely Guardrails
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;resourcely-cli&lt;/code&gt; command in your &lt;code&gt;repos.yaml&lt;/code&gt; evaluates your Terraform plans by downloading policies from Resourcely, assessing them, and submitting the results to Resourcely. These findings will be displayed on the pull request associated with the Atlantis run.&lt;/p&gt;

&lt;p&gt;Note that the server needs to run with &lt;code&gt;--repo-config=repos.yaml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;atlantis server \\
...
--repo-config=repos.yaml \\
...
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Atlantis should now run the Resourcely CLI on every pull request whenever new code is created or updated.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>atlantis</category>
      <category>security</category>
      <category>devops</category>
    </item>
    <item>
      <title>Why we built Resourcely</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Thu, 18 Jul 2024 01:30:11 +0000</pubDate>
      <link>https://forem.com/resourcely/why-we-built-resourcely-4blc</link>
      <guid>https://forem.com/resourcely/why-we-built-resourcely-4blc</guid>
      <description>&lt;p&gt;Written by: Travis McPeak&lt;br&gt;
Published Date: July 16, 2024&lt;/p&gt;

&lt;p&gt;Three primary trends have influenced the software industry over the last 15 years: the rise of the cloud, a shift from waterfall to continuous development, and DevOps practices.&lt;/p&gt;

&lt;p&gt;These trends have all shifted more responsibility to the developer: deployment, security, and configuration are now the responsibility of software engineers. Software teams who were once only responsible for designing and creating applications are now expected to be infrastructure and deployment experts as well. You can read more about the history of security and configuration &lt;a href="https://www.resourcely.io/post/death-of-devsecops-part-1-the-rise-of-cloud-and-devops" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Developers owning infrastructure inevitably results in rampant misconfiguration: improper parameters for cloud infrastructure that are costing companies millions. When a database, virtual machine, or SaaS application is configured incorrectly, there are two results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;incidents, breaches, and outages&lt;/li&gt;
&lt;li&gt;wasted developer time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We built Resourcely to eliminate misconfiguration, stemming the tide of needless incidents and tackling the hours of waste we observed throughout the industry.&lt;/p&gt;

&lt;p&gt;Frankly, we were frustrated by the status quo of cloud infrastructure configuration, and we decided to do something about it. Our experiences at top-performing cloud-based companies like Netflix, Robinhood, and Databricks taught us how to solve this problem, and Resourcely is a product of those learnings.&lt;/p&gt;

&lt;p&gt;It allows security, ops, and platform teams to give developers a paved road to production, generating secure and compliant Terraform that is deployed as part of your existing change management tooling. We didn’t stop at bespoke, customizable templates that give developers an easy button to deploy infrastructure. Resourcely also features a novel cloud resource policy language that acts as a safety net: making sure that any Terraform deployed meets the standards that you define.&lt;/p&gt;

&lt;p&gt;With these tools, developers no longer loathe deploying infrastructure, and security teams look like superheroes by empowering secure defaults built into developers.&lt;/p&gt;
&lt;h2&gt;
  
  
  Status quo of configuration
&lt;/h2&gt;

&lt;p&gt;Cloud resources are misconfigured across all software organizations every day. Developers who aren’t Terraform experts are asked to deploy heterogeneous services that they are unfamiliar with. These developers are faced with a trade-off: ship misconfigured infrastructure, or ship slowly. In many cases, businesses are pushing developers to ship faster at the expense of misconfiguration.&lt;/p&gt;

&lt;p&gt;What does that developer experience look like? Developers are forced to research the individual cloud services they want to deploy, learn about configuration best practices for them, write Terraform that matches their mental model, and then push that Terraform in a PR. Often they are asked to use a specialized, internally-developed tool to accomplish this. While many individuals start offthinking that only a single resource will be required, they slowly realize that multiple cloud resources are always required (IAM, networking, storage, etc.). At every step along this path there is friction and opportunity for misconfiguration.&lt;/p&gt;

&lt;p&gt;Security teams are only compounding the problem with long lists of vulnerabilities flagged by CSPMs and a reactive modus operandi. These vulns end up on a long list, handed to developers, who never get around to fixing them anyway.&lt;/p&gt;
&lt;h2&gt;
  
  
  So why does it matter?
&lt;/h2&gt;

&lt;p&gt;These dynamics result in two primary issues costing companies millions of dollars each year:&lt;/p&gt;
&lt;h2&gt;
  
  
  Incidents
&lt;/h2&gt;

&lt;p&gt;Improper configuration inevitably results in incidents, vulnerabilities, and breaches. Let’s consider two scenarios: a security vulnerability, and an internal application that goes down.&lt;/p&gt;

&lt;p&gt;Security vulnerabilities can threaten the very lifeblood of a business. Consider the most simple of examples, where an S3 bucket is left accessible to public access. This is actually somewhat tricky to get right, as &lt;a href="https://www.resourcely.io/post/incident-review-s3-buckets-exposed" rel="noopener noreferrer"&gt;we’ve written about before&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Inadvertent exposure of data, or server access, or firewalls, or anything sensitive can result in public-facing breaches that cost upwards of millions of dollars. As of 2023, &lt;a href="https://www.statista.com/statistics/273575/us-average-cost-incurred-by-a-data-breach/" rel="noopener noreferrer"&gt;the average cost of a data breach in the US was around $9.5M&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Misconfiguration doesn’t only have to be about security and data breaches. Consider an internal application that is used to support customer service agents for an airline. Let’s say you have a database misconfiguration that results in queries to that database failing for several hours during peak travel season. This has directly impacted your customer satisfaction, retention, and future revenue prospects.&lt;/p&gt;
&lt;h2&gt;
  
  
  Developer productivity
&lt;/h2&gt;

&lt;p&gt;In the same way that incidents have a quantifiable impact on your business, so does developer productivity - especially for businesses with software as a core product. Deploying and configuring infrastructure is a significant impediment to the speed at which developers move. To successfully do this they must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Research cloud resources to use&lt;/li&gt;
&lt;li&gt;Figure out the correct configuration, which is challenging to get completely right without being an expert&lt;/li&gt;
&lt;li&gt;Write Terraform or use a Terraform module&lt;/li&gt;
&lt;li&gt;If they use a module, they’re often fitting a square peg into a round hole&lt;/li&gt;
&lt;li&gt;Push that Terraform to production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frequently, the Terraform they’ve written is bounced back to them by a reviewer, which further compounds the developer productivity problem. Maintaining, updating, triaging, and changing their infrastructure can result in even more hours than they spent on the initial project.&lt;/p&gt;

&lt;p&gt;Let’s say you have just 100 developers pushing infrastructure to production, with an average infrastructure deployment that make infrastructure changes 2/week. If your developers spend 4 additional hours each time they deploy researching Terraform and (trying) to get the configuration right, and they cost $275,000 fully loaded, you’re looking at $5.5M in annual cost and an incalculable amount of opportunity cost (from projects they could be working on instead).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👉 (100 developers) * (2 infra deployments/week) * (52 weeks) * (4 hours/deployments) * (275,000/year / 2,080 hours in a year) = $5.5M annually.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Secure defaults and the Resourcely answer
&lt;/h2&gt;

&lt;p&gt;So you’ve got a problem costing you millions of dollars a year, and your cost almost triples each time you have an incident. We had these same issues at Netflix, Robinhood, Databricks, and other companies that our founding team worked at.&lt;/p&gt;

&lt;p&gt;We solve this problem is by removing humans from the loop as much as possible. We implemented secure-by-default frameworks across the business, and gave developers a paved road to production that would allow them to get what they need without friction.&lt;/p&gt;

&lt;p&gt;Asking humans to configure infrastructure, when we already know what best practices and company-specific requirements should be, is an outmoded practice rooted in years of on-premise and legacy security practices. Instead, we should be asking machines to make configuration decisions for humans. (Check out &lt;a href="https://a16z.simplecast.com/episodes/cybersecuritys-past-present-and-ai-driven-future" rel="noopener noreferrer"&gt;this episode&lt;/a&gt; of the a16z podcast where our CEO Travis discussed this concept)&lt;/p&gt;

&lt;p&gt;Resourcely tackles misconfiguration at the source: turning security teams into proactive superheroes, and unleashing developers from DevSecOps hell of the past. How do we do it?&lt;/p&gt;
&lt;h2&gt;
  
  
  Guardrails
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.resourcely.io/product/guardrails" rel="noopener noreferrer"&gt;Guardrails&lt;/a&gt; govern how infrastructure can be created or changed, preventing inadvertent misconfiguration. These are policies, managed and written by security, ops, or platform teams, and enforced as part of your existing change management/GitOps workflows.&lt;/p&gt;

&lt;p&gt;Imagine you write the following policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GUARDRAIL "Require prefix on all S3 buckets"
   WHEN aws_s3_bucket
       REQUIRE bucket STARTS WITH "resourcely-"
 OVERRIDE WITH APPROVAL @securityops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Resourcely will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let the developer know they are violating a guardrail if they don’t start an S3 bucket with resourcely-&lt;/li&gt;
&lt;li&gt;Guide the user about how they should be configuring the resource&lt;/li&gt;
&lt;li&gt;If the developer still chooses to continue, Resourcely will route the PR to the appropriate approver specified in the guardrail&lt;/li&gt;
&lt;li&gt;The PR will always fail without approval, if the S3 bucket is not appropriately named
Guardrails limit accidental public exposure, oversized infrastructure, inadvertent deletion, and more - all in an easy-to-read policy language remarkably similar to SQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Blueprints
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.resourcely.io/product/blueprints" rel="noopener noreferrer"&gt;Resourcely Blueprints&lt;/a&gt; are configurable templates, customized by security, ops, or platform teams, that give your developers a paved road to cloud infrastructure resources. They provide a UI with context, selection criteria, lists, and more.&lt;/p&gt;

&lt;p&gt;Once published, blueprints are available in a service catalog that developers can use to bundle the infrastructure they want to deploy. Guardrails can be attached to blueprints, ensuring that your policies are enforced.&lt;/p&gt;

&lt;p&gt;After submission, Terraform is generated and deployed through your existing change management and review processes.&lt;/p&gt;

&lt;p&gt;Configuration platform&lt;br&gt;
Over the next few weeks, we’ll be announcing the General Availability of Resourcely, covering how our customers are using it to build a secure-by-default platform for deploying infrastructure, and showing you how anyone can do the same.&lt;/p&gt;

&lt;p&gt;The misconfiguration problem is widespread and hugely impactful. Adopt the premier configuration platform to eliminate misconfiguration, reducing millions in developer waste and bidding goodbye to incidents &amp;amp; breaches that average $9.5M of impact. &lt;a href="https://www.resourcely.io/sign-up" rel="noopener noreferrer"&gt;Get started with Resourcely today&lt;/a&gt;, and follow along on our GA launch journey over the next few weeks!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>news</category>
      <category>security</category>
      <category>startup</category>
    </item>
    <item>
      <title>Death of DevSecOps, Part 3</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Fri, 05 Jul 2024 16:12:42 +0000</pubDate>
      <link>https://forem.com/resourcely/death-of-devsecops-part-3-5bae</link>
      <guid>https://forem.com/resourcely/death-of-devsecops-part-3-5bae</guid>
      <description>&lt;p&gt;Written by Travis McPeak, Resourcely CEO.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://www.resourcely.io/post/death-of-devsecops-part-2"&gt;part 2 of this series&lt;/a&gt;, I explored the promises of DevSecOps and where they went wrong. To wrap up this series, we’ll propose how to solve the current problems in security and software development and highlight some early success cases using this approach.&lt;/p&gt;

&lt;p&gt;DevSecOps has two primary problems: we asked developers to be the primary owners of security configuration at the expense of their primary responsibilities, and we haven’t provided automation tools that can take SecOps off their plate.&lt;/p&gt;

&lt;p&gt;The result? Developers are burning down never-ending tickets, going through tedious threat modeling exercises across all of their applications, and undergoing hours of training for all vulnerability classes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Secure-by-default
&lt;/h2&gt;

&lt;p&gt;The solution is secure-by-default: an approach that shifts responsibility onto systems, not people. Secure defaults integrate security and configuration guidelines into tools that developers are using, leveraging new libraries that make security the default, all supported by a new security team. In short, systems ****should be responsible for security, not people.&lt;/p&gt;

&lt;p&gt;Secure-by-default can help developers move faster and reduce incidents by automatically taking care of secure configuration without requiring developers to make complex, nuanced decisions - and stepping in to help them, when they make incorrect ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  New technologies
&lt;/h2&gt;

&lt;p&gt;The past ~10 years of DevSecOps have taught us some valuable lessons about developer behavior: they are not security experts, and they don’t like to leave their standard development and CI workflow.&lt;/p&gt;

&lt;p&gt;To accomplish secure-by-default, any automated tooling needs to be embedded into existing developer workflows. This ranges from auto-suggesting security best practices within IDEs, to embedded context wherever configuration occurs, to using systems that make good security choices for you.&lt;/p&gt;

&lt;p&gt;Some great examples of secure default libraries and systems are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/Netflix/lemur"&gt;Netflix’s Lemur&lt;/a&gt;: makes it easy for a developer to get a TLS certificate for a microservice, without having to deal with cryptography, manage private keys securely, and remember to rotate certs before they expire&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://bughunters.google.com/blog/4925068200771584/the-family-of-safe-golang-libraries-is-growing"&gt;Google’s Safe Golang Libraries&lt;/a&gt;: protect against common issues such as YAML injection (see also &lt;a href="https://blog.google/technology/safety-security/tackling-cybersecurity-vulnerabilities-through-secure-by-design"&gt;Google’s Secure by Design&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;See Clint Gibbler’s full list of secure by default libraries &lt;a href="https://github.com/tldrsec/awesome-secure-defaults"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second critical part of a secure-by-default platform is guardrails: policies and rules that proactively prevent misconfiguration, again embedded into the developer’s workflow. These are backstops that prevent developers from deploying vulnerable software, while allowing them to follow their existing workflow: developing locally, pushing to the cloud, using version control, and leveraging automated deployment tooling.&lt;/p&gt;

&lt;p&gt;These embedded secure-by-default practices combine with guardrails that keep developers in track - resulting in a paved road to production. There should be paved roads across a variety of fields: infrastructure, application development, CI, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  The new security team
&lt;/h2&gt;

&lt;p&gt;Automated tools that can take cognitive load off of developers are only possible with a savvy security team that is willing to truly embed security where developers are. This team should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shift from a reactive, issue-centric view of the world to a proactive, preventative strategy&lt;/li&gt;
&lt;li&gt;Aggressively embed linters, context, and other in-IDE tech to help developers deploy securely at development time&lt;/li&gt;
&lt;li&gt;Utilize secure by default libraries and frameworks that make classes of vulnerabilities impossible&lt;/li&gt;
&lt;li&gt;Implement backstops and guardrails that preserve optionality by developers, while preventing incorrect configuration
The foundational work of security should be done BY a security team, FOR a developer team - shifting the burden of security decision-making from developers onto systems, and making the last mile work for developers painless.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These new automation technologies will allow a security team to become extensible, scaling with a development team by embedding into their workflows without having to add additional security resources and burning out developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  DevSecOps: Can it be saved?
&lt;/h2&gt;

&lt;p&gt;Security teams have lagged their developer counterparts over the past 20 years, as cloud computing and dev practices have revolutionized the tech industry. While DevSecOps held great promise, it has resulted in the worst of both worlds: slow development, and frustrated security teams dealing with constant misconfiguration.&lt;/p&gt;

&lt;p&gt;The next generation of security is secure-by-default. We have the tech, and we know what it takes to accomplish it - the only thing left is committed security teams helping embed secure-by-default into developer workflows.&lt;/p&gt;

&lt;p&gt;Resourcely is working hard on this problem! To make your organization secure-by-default, &lt;a href="https://www.resourcely.io/sign-up"&gt;get started with Resourcely&lt;/a&gt; and give your developer teams the security capabilities they need without leaving the tools they love.&lt;/p&gt;

&lt;p&gt;Originally Published &lt;a href="https://www.resourcely.io/post/death-of-devsecops-part-3"&gt;Resourcely Blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>devsecops</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Resourcely founder-led in person or virtual hands-on workshop</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Tue, 25 Jun 2024 22:10:06 +0000</pubDate>
      <link>https://forem.com/resourcely/resourcely-founder-led-in-person-or-virtual-hands-on-workshop-1o46</link>
      <guid>https://forem.com/resourcely/resourcely-founder-led-in-person-or-virtual-hands-on-workshop-1o46</guid>
      <description>&lt;p&gt;Join Resourcely for a free founder-led in person or virtual hands-on workshop.&lt;/p&gt;

&lt;p&gt;Learn how easy it is to enable cloud infrastructure paved roads to prevent misconfigurations for your organization.&lt;/p&gt;

&lt;p&gt;In this session, you’ll learn how to:&lt;/p&gt;

&lt;p&gt;✅ Navigate Resourcely user interface, and connection options.&lt;/p&gt;

&lt;p&gt;✅ Integrate your SSO provider&lt;/p&gt;

&lt;p&gt;✅ Integrate your VCS provider&lt;/p&gt;

&lt;p&gt;✅ Understand what Resourcely Blueprints and Guardrails are in our catalog out of the box&lt;/p&gt;

&lt;p&gt;✅ Understand the importance of Global Contexts&lt;/p&gt;

&lt;p&gt;✅ Understand configuration options for Blueprints&lt;/p&gt;

&lt;p&gt;✅ Understand configuration options for Really, our policy as code language&lt;/p&gt;

&lt;p&gt;✅ Understand how Resourcely can integrate into your existing cicd process&lt;/p&gt;

&lt;p&gt;✅ Import your existing terraform modules to transform them into module backed blueprints&lt;/p&gt;

&lt;p&gt;✅ Understand Resourcely usage metrics available&lt;/p&gt;

&lt;p&gt;✅ Learn how to configure the resourcely.yaml to manage different environments&lt;/p&gt;

&lt;p&gt;✅ Create new Blueprints and Guardrails using Foundry for your specific use cases&lt;/p&gt;

&lt;p&gt;Elevate your infrastructure as code maturity today!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.resourcely.io/event/resourcely-workshop?utm-source=dev.to&amp;amp;utm-medium=post?utm-campaign=dev.to-blog"&gt;Request workshop&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>beginners</category>
      <category>learning</category>
      <category>security</category>
    </item>
    <item>
      <title>Introducing Really: A New Policy as Code DSL… that doesn't suck</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Wed, 29 May 2024 03:48:00 +0000</pubDate>
      <link>https://forem.com/resourcely/introducing-really-a-new-policy-as-code-dsl-that-doesnt-suck-9l1</link>
      <guid>https://forem.com/resourcely/introducing-really-a-new-policy-as-code-dsl-that-doesnt-suck-9l1</guid>
      <description>&lt;p&gt;Using Rego for cloud configuration is awful. Use Really: policy-as-code built for humans.&lt;/p&gt;

&lt;h2&gt;
  
  
  Announcing Really
&lt;/h2&gt;

&lt;p&gt;When we started building Resourcely, the global configuration engine for cloud infrastructure, we slowly realized that the status quo of policy-as-code was broken. Writing our first Resourcely guardrails in Rego took hours to create and even more time to maintain. Writing new policies was extremely tedious and time-intensive, especially given the fact that we wanted to make them flexible. To help achieve our mission of making infrastructure more secure, it became evident that a new policy language would be needed that allowed policy to be written and maintained without headaches.&lt;/p&gt;

&lt;p&gt;The Resourcely team has spent the last 6 months working on developing that new policy language, and today we are introducing &lt;a href="https://docs.resourcely.io/using-resourcely/setting-up-guardrails/authoring-your-own-guardrails?utm-source=dev.to"&gt;Really&lt;/a&gt;: a policy language and enforcement engine that is built to be written and read by humans - not machines. With the introduction of Really, policy can be created in minutes compared to hours, with a human-readable syntax that looks remarkably like SQL. The readability of our structured policy language means that writing, deciphering, and adjusting policy isn’t a nightmare, and your policy team can take vacation without worrying about their pager going off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Yet Another Config Language (YACL)
&lt;/h2&gt;

&lt;p&gt;Why did we invest millions of dollars in time to build Yet Another Config Language (YACL)?&lt;/p&gt;

&lt;p&gt;Read full blog &lt;a href="https://www.resourcely.io/post/announcing-really?utm-source=dev.to"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
    <item>
      <title>Taming misconfiguration chaos with Resourcely</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Mon, 15 Apr 2024 01:40:57 +0000</pubDate>
      <link>https://forem.com/resourcely/taming-misconfiguration-chaos-with-resourcely-501k</link>
      <guid>https://forem.com/resourcely/taming-misconfiguration-chaos-with-resourcely-501k</guid>
      <description>&lt;p&gt;Misconfiguration of cloud infrastructure is the root cause of slow developer velocity and prolific incidents causing millions of dollars in damage.&lt;/p&gt;

&lt;p&gt;Resourcely is a cloud resource configuration platform, built to give developers a paved road for deploying quickly and securely. tl;dr Resourcely generates secure-by-default Terraform code for anything that can be managed with a terraform provider.&lt;/p&gt;

&lt;p&gt;Join Resourcely's CEO, Travis McPeak, on April 16th as he walks through why misconfiguration exists, the impact it has on businesses around the world, and how Resourcely can help increase developer velocity and mitigate incident risk.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.livestorm.co/resourcely/resourcely-webinar-taming-misconfiguration-chaos"&gt;https://app.livestorm.co/resourcely/resourcely-webinar-taming-misconfiguration-chaos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Resourcely exists to make cloud resources more secure and make developers' lives easier. In a DevOps world, developers have too many responsibilities, including writing code, testing code, deploying their services, responding to outages, provisioning cloud services, and keeping their services secure. With so much on their plate, developers need tools that give them best practices in these areas without thinking about them.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>misconfiguration</category>
      <category>cloud</category>
    </item>
    <item>
      <title>The Ultimate List of Resources to Migrate off of Terraform Cloud</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Wed, 24 May 2023 22:55:02 +0000</pubDate>
      <link>https://forem.com/ryan_devops/the-ultimate-list-of-resources-to-migrate-off-of-terraform-cloud-2ml1</link>
      <guid>https://forem.com/ryan_devops/the-ultimate-list-of-resources-to-migrate-off-of-terraform-cloud-2ml1</guid>
      <description>&lt;p&gt;If you are looking to migrate away from HashiCorp Terraform Cloud or Terraform Enterprise, here is a growing list (in no particular order) of possible options and specific migration resources to assist in your journey.&lt;/p&gt;

&lt;p&gt;There isn’t much need to go into the back story on the inspiration for this post, but I hope at least one person or company finds it helpful.&lt;/p&gt;

&lt;p&gt;Disclaimer: If you want to be added to the list and I missed an option, send me a note.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Self-managed Infrastructure as Code (IaC) Deployment: Set up your own infrastructure and deployment pipeline using self-managed tools like Terraform CLI, GitLab, Jenkins, or AWS CloudFormation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitOps: Adopt a GitOps approach where infrastructure changes are versioned and applied automatically based on changes to a Git repository using tools like Flux, Argo CD, or Jenkins X.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud Provider-Specific Tools: Utilize cloud provider-specific infrastructure management tools like AWS CloudFormation, Azure Resource Manager, or Google Cloud Deployment Manager to transition away from Terraform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ansible: Use Ansible, an automation tool, for infrastructure provisioning and configuration management. Ansible allows you to define and apply infrastructure changes using declarative YAML-based playbooks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pulumi: Consider migrating to Pulumi, an open-source infrastructure as code tool that allows you to define and manage infrastructure using familiar programming languages like JavaScript, Python, or Go.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud Native Tools: Embrace cloud-native tools and services offered by your cloud provider, such as AWS Cloud Development Kit (CDK), Azure Resource Manager templates, or Google Cloud Deployment Manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vendor-Specific Migration Tools: Explore vendor-specific migration tools that help transition infrastructure from one IaC tool to another, such as the Terraform Import tool provided by HashiCorp or similar tools offered by other vendors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manual Configuration: Transition to manually configuring your infrastructure using web-based consoles or command-line tools provided by your cloud provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Infrastructure Automation Frameworks: Investigate other infrastructure automation frameworks like Chef, Puppet, or SaltStack, which offer configuration management and infrastructure provisioning capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom Scripting: Develop custom scripts using your preferred programming language to automate infrastructure provisioning and configuration changes based on your specific requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Continuous Delivery Platforms: Companies battling the CICD space such as Harness, Armory, and OpsMx also offer ways to deploy Terraform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terra* Options: There is a growing list Terra______ (fill in the blank) that don’t find themselves to fit in any of the above categories such as Terragrunt, Terrateam, Terramate, Terrakube, Terraspace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Source Options: One option has been around for a while called Atlantis, a terraform pull request automation platform and another is newcomer Digger, an open source GitOps tool for Terraform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform Automation &amp;amp; Collaboration Software (TACOS): TACOS like Spacelift, Scalr, and Env0 provide a framework for solving the problems with operating IaC at scale.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here are a few recent blogs to assist with your migration journey:&lt;/p&gt;

&lt;p&gt;How to Migrate From Terraform Cloud to Spacelift &lt;a href="https://spacelift.io/blog/how-to-migrate-from-terraform-cloud"&gt;https://spacelift.io/blog/how-to-migrate-from-terraform-cloud&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recommendations for Migrating from Terraform Cloud&lt;br&gt;
&lt;a href="https://www.env0.com/blog/migrate-from-terraform-cloud-to-env0"&gt;https://www.env0.com/blog/migrate-from-terraform-cloud-to-env0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More Recommendations for Migrating from Terraform Cloud&lt;br&gt;
&lt;a href="https://www.env0.com/blog/recommendations-for-migrating-from-terraform-cloud"&gt;https://www.env0.com/blog/recommendations-for-migrating-from-terraform-cloud&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Migrating Terraform state from Terraform Cloud to S3&lt;br&gt;
&lt;a href="https://blog.marcolancini.it/2023/blog-migrate-terraform-state-from-terraform-cloud-to-s3/"&gt;https://blog.marcolancini.it/2023/blog-migrate-terraform-state-from-terraform-cloud-to-s3/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remote State Migration with Terrakube &lt;br&gt;
&lt;a href="https://docs.terrakube.org/user-guide/remote-state-migration"&gt;https://docs.terrakube.org/user-guide/remote-state-migration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Terraspace Cloud vs Terraform Cloud&lt;br&gt;
&lt;a href="https://terraspace.cloud/docs/vs/tsc-vs-tfc/"&gt;https://terraspace.cloud/docs/vs/tsc-vs-tfc/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Migrating State Data Off Terraform Cloud&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nedinthecloud.com/2022/03/03/migrating-state-data-off-terraform-cloud/"&gt;https://nedinthecloud.com/2022/03/03/migrating-state-data-off-terraform-cloud/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Migrating to Terrateam&lt;/p&gt;

&lt;p&gt;&lt;a href="https://terrateam.io/docs/migrating/terraform-cloud"&gt;https://terrateam.io/docs/migrating/terraform-cloud&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;System Integrator &amp;amp; Services:&lt;/p&gt;

&lt;p&gt;CloudPosse&lt;br&gt;
&lt;a href="https://cloudposse.com/jumpstart-devops-accelerator/"&gt;https://cloudposse.com/jumpstart-devops-accelerator/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cloudposse.com/faqs/why-do-you-recommend-spacelift/"&gt;https://cloudposse.com/faqs/why-do-you-recommend-spacelift/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub Repos:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/spacelift-io/spacelift-migration-kit"&gt;https://github.com/spacelift-io/spacelift-migration-kit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Scalr/terraform-scalr-migrate-tfc"&gt;https://github.com/Scalr/terraform-scalr-migrate-tfc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/env0/customer-tools/tree/main/migrations/tfc-to-env0-migration/s3-backed-state"&gt;https://github.com/env0/customer-tools/tree/main/migrations/tfc-to-env0-migration/s3-backed-state&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cloudposse"&gt;https://github.com/cloudposse&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's essential to carefully plan and evaluate the migration strategy based on your existing infrastructure, requirements, and preferences. Consider the learning curve, migration effort, and compatibility of the chosen alternative with your existing environment.&lt;/p&gt;

&lt;p&gt;PS. I’ll add more examples and resources as I discover them or as people send them my way.&lt;/p&gt;

</description>
      <category>migration</category>
      <category>terraform</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Good news for Terraform Cloud &amp; Terraform Enterprise Users</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Sun, 21 May 2023 03:24:20 +0000</pubDate>
      <link>https://forem.com/ryan_devops/good-news-for-terraform-cloud-terraform-enterprise-users-46b0</link>
      <guid>https://forem.com/ryan_devops/good-news-for-terraform-cloud-terraform-enterprise-users-46b0</guid>
      <description>&lt;p&gt;Announcing Spacelift’s price match guarantee for anyone migrating from Terraform Cloud or Terraform Enterprise!&lt;/p&gt;

&lt;p&gt;I understand pricing and packaging pages cannot satisfy everyone’s requirements on the surface.&lt;/p&gt;

&lt;p&gt;Some individual or companies want to..&lt;/p&gt;

&lt;p&gt;🙋‍♂️ pay per user&lt;/p&gt;

&lt;p&gt;🏃 pay per run (or apply)&lt;/p&gt;

&lt;p&gt;🟰 pay per parallel execution &lt;/p&gt;

&lt;p&gt;🥞 pay per workspace (or stack)&lt;/p&gt;

&lt;p&gt;☁️ pay per cloud resource&lt;/p&gt;

&lt;p&gt;⏱️ pay per minute&lt;/p&gt;

&lt;p&gt;🎗️ pay per support type&lt;/p&gt;

&lt;p&gt;♾️ pay for unlimited usage&lt;/p&gt;

&lt;p&gt;Rigid pricing models create a lot of controversy and discussion. I’ve seen them incentivize bad engineering practices while others incentivize bad business processes, and others than slow down innovation and add more TOIL.&lt;/p&gt;

&lt;p&gt;What if you could mix and match the models? &lt;/p&gt;

&lt;p&gt;What if you could allow the customer to opt in to the model based on what works for them, what they understand, and what they can properly communicate internallly to other stakeholders in leadership, finance, procurement.&lt;/p&gt;

&lt;p&gt;Most companies can’t satisfy everyone. At the end of the day, we are all human. We are the same and different all at the same time.&lt;/p&gt;

&lt;p&gt;If you are genuinely interested in using Spacelift, I’m here to facilitate that conversation. On top of the flexibility that we offer, I will go one step further. &lt;/p&gt;

&lt;p&gt;I will provide a price match guarantee for any user that wants to migrate away from Terraform Cloud or Terraform Enterprise.&lt;/p&gt;

&lt;p&gt;I promise and commit to beat any price by 10% and will increase how much I beat them based on the size of your current contract.&lt;/p&gt;

&lt;p&gt;For clients paying &amp;lt;$100K, I’ll beat their price by 10%.&lt;/p&gt;

&lt;p&gt;For any clients paying over $100K, I’ll be their price by 25%.&lt;/p&gt;

&lt;p&gt;For any clients paying over $1M, I’ll beat their price by 50%.&lt;/p&gt;

&lt;p&gt;If you want to take advantage of this, I’ll throw in free migration services at no added cost to hand hold you through the process. If you don’t want our assistance, here is a link to our migration utility and blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/spacelift-io/spacelift-migration-kit"&gt;https://github.com/spacelift-io/spacelift-migration-kit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://spacelift.io/blog/how-to-migrate-from-terraform-cloud"&gt;https://spacelift.io/blog/how-to-migrate-from-terraform-cloud&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy migrating!&lt;/p&gt;

</description>
      <category>hashicorp</category>
      <category>terraform</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Do I need another CI/CD for my infrastructure?</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Mon, 07 Feb 2022 04:19:06 +0000</pubDate>
      <link>https://forem.com/spacelift/do-i-need-another-cicd-for-my-infrastructure-5hef</link>
      <guid>https://forem.com/spacelift/do-i-need-another-cicd-for-my-infrastructure-5hef</guid>
      <description>&lt;p&gt;Yes, we believe it's a good idea. While in an ideal world one CI system would be enough to cover all use cases, we don't live in an ideal world. Regular CI tools can get you started easily, but Terraform has a rather unusual execution model and a highly stateful nature. Also mind the massive blast radius when things go wrong. We believe Spacelift offers a perfect blend of regular CI's versatility and methodological rigor of a specialized, security-conscious infrastructure tool - enough to give it a shot even if you're currently happy with your infra-as-code CI/CD setup.&lt;/p&gt;

&lt;p&gt;There are many challenges of running Terraform in a general purpose CI system. At the end of the day, it's mostly about two things - &lt;a href="https://docs.spacelift.io/#collaboration" rel="noopener noreferrer"&gt;collaboration&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/#security" rel="noopener noreferrer"&gt;security&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I into my existing CICD process or system?
&lt;/h2&gt;

&lt;p&gt;The short answer is Yes.&lt;/p&gt;

&lt;p&gt;We can integrate with most of those tools. Although, your mileage may vary.&lt;/p&gt;

&lt;p&gt;We realize that you may live and work in a world where you have to use existing tools and can't start from scratch. Or you may be forced to integrate with an existing CICD process or system. &lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1
&lt;/h3&gt;

&lt;p&gt;You can use the &lt;a href="https://github.com/spacelift-io/spacectl" rel="noopener noreferrer"&gt;spacectl command line tool&lt;/a&gt; to easily call out to Spacelift from other CI/CD systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 2
&lt;/h3&gt;

&lt;p&gt;In a similar way, you can call out to other CI/CD systems from Spacelift in a Stack's &lt;a href="https://docs.spacelift.io/concepts/configuration/runtime-configuration#before_-and-after_-hooks" rel="noopener noreferrer"&gt;after_apply hooks&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 3
&lt;/h3&gt;

&lt;p&gt;Spacelift can optionally be set to send &lt;a href="https://docs.spacelift.io/integrations/webhooks" rel="noopener noreferrer"&gt;webhooks&lt;/a&gt; - POST requests about run state changes - to an HTTP endpoint of your choice. &lt;/p&gt;

&lt;p&gt;You can find documentation on how to access the #graphql API &lt;a href="https://docs.spacelift.io/integrations/api" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can see the details of available queries and mutations with their detailed documentation by using a client with native graphql support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hello, Spacelift!
&lt;/h2&gt;

&lt;p&gt;Take your infra-as-code to the next level!&lt;/p&gt;

&lt;p&gt;Spacelift is a specialized, Terraform-compatible continuous integration and deployment (CI/CD) platform for infra-as-code. It's designed and implemented by long-time DevOps practitioners based on previous experience with large-scale installations - dozens of teams, hundreds of engineers and tens of thousands of cloud resources.&lt;/p&gt;

&lt;p&gt;At the same time, Spacelift is super easy to get started with - you can go from zero to fully managing your cloud resources within less than a minute, with no pre-requisites. It integrates nicely with the large players in the field - notably &lt;a href="https://docs.spacelift.io/integrations/source-control/github" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and &lt;a href="https://docs.spacelift.io/integrations/cloud-providers/aws" rel="noopener noreferrer"&gt;AWS&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Main Concepts
&lt;/h2&gt;

&lt;p&gt;We will briefly introduce some key concepts that you need to know to work with Spacelift. These concepts will be followed by &lt;a href="https://docs.spacelift.io/getting-started#step-by-step" rel="noopener noreferrer"&gt;detailed instructions&lt;/a&gt; to help you create and configure your first run with Spacelift.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stacks
&lt;/h3&gt;

&lt;p&gt;A stack is a central entity in Spacelift. It connects with your source control repository and manages the state of infrastructure. It facilitates integration with cloud providers (AWS, Azure, Google Cloud) and other important Spacelift components. You can learn more about Stacks in Spacelift &lt;a href="https://docs.spacelift.io/concepts/stack" rel="noopener noreferrer"&gt;detailed documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  State Management
&lt;/h3&gt;

&lt;p&gt;State can be managed by your backend or can be imported into Spacelift for Terraform projects. It is not required to let Spacelift manage your infrastructure state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worker Pools
&lt;/h3&gt;

&lt;p&gt;Spacelift provides public and private worker pools that execute Spacelift workflows. Public worker pools are managed by Spacelift whereas private pools are hosted by you. Due to security and compliance requirements, several of our customers choose private pools to manage their infrastructure. You can learn more about worker pools &lt;a href="https://docs.spacelift.io/concepts/worker-pools" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Policies
&lt;/h3&gt;

&lt;p&gt;Spacelift policies provide a way to express rules as code, rules that manage your Infrastructure as Code (IaC) environment, and help make common decisions such as login, access, and execution. Policies are based on the Open Policy Agent project and can be defined using its rule language Rego. You can learn more about policies &lt;a href="https://docs.spacelift.io/concepts/policy" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Integration
&lt;/h3&gt;

&lt;p&gt;Spacelift provides native integration with AWS, Azure and Google Cloud (GCP). Integration with other cloud providers is also possible via programmatic connection with their identity services. You can learn more about &lt;a href="https://docs.spacelift.io/integrations/cloud-providers" rel="noopener noreferrer"&gt;cloud provider integration&lt;/a&gt; in Spacelift detailed documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Change Workflow
&lt;/h3&gt;

&lt;p&gt;Spacelift deeply integrates with your Version Control System (VCS). Pull requests are evaluated by Spacelift to provide a preview of the changes being made to infrastructure; these changes are deployed automatically when PRs are merged. You can learn more about &lt;a href="https://docs.spacelift.io/integrations/source-control" rel="noopener noreferrer"&gt;VCS integration&lt;/a&gt; here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-step
&lt;/h2&gt;

&lt;p&gt;This section provides step-by-step instructions to help you set up and get the most out of Spacelift. If you want to learn about core concepts, please have a look at the &lt;a href="https://docs.spacelift.io/getting-started#introduction-to-main-concepts" rel="noopener noreferrer"&gt;main concepts&lt;/a&gt; section.&lt;/p&gt;

&lt;p&gt;You can get started with either forking our Terraform Starter repository and testing all Spacelift capabilities in under 15 minutes or you can explore Spacelift on your own by adding your own repository and going from zero to fully managing your cloud resources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/spacelift-io/terraform-starter" rel="noopener noreferrer"&gt;Use our starter repository to play with Spacelift (guide)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spacelift.io/getting-started#first-stack-run" rel="noopener noreferrer"&gt;Use your own repository (guide)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Free Trial
&lt;/h2&gt;

&lt;p&gt;Our &lt;a href="https://spacelift.io/free-trial" rel="noopener noreferrer"&gt;free trial&lt;/a&gt; provides 30 days of our enterprise tier if you want to kick the tires on Spacelift. If you get stuck or need advice, the Spacelift team is available to help.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How To: Create &amp; Manage Preview Environments</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Tue, 11 Jan 2022 00:50:00 +0000</pubDate>
      <link>https://forem.com/spacelift/how-to-create-manage-preview-environments-4m63</link>
      <guid>https://forem.com/spacelift/how-to-create-manage-preview-environments-4m63</guid>
      <description>&lt;p&gt;Thanks to &lt;a href="https://www.linkedin.com/in/jakubmartin/" rel="noopener noreferrer"&gt;Jakub Martin&lt;/a&gt;, Software Engineer at &lt;a href="https://www.spacelift.io" rel="noopener noreferrer"&gt;Spacelift&lt;/a&gt; for this contribution.&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://github.com/spacelift-io/demo-preview-environments-manager" rel="noopener noreferrer"&gt;https://github.com/spacelift-io/demo-preview-environments-manager&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This collection of &lt;a href="https://github.com/spacelift-io/demo-preview-environments-manager" rel="noopener noreferrer"&gt;repositories&lt;/a&gt; is a demo, as well as starting point, for a preview environments setup on top of Spacelift. It features a declarative, VCS-driven, very flexible, infa-as-code like approach which embraces the philosophy of managing Spacelift with Spacelift itself.&lt;/p&gt;

&lt;p&gt;Whether you need per Pull Request development environments, QA environments created on demand, or any other form of dynamically allocated environment, the approach represented here will be able to cover all of them. Most imaginable preview environment lifecycles should be achievable with this setup.&lt;/p&gt;

&lt;p&gt;No matter if your preview environment comprises a single Stack, or a hundred, a single microservice, or a hundred, including queues, databases, and other accompanying infrastructure, you'll be able to adapt the solution presented here to suit your needs.&lt;/p&gt;

&lt;p&gt;The best way to get an overview is to watch the demo video: &lt;a href="https://www.loom.com/share/a3427a529eb74b97994668fabc71b969" rel="noopener noreferrer"&gt;https://www.loom.com/share/a3427a529eb74b97994668fabc71b969&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also look at the Pull Requests on the Service and Infra repositories to see the existing preview environments and play with them, i.e. &lt;em&gt;curling&lt;/em&gt; &lt;a href="https://475ed74.hello-service.preview-environments.liftspace.net/hello" rel="noopener noreferrer"&gt;https://475ed74.hello-service.preview-environments.liftspace.net/hello&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Birds-eye view
&lt;/h2&gt;

&lt;p&gt;The described setup is one of the more conceptually complex ones, with separate repositories describing the artifact for a microservice, and the infrastructure which hosts this artifact.&lt;/p&gt;

&lt;p&gt;Preview environments are created for all Pull Requests in the &lt;a href="https://github.com/spacelift-io/demo-preview-environments-service/pulls" rel="noopener noreferrer"&gt;Service&lt;/a&gt; and &lt;a href="https://github.com/spacelift-io/demo-preview-environments-infra/pulls" rel="noopener noreferrer"&gt;Infra&lt;/a&gt; repositories, are kept up to date with changes to those Pull Requests, and get cleaned up after Pull Request deletion.&lt;/p&gt;

&lt;p&gt;The following repositories are used:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/spacelift-io/demo-preview-environments-service" rel="noopener noreferrer"&gt;Service&lt;/a&gt; - AWS Lambda representing our application code, the resulting artifact is a zipfile in S3.&lt;br&gt;
&lt;a href="https://github.com/spacelift-io/demo-preview-environments-infra" rel="noopener noreferrer"&gt;Infra&lt;/a&gt; - Sets up all the AWS resources the AWS Lambda needs, including the Lambda itself as well as API Gateway resources.&lt;br&gt;
&lt;a href="https://github.com/spacelift-io/demo-preview-environments-manager" rel="noopener noreferrer"&gt;Manager&lt;/a&gt; - Manages resources representing preview environments. Acts as a repository for all existing preview environments.&lt;br&gt;
&lt;a href="https://github.com/spacelift-io/demo-preview-environments-setup" rel="noopener noreferrer"&gt;Setup&lt;/a&gt; - Sets up the manager, with all its environment variables and policies.&lt;br&gt;
&lt;a href="https://github.com/spacelift-io/update-file-action" rel="noopener noreferrer"&gt;Update File Action&lt;/a&gt; - Can be used to create/update/delete files in a different repository. The Service and Infra repository workflows use this to create preview environments in the Manager repository.&lt;/p&gt;
&lt;h2&gt;
  
  
  Detailed Descriptions
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Manager
&lt;/h3&gt;

&lt;p&gt;The root of the manager repository contains one directory per service, for which preview environments are created. In this case, there's one directory, &lt;code&gt;hello-service&lt;/code&gt;, which is a module instantiated by the &lt;code&gt;main.tf&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Looking at the hello-service directory we can see multiple things:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;policies&lt;/code&gt; - Fixtures for policies used by preview environment Stacks.&lt;br&gt;
&lt;code&gt;template&lt;/code&gt; - Describes a single hello-service preview environment as a Terraform module. In this case this is a single Spacelift Stack with accompanying environment variables, though you could easily extend this to be i.e. multiple Stacks connected by Trigger Policies. This Stack also has a &lt;code&gt;spacelift_stack_destructor&lt;/code&gt; attached, which will make sure to destroy all resources of this Stack before deleting it. This way all resources of a preview environment are cleaned up on deletion.&lt;br&gt;
&lt;code&gt;environments&lt;/code&gt; - List of active preview environments, one file per preview environment. Each file is just an instantiation of the template module.&lt;br&gt;
&lt;code&gt;main.tf&lt;/code&gt; - Creates dependencies common to all preview environments, in this case it creates record for the wildcard domain name &lt;code&gt;*.hello-service.preview-environments.liftspace.net&lt;/code&gt;. Each preview environments AWS Lambda will be accessible through this URL, with the environment ID in place of the wildcard.&lt;br&gt;
For each preview environment there are multiple variables which need to be specified, with the interesting being:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;code_version&lt;/code&gt; - The version of the artifact zipfile to use.&lt;br&gt;
&lt;code&gt;environment&lt;/code&gt; - The ID of the preview environment. Should be reasonably unique. In this case we'll be using 8 character prefixes of the hash of the creator repositories owner, name and pull request number.&lt;br&gt;
&lt;code&gt;infra_repository_branch&lt;/code&gt; - Which branch of the infra repo to base the preview environment Stack on. The Stacks also have a Push Policy attached to ignore any other branches, so that they don't create any proposed changes.&lt;br&gt;
The manager Stack based on this repository also has an interesting Trigger Policy attached:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trigger[stack.id] {
    change := input.run.changes[_]
    change.phase == "apply"
    change.entity.type == "spacelift_environment_variable"
    stack := input.stacks[_]
    sanitized(stack.id) == change.entity.data.values.stack_id
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whenever it finishes execution, it will trigger any stacks it controls, for which environment variables have been changed. This way, if only the &lt;code&gt;code_version&lt;/code&gt; for a preview environment changes, which only results in an environment variable change, the Stack representing this preview environment will be triggered.&lt;/p&gt;

&lt;h3&gt;
  
  
  Service
&lt;/h3&gt;

&lt;p&gt;The service is code for an AWS Lambda responding with Hello World and the current commit SHA.&lt;/p&gt;

&lt;p&gt;Whenever a commit to a non-master branch is pushed, it creates a zipfile with the source code, and uploads it to an S3 bucket with the object name being .zip.&lt;/p&gt;

&lt;p&gt;Whenever a commit to the master branch is pushed, it does the same, but uploads the resulting artifact as latest.zip.&lt;/p&gt;

&lt;p&gt;For each PR, it will create a file in the &lt;code&gt;hello-service/environments&lt;/code&gt; directory, with the &lt;code&gt;code_version&lt;/code&gt; filled with the head commit SHA of the Pull Request, and the &lt;code&gt;infra_repository_branch&lt;/code&gt; filled with &lt;code&gt;master&lt;/code&gt;. It updates the files on each commit added to the PR, and deletes the file when the Pull Request is closed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infra
&lt;/h3&gt;

&lt;p&gt;The infra repository creates the actual AWS Lambda and API Gateway resources.&lt;/p&gt;

&lt;p&gt;For each PR, it will create a file in the &lt;code&gt;hello-service/environments&lt;/code&gt; directory, with the &lt;code&gt;code_version&lt;/code&gt; filled with latest, and the &lt;code&gt;infra_repository_branch&lt;/code&gt; filled with the source branch of the PR. It updates the files on each commit added to the PR, and deletes the file when the Pull Request is closed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;

&lt;p&gt;This just creates the manager Stack with the required Trigger Policy attached.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update File Action
&lt;/h3&gt;

&lt;p&gt;You can use this action to operate on files in a different repository. A GitHub token with suitable permissions has to be provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;You can copy all those repositories to your organization and create a Stack based on the Setup repository to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Free Trial
&lt;/h2&gt;

&lt;p&gt;If you'd like to play around with Spacelift, you can just &lt;a href="https://spacelift.io/free-trial" rel="noopener noreferrer"&gt;sign up&lt;/a&gt; on the homepage, and it'll automatically provision a trial account for you with all the features of Spacelift available.&lt;/p&gt;

&lt;p&gt;If you have any compliance requirements, we're SOC2 Type 2 certified.&lt;/p&gt;

&lt;h2&gt;
  
  
  Book a Product Demo
&lt;/h2&gt;

&lt;p&gt;Book a &lt;a href="https://spacelift.io/schedule-demo" rel="noopener noreferrer"&gt;free demo&lt;/a&gt; with one of our engineers to understand Spacelift capabilities, ask questions and see whether we’re the right fit for you.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>infrastructure</category>
      <category>terraform</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Solving the Diamond Problem with a Spacelift Trigger policy</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Thu, 09 Dec 2021 06:20:36 +0000</pubDate>
      <link>https://forem.com/spacelift/solving-the-diamond-problem-with-a-spacelift-trigger-policy-42h5</link>
      <guid>https://forem.com/spacelift/solving-the-diamond-problem-with-a-spacelift-trigger-policy-42h5</guid>
      <description>&lt;p&gt;The "diamond problem" (sometimes referred to as the "Deadly Diamond of Death") is an ambiguity that arises when two classes B and C inherit from A, and class D inherits from both B and C.&lt;/p&gt;

&lt;p&gt;It is called the "diamond problem" because of the shape of the class inheritance diagram in this situation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhj4skpsgi90z9t0hhcok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhj4skpsgi90z9t0hhcok.png" alt="Diamond Problem" width="220" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we solve this problem, let's walk through some building blocks so we can create complex workflows using trigger policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Purpose
&lt;/h2&gt;

&lt;p&gt;Frequently, your infrastructure consists of a number of projects (stacks in &lt;a href="https://spacelift.io/" rel="noopener noreferrer"&gt;Spacelift&lt;/a&gt; parlance) that are connected in some way - either depend logically on one another, or must be deployed in a particular order for some other reason - for example, a rolling deploy in multiple regions.&lt;/p&gt;

&lt;p&gt;Enter trigger policies. Trigger policies are evaluated at the end of each stack-blocking run (which includes tracked runs and tasks) and allow you to decide if some tracked Runs should be triggered. This is a very powerful feature, effectively turning Spacelift into a Turing machine.&lt;/p&gt;

&lt;p&gt;All runs triggered - directly or indirectly - by trigger policies as a result of the same initial run are grouped into a so-called workflow. In the trigger policy you can access all other runs in the same workflow as the currently finished run, regardless of their Stack. This lets you coordinate executions of multiple Stacks and build workflows which require multiple runs to finish in order to commence to the next stage (and trigger another Stack).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data input&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The schema of the data input that each policy request will receive can be found &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy#data-input" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;p&gt;Since trigger policies turn Spacelift into a Turing machine, you could probably use them to implement Conway's &lt;a href="https://en.wikipedia.org/wiki/Conway's_Game_of_Life" rel="noopener noreferrer"&gt;Game of Life&lt;/a&gt;, but there are a few more obvious use cases. Let's have a look at two of them - interdependent Stacks and automated retries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interdependent stacks
&lt;/h2&gt;

&lt;p&gt;The purpose here is to create a complex workflow that spans multiple Stacks. We will want to trigger a predefined list of Stacks when a Run finishes successfully. Here's our first take:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger["stack-one"]   { finished }
trigger["stack-two"]   { finished }
trigger["stack-three"] { finished }

finished {
  input.run.state == "FINISHED"
  input.run.type == "TRACKED"
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's a minimal example of this rule. But it's &lt;strong&gt;far from ideal&lt;/strong&gt;. We can't be guaranteed that stacks with these IDs still exist in this account. Spacelift will handle that just fine, but you'll likely find if confusing. Also, for any new Stack that appears you will need to explicitly add it to the list. That's annoying.&lt;/p&gt;

&lt;p&gt;We can do better, and to do that, we'll use Stack &lt;a href="https://docs.spacelift.io/concepts/stack#labels" rel="noopener noreferrer"&gt;labels&lt;/a&gt;. Labels are completely arbitrary strings that you can attach to individual Stacks, and we can use them to do something magical - have "client" Stacks "subscribe" to "parent" ones.&lt;/p&gt;

&lt;p&gt;So how's that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger[stack.id] {
  stack := input.stacks[_]
  input.run.state == "FINISHED"
  input.run.type == "TRACKED"
  stack.labels[_] == concat("", ["depends-on:", input.stack.id])
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The benefit of this policy is that you can attach it to all your stacks, and it will just work for your entire organization.&lt;/p&gt;

&lt;p&gt;Can we do better? Sure, we can even have stacks use labels to decide which types of runs or state changes they care about. Here's a mind-bending example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger[stack.id] {
  stack := input.stacks[_]
  input.run.type == "TRACKED"
  stack.labels[_] == concat("", [
    "depends-on:", input.stack.id,
    "|state:", input.run.state],
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, how cool is that?&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated retries
&lt;/h2&gt;

&lt;p&gt;Here's another use case - sometimes Terraform or Pulumi deployments fail for a reason that has nothing to do with the code - think eventual consistency between various cloud subsystems, transient API errors etc. It would be great if you could restart the failed run. Oh, and let's make sure new runs are not created in a crazy loop - since policy-triggered runs trigger another policy evaluation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger[stack.id] {
  stack := input.stack
  input.run.state == "FAILED"
  input.run.type == "TRACKED"
  is_null(input.run.triggered_by)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note that this will also prevent user-triggered runs from being retried. Which is usually what you want in the first place, because a triggering human is probably already babysitting the Stack anyway.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Diamond Problem
&lt;/h2&gt;

&lt;p&gt;The diamond problem happens when you're stacks and their dependencies form a shape like in the following diagram:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          ┌────┐
       ┌─►│ 2a ├─┐
       │  └────┘ │
┌───┐  │         │   ┌───┐
│ 1 ├──┤         ├──►│ 3 │
└───┘  │         │   └───┘
       │  ┌────┐ │
       └─►│ 2b ├─┘
          └────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which means that Stack 1 trigger both Stack 2a and 2b, and we only want to trigger Stack 3 when both predecessors finish. This can be elegantly solved using workflows.&lt;/p&gt;

&lt;p&gt;First we'll have to create a trigger policy for Stack 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger["stack-2a"] {
  tracked_and_finished
}

trigger["stack-2b"] {
  tracked_and_finished
}

tracked_and_finished {
  input.run.state == "FINISHED"
  input.run.type == "TRACKED"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will trigger both Stack 2a and 2b whenever a run finishes on Stack 1.&lt;/p&gt;

&lt;p&gt;Now onto a trigger policy for Stack 2a and 2b:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

trigger["stack-3"] {
  run_a := input.workflow[_]
  run_b := input.workflow[_]
  run_a.stack_id == "stack-2a"
  run_b.stack_id == "stack-2b"
  run_a.state == "FINISHED"
  run_b.state == "FINISHED"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we trigger Stack 3, whenever the runs in Stack 2a and 2b are both finished.&lt;/p&gt;

&lt;p&gt;You can also easily extend this to work with a label-based approach, so that you could define Stack 3's dependencies by attaching a depends-on:stack-2a,stack-2blabel to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package spacelift

# Helper with stack_id's of workflow runs which have already finished.
already_finished[run.stack_id] {
  run := input.workflow[_]
  run.state == "FINISHED"
}

trigger[stack.id] {
  input.run.state == "FINISHED"
  input.run.type == "TRACKED"

  # For each Stack which has a depends-on label,
  # get a list of its dependencies.
  stack := input.stacks[_]
  label := stack.labels[_]
  startswith(label, "depends-on:")
  dependencies := split(trim_prefix(label, "depends-on:"), ",")

  # The current Stack is one of the dependencies.
  input.stack.id == dependencies[_]

  finished_dependencies := [dependency | 
                                       dependency := dependencies[_]
                                       already_finished[dependency]]

  # Check if all dependencies have finished.
  count(finished_dependencies) == count(dependencies)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Are you ready to create complex workflows using trigger policies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start your &lt;a href="https://spacelift.io/free-trial" rel="noopener noreferrer"&gt;30 day free trial&lt;/a&gt; of Enterprise today or &lt;a href="https://spacelift.io/schedule-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; if you need to dive in deeper with our engineers. &lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;https://docs.spacelift.io/concepts/policy/trigger-policy&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sre</category>
      <category>infrastucture</category>
      <category>terraform</category>
      <category>devops</category>
    </item>
    <item>
      <title>Spacelift Policy-as-code Introduction</title>
      <dc:creator>Ryan Cartwright</dc:creator>
      <pubDate>Tue, 07 Dec 2021 08:58:30 +0000</pubDate>
      <link>https://forem.com/spacelift/spacelift-policy-as-code-introduction-2c8a</link>
      <guid>https://forem.com/spacelift/spacelift-policy-as-code-introduction-2c8a</guid>
      <description>&lt;p&gt;Policy-as-code is the idea of expressing rules using a high-level programming language and treating them as you normally treat code, which includes version control as well as continuous integration and deployment. This approach extends the infrastructure-as-code approach to also cover the rules governing this infrastructure, and the platform that manages it.&lt;/p&gt;

&lt;p&gt;Spacelift as a development platform is built around this concept and allows defining policies that involve various decision points in the application. User-defined policies can decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/login-policy" rel="noopener noreferrer"&gt;who gets to log in&lt;/a&gt; to your Spacelift account and with what level of access;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/stack-access-policy" rel="noopener noreferrer"&gt;who gets to access individual Stacks&lt;/a&gt; and with what level of access;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/git-push-policy" rel="noopener noreferrer"&gt;how Git push events are interpreted&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/run-initialization-policy" rel="noopener noreferrer"&gt;which Runs and Tasks can be started&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/terraform-plan-policy" rel="noopener noreferrer"&gt;which changes can be applied&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/task-run-policy" rel="noopener noreferrer"&gt;which one-off commands can be executed&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.spacelift.io/concepts/policy/trigger-policy" rel="noopener noreferrer"&gt;what happens when blocking runs terminate&lt;/a&gt;;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can refer to &lt;a href="https://docs.spacelift.io/concepts/policy#available-policies" rel="noopener noreferrer"&gt;this section&lt;/a&gt; to learn more about commonalities and differences between these policies, or to the dedicated article about each policy to dive deep into its details.&lt;/p&gt;

</description>
      <category>iac</category>
      <category>terraform</category>
      <category>security</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
