<?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>The Ops Community ⚙️: Oded Navon</title>
    <description>The latest articles on The Ops Community ⚙️ by Oded Navon (@oded_navon).</description>
    <link>https://community.ops.io/oded_navon</link>
    <image>
      <url>https://community.ops.io/images/kpjv5Y6QKczc2ngf7GrnJmIts-K7j6ujBlQCe7ja5xM/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL3Vz/ZXIvcHJvZmlsZV9p/bWFnZS8xMDg0LzBj/ODk4M2RiLTM5OGIt/NDQ5ZC05NmE2LWZh/Mjg5ZWYxYjAzYi5q/cGc</url>
      <title>The Ops Community ⚙️: Oded Navon</title>
      <link>https://community.ops.io/oded_navon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://community.ops.io/feed/oded_navon"/>
    <language>en</language>
    <item>
      <title>Using a HashiCorp Terraform Cloud Run Task Webhook Trigger in Blink: Event-Based Approvals Flows</title>
      <dc:creator>Oded Navon</dc:creator>
      <pubDate>Mon, 31 Oct 2022 20:30:37 +0000</pubDate>
      <link>https://community.ops.io/blinkops/using-a-hashicorp-terraform-cloud-run-task-webhook-trigger-in-blink-event-based-approvals-flows-mdp</link>
      <guid>https://community.ops.io/blinkops/using-a-hashicorp-terraform-cloud-run-task-webhook-trigger-in-blink-event-based-approvals-flows-mdp</guid>
      <description>&lt;p&gt;HashiCorp &lt;a href="https://www.hashicorp.com/blog/pre-plan-apply-run-tasks-now-available-in-terraform-cloud"&gt;Terraform Cloud Run Tasks&lt;/a&gt; help you integrate external services like security, compliance, and cost management tools into your Infrastructure-as-Code (IaC) workflows. This is especially useful for automating code review using third-party tools.&lt;/p&gt;

&lt;p&gt;Now, you can trigger &lt;a href="https://www.docs.blinkops.com/docs/Documentation/Automations/Introduction"&gt;Blink automations&lt;/a&gt; with events from Terraform using run tasks. This can be accomplished using a simple webhook trigger. When triggered, a run task sends an API payload to the external service containing information about your Terraform run, like a callback URL that provides a passed or failed status. &lt;/p&gt;

&lt;p&gt;By using Terraform Cloud run tasks, Blink makes it easy to add approvals checks via interactive Slack notifications to your Terraform workflows, or create event-based automations triggered by Terraform Cloud to enforce compliance, security, or business requirements.&lt;/p&gt;

&lt;p&gt;In this tutorial, you will set up a Terraform Cloud run task for Blink, a no-code automation platform for managing cloud operations workflows. You will configure a Blink integration for Terraform Cloud and create a corresponding run task in your Terraform Cloud organization. &lt;/p&gt;

&lt;h2&gt;
  
  
  Extend your Terraform Cloud Workflows with Blink
&lt;/h2&gt;

&lt;p&gt;By integrating your Blink and Terraform Cloud accounts, you can unlock a great deal of flexibility as to what you can automate. &lt;/p&gt;

&lt;p&gt;Here is a high-level description of the different steps that occur when an event-based workflow in Blink gets triggered by a Terraform Cloud event:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Blink workflow gets triggered by an event from Terraform Cloud.&lt;/li&gt;
&lt;li&gt;Blink workflow executes logic based on your business needs. For example, you can execute automated approvals flows, Slack notifications, code checks, update or create items in ticketing systems, register events in observability tools, or other cloud processes.&lt;/li&gt;
&lt;li&gt;Once your Blink workflow has completed successfully (or not), Blink uses the Terraform Cloud run task callback to tell the Terraform workflow to proceed or to cancel based on the outcome of the previous step.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To further illustrate possible automations, here are two common examples for implementing Blink workflows using a trigger from Terraform Cloud run tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add a Slack Approvals Flow
&lt;/h3&gt;

&lt;p&gt;One of the simplest, yet most impactful ways of improving your infrastructure provisioning process is to streamline approvals processes. For example, when your team is merging new code to your main branch, you’ll likely need approval from a manager. &lt;/p&gt;

&lt;p&gt;During the Pre-plan, Post-Plan, or Apply stages, you can invoke a run task that triggers Blink to send a notification via Slack to a manager, with context about the Terraform run and the option to “Approve” or “Deny” the execution. If you want, you can make this a conditional step. For example, you can configure the Blink workflow to require an approval step only if your operation happens on the main branch. Furthermore, your Blink workflow can include just a simple approval step, or you can add multiple steps across different cloud services.&lt;/p&gt;

&lt;p&gt;It’s quick and simple to set up your first Blink automation. Check out this &lt;a href="https://www.docs.blinkops.com/docs/Integrations/Terraform/Introduction"&gt;introduction&lt;/a&gt; to learn more about Blink automations and event-based workflows you can set up using Terraform Cloud run tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automate Code Scans and Security Workflows
&lt;/h3&gt;

&lt;p&gt;In addition to requiring an approval step as part of your Terraform workflow, you can also introduce third-party tools such as vulnerability scanners, cost management, code scanning, and more into the infrastructure provisioning process. Using Blink, it’s possible to shortcut some of the &lt;a href="https://www.terraform.io/cloud-docs/integrations/run-tasks"&gt;manual configuration&lt;/a&gt; effort required to create efficient workflows using different security tools. &lt;/p&gt;

&lt;p&gt;Rapidly create event-based workflows that combine steps across different cloud tools and services. Blink extends your Terraform workflows and automates actions across different cloud services so you can focus on shipping better code faster. &lt;/p&gt;

&lt;p&gt;You can find a list of purpose-built automation workflows for Terraform Cloud in the Blink &lt;a href="https://library.blinkops.com/"&gt;Automation Library.&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In order to successfully complete this tutorial, you will need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Terraform Cloud account with the Team &amp;amp; Governance tier&lt;/li&gt;
&lt;li&gt;A Blink account&lt;/li&gt;
&lt;li&gt;A Slack account&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You cannot create a run task unless the Automation is published and active, and has at least one step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Terraform Cloud Run Task Webhook Trigger in Blink
&lt;/h2&gt;

&lt;p&gt;The first step is creating and connecting your Terraform Cloud and Blink accounts. This integration generates a unique endpoint URL in Blink. You will use this URL as the Webhook URL when you create a run task in Terraform Cloud.&lt;/p&gt;

&lt;p&gt;Here’s how to connect Terraform Cloud from Blink:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;From your Blink workspace, click &lt;strong&gt;Add Automation&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter &lt;strong&gt;Automation name&lt;/strong&gt; and select in which Pack to place the new Automation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In &lt;strong&gt;Type of trigger&lt;/strong&gt;, select &lt;strong&gt;Event-based Automation&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://community.ops.io/images/1flHdejBIifjMOU1S9aNrXW_kbqv1nATxZVvubIbnLc/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzLzQ2ZXFh/MTRrYmt2ZzhocG1h/ZmRjLnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/1flHdejBIifjMOU1S9aNrXW_kbqv1nATxZVvubIbnLc/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzLzQ2ZXFh/MTRrYmt2ZzhocG1h/ZmRjLnBuZw" alt='Screenshot of Blink "Create New Automation Screen." Shown is a field for Automation Name, and an option to choose your trigger type. There are options for Event-based, Scheduled, and On-demand automations.' width="595" height="633"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Terraform Cloud, Run Task Webhook Event&lt;/strong&gt; &amp;gt; &lt;strong&gt;Continue&lt;/strong&gt;. The &lt;strong&gt;Trigger setup&lt;/strong&gt; dialog box will open.&lt;br&gt;
&lt;a href="https://community.ops.io/images/y5iK0ZwaweqwNRZKEBgM5k2FdN3LSQQq0_BhVGGsj3g/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3ltaHlr/ZTJsN2NxbnloZjIz/cnZjLnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/y5iK0ZwaweqwNRZKEBgM5k2FdN3LSQQq0_BhVGGsj3g/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3ltaHlr/ZTJsN2NxbnloZjIz/cnZjLnBuZw" alt="Screenshot of Blink trigger setup screen with options to select which app you would like to integrate with. Options shown are Custom Webhook, Active Directory, AWS, Bitbucket, DataDog, GCP, GitHub, GitLab, Google Workspace, Grafana, Jira, Okta, PagerDuty, Slack, Terraform Cloud, and Wiz." width="880" height="510"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the &lt;strong&gt;Webhook URL&lt;/strong&gt;. You will need this later to create a run task in Terraform Cloud.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://community.ops.io/images/luoTA2bo4V9K7cAP4RD5LsXFWMrssbFiXIAVEYJWMi4/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzLzJwcDZ2/cjF4djM5dWVyeWV6/c3hrLnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/luoTA2bo4V9K7cAP4RD5LsXFWMrssbFiXIAVEYJWMi4/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzLzJwcDZ2/cjF4djM5dWVyeWV6/c3hrLnBuZw" alt="Screenshot of Trigger Setup window with Terraform Cloud selected and displaying webhook." width="880" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Run Task in Terraform Cloud
&lt;/h2&gt;

&lt;p&gt;Next, you will need to create a Terraform Cloud run task. You will configure this run task with a webhook that serves as an endpoint URL for communication between Terraform Cloud and Blink. When triggered, this run task will initiate the automated approvals process via an interactive Slack notification sent to a Terraform account administrator.&lt;/p&gt;

&lt;p&gt;To create a Terraform Cloud Run Task:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In Terraform Cloud, go to &lt;strong&gt;Workspaces&lt;/strong&gt; &amp;gt; &lt;strong&gt;Select a workspace&lt;/strong&gt; &amp;gt; &lt;strong&gt;Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;run tasks&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://community.ops.io/images/IVQLwmA0nELR2hFY3R_b6qhAihXuwoJAZlb9ynhJc_g/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3NkNWk0/eXlsejI3dmdiNzZl/ajg0LnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/IVQLwmA0nELR2hFY3R_b6qhAihXuwoJAZlb9ynhJc_g/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3NkNWk0/eXlsejI3dmdiNzZl/ajg0LnBuZw" alt="Screenshot of Terraform Workspaces run tasks screen." width="880" height="329"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Create a new Run Task&lt;/strong&gt;. The &lt;strong&gt;Create a Run Task&lt;/strong&gt; page will open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter all values on the &lt;strong&gt;Create a Run Task&lt;/strong&gt; page. Select enable run task will run across all workspaces. For &lt;strong&gt;Name&lt;/strong&gt;, select a meaningful name. For &lt;strong&gt;Endpoint URL&lt;/strong&gt;, paste the copied &lt;strong&gt;Blink Webhook URL&lt;/strong&gt;. For &lt;strong&gt;description&lt;/strong&gt;, you can describe what the run task is (optional).&lt;br&gt;
&lt;a href="https://community.ops.io/images/LeAqYoilj8AW2su8wav5Pi910jbcE_v3uySRkGdbayM/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3N2YWs5/ODM0MGlwN2hweGRq/bmF0LnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/LeAqYoilj8AW2su8wav5Pi910jbcE_v3uySRkGdbayM/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL3N2YWs5/ODM0MGlwN2hweGRq/bmF0LnBuZw" alt="Select a run task stage screenshot" width="880" height="400"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Create Run Task&lt;/strong&gt;. &lt;strong&gt;Run Tasks&lt;/strong&gt; will open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Available run Tasks&lt;/strong&gt;, next to &lt;strong&gt;Relevant Run Tasks&lt;/strong&gt;, click &lt;strong&gt;+&lt;/strong&gt;. The &lt;strong&gt;Associated Run Task&lt;/strong&gt; page will open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Run Stage&lt;/strong&gt;, select your desired run stage. The Blink integration works with all run stages. Under &lt;strong&gt;Enforcement Level&lt;/strong&gt;, select &lt;strong&gt;Advisory&lt;/strong&gt; or &lt;strong&gt;Mandatory&lt;/strong&gt; according to your preference. Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://community.ops.io/images/hecmJ0M6zv2FSQuHvU2eMDWCR82v96AC41Wjy05LftI/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL214bW9u/dHl3bDQzM2o3bWY4/M3VwLnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/hecmJ0M6zv2FSQuHvU2eMDWCR82v96AC41Wjy05LftI/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzL214bW9u/dHl3bDQzM2o3bWY4/M3VwLnBuZw" alt="Select a run task stage screenshot." width="880" height="337"&gt;&lt;/a&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a Run Task Callback in a Blink Automation
&lt;/h2&gt;

&lt;p&gt;Finally, you need to set up the callback that informs Terraform Cloud a code review has received an approval and is ready to proceed. &lt;/p&gt;

&lt;p&gt;In order for the run task to finish successfully, the Blink automation must return a callback request to Terraform Cloud. This can be done using the &lt;strong&gt;Terraform Cloud Run Task Callback&lt;/strong&gt; action.&lt;/p&gt;

&lt;p&gt;To set up a Terraform Cloud Run Task Callback:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the Blink platform, in the &lt;strong&gt;Edit&lt;/strong&gt; page of your Automation, click the empty space under &lt;strong&gt;Steps&lt;/strong&gt; &amp;gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Run Task Callback&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Run Task Callback URL&lt;/strong&gt; and &lt;strong&gt;Access Token&lt;/strong&gt;: It is recommended to leave the default values pre-defined in this action. Enter the rest of the parameters by your preference.&lt;/li&gt;
&lt;li&gt;In the top-right corner of the canvas, &lt;strong&gt;Publish&lt;/strong&gt; the Automation.
&lt;img src="https://community.ops.io/images/c0NrsjWgdzuH2kctMkWrsJwhECZaXU8y8wqBpdsy3pI/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL2Fy/dGljbGVzLzdqbDNs/dzlwa3g5aTFvZHk3/NDhnLnBuZw" alt="Screenshot of step in Blink workflow showing Terraform callback URL and Access Token" width="880" height="373"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating Event-Based Approvals Flows in Blink
&lt;/h2&gt;

&lt;p&gt;Blink makes it easy to create event-based workflows. You can create triggers using schedules, polling, if-this-then-that (IFTTT) flows, REST APIs, polling, and many other actions. Whether your automation is triggered in Terraform Cloud run tasks, Slack, or from elsewhere in your cloud, Blink is the fastest way to deliver impactful automations that empower your developer and business teams. &lt;/p&gt;

&lt;p&gt;Blink even has an &lt;a href="https://library.blinkops.com/"&gt;Automation Library&lt;/a&gt; with purpose-built workflows for cloud services like AWS, Terraform, and Slack. Blink helps DevOps, SecOps, and FinOps achieve flow in their everyday work, by making it easy to create automations across the cloud platforms and services they use every day. &lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started with Blink
&lt;/h2&gt;

&lt;p&gt;The best part? The no-code future for cloud operations is available today. &lt;a href="https://app.blinkops.com/signup"&gt;Sign up to create a Blink account.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>tutorials</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Survey: Help us improve Blink and win Ops badges!</title>
      <dc:creator>Oded Navon</dc:creator>
      <pubDate>Thu, 21 Jul 2022 05:47:28 +0000</pubDate>
      <link>https://community.ops.io/blinkops/survey-help-us-improve-blink-and-win-ops-badges-5b99</link>
      <guid>https://community.ops.io/blinkops/survey-help-us-improve-blink-and-win-ops-badges-5b99</guid>
      <description>&lt;p&gt;Hi Ops Community! I’m Oded Navon, a Product Manager here at &lt;a href="https://community.ops.io/blinkops"&gt;Blink&lt;/a&gt;, where we’re all about making our users’ daily work easier. We help DevOps, SecOps, and SREs automate their daily workflows, so they don’t waste time on manual error-prone tasks. To make it even simpler, we’re in the process of building a Blink Marketplace. &lt;/p&gt;

&lt;p&gt;The Blink Marketplace is a hub of purpose-built automation templates, ready to deploy in a click of a button. Now, it’s your opportunity to help shape the Blink Marketplace!&lt;/p&gt;

&lt;p&gt;Since many cloud engineers face challenges building custom automations, we wanted to learn more about your needs and gather feedback on the areas where the need for automation is most dire. &lt;/p&gt;

&lt;p&gt;Please fill out &lt;a href="https://forms.gle/2urWBhR1vEtaCDSL6"&gt;this Google Survey&lt;/a&gt; and share your experiences. &lt;/p&gt;

&lt;p&gt;As a small thank you, we’ll email our Ops Community Blink badge to survey respondents. Upon completing your survey, you’ll receive instructions for claiming your Ops badge. &lt;/p&gt;

&lt;p&gt;Thanks for participating!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloudops</category>
      <category>help</category>
    </item>
  </channel>
</rss>
