Deploy IRIS Application to Azure Using CircleCI
Tags: azure, kibernets, programming, tutorial
Published: 2022-12-18 14:42:03

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We’ve already considered how to run an IRIS-based application in GCP Kubernetes in </span></span></span></span></span></span><a href="https://community.intersystems.com/post/deploying-intersystems-iris-solution-gcp-kubernetes-cluster-gke-using-circleci"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Deploying InterSystems IRIS Solution into GCP Kubernetes Cluster GKE Using CircleCI</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Additionally, we’ve seen how to run an IRIS-based application in AWS Kubernetes in </span></span></span></span></span></span><a href="https://community.intersystems.com/post/deploying-simple-iris-based-web-application-using-amazon-eks"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Deploying a Simple IRIS-Based Web Application Using Amazon EKS</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Now, let’s look at how to deploy an application to the </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/services/kubernetes-service/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure Kubernetes Service</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> (AKS).</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <!--break-->
  
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Azure</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">For this article, we’ll use an </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/free/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure free subscription</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. You can find pricing details on their </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/pricing/#product-pricing"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">pricing</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> page. </span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">After registration, you’ll see the </span></span></span></span></span></span><a href="https://portal.azure.com/#home"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Microsoft Azure portal</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">:</span></span></span></span></span></span><br />
</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnc9c4xgqtb8mleydlaz.png)


<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The portal is handy, but we won’t use it in this article. Instead, let’s install the </span></span></span></span></span></span><a href="https://docs.microsoft.com/en-us/cli/azure/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure command-line interface</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. The most recent version at the moment of writing is 2.30.0.</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az version</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">{</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "azure-cli": "2.30.0",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "azure-cli-core": "2.30.0",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "azure-cli-telemetry": "1.0.6",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "extensions": {}</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">}</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Now let’s log in to Azure:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az login</span></span></span></span></span></span></pre>

<h1 style="line-height:1.38">
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">CircleCI Pipeline</span></span></span></span></span></span>
</h1>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We’re going to set up AKS and install an IRIS application using the power of CI/CD with </span></span></span></span></span></span><a href="https://circleci.com/docs/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">CircleCI</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. This means that we take a GitHub-based project, add a couple of pipeline files along with infrastructure as code, push changes back to GitHub, and check the results in a friendly CircleCI UI.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">With a GitHub account, it’s effortless to create an integration with CircleCI. For more information, see this article on </span></span></span></span></span></span><a href="https://circleci.com/integrations/github/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Seamless integration with GitHub</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s take an updated version of the project we’ve already used in </span></span></span></span></span></span><a href="https://community.intersystems.com/post/deploying-intersystems-iris-solution-gcp-kubernetes-cluster-gke-using-circleci"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Deploying InterSystems IRIS Solution into GCP Kubernetes Cluster GKE Using CircleCI</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#202124"><span style="background-color:#ffffff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">—</span></span></span></span></span></span></span><span style="font-size:10.5pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#202124"><span style="background-color:#ffffff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">namely, </span></span></span></span></span></span><a href="https://github.com/intersystems-community/secured-rest-api"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">secured-rest-api</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Open it, click </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">Use this Template</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, and create a version in a </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">new repository</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. We’ll refer to code samples located there throughout this article.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Clone a repository locally and create a </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.circleci/</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> directory with a couple of files:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ tree .circleci/</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.circleci/</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">├── config.yml</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">└── continue.yml</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We use a </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">dynamic configuration</span></span></span></span></span></span></span></span>](https://circleci.com/docs/2.0/configuration-cookbook/?section=examples-and-guides#dynamic-configuration)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">path filtering</span></span></span></span></span></span></span></span>](https://circleci.com/developer/orbs/orb/circleci/path-filtering)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> to enable the pipeline to run as a whole or just its parts depending on which files have changed. In our case, we run a Terraform job only when Terraform code changes. The first file, </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">config.yml</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/.circleci/config.yml)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, is simple. We call a second part, </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.circleci/continue.yml</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, and pass a particular Boolean parameter if the Terraform code is up-to-date.</span></span></span></span></span></span>  
 

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ cat config.yml</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">version: 2.1</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"># Enable CircleCI's dynamic configuration feature</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">setup: true</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"># Enable path-based pipeline</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">orbs:</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  path-filtering: circleci/path-filtering@0.1.0</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">workflows:</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  Generate dynamic configuration:</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    jobs:</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      - path-filtering/filter:</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">          name: Check updated files</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">          config-path: .circleci/continue.yml</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">          base-revision: master</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">          mapping: |</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">            terraform/.* terraform-job true</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Before discussing a second file, </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">continue.yml</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, let’s add this secured-rest-app project to CircleCI and push updates with </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.circleci/config.yml</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> to GitHub:</span></span></span></span></span></span>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git add .circleci/config.yml</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git commit -m "Add circleci config.yml"</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git push</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Then, open the </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">CircleCI Projects page</span></span></span></span></span></span></span></span>](https://app.circleci.com/projects)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, choose your project, and click </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">Set Up Project</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ptaq3zm58l1jz5d1udhv.png)<span> </span>

  <span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Follow the provided recommendation and enable </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">Setup Workflow</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> (for more information, see </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Getting started with dynamic config in CircleCI</span></span></span></span></span></span></span></span>](https://circleci.com/docs/2.0/dynamic-config/#getting-started-with-dynamic-config-in-circleci)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">):</span></span></span></span></span></span>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saptduiu76kljsf0wib8.png)<span> </span>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Now we’re ready to continue with the second file, </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">continue.yml</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Its structure is as follows:</span></span></span></span></span></span>
</p>

<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L1"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Version</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> indicates the CircleCI pipeline version.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L3"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Parameters</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is a variable to decide if Terraform should be running or not.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L8"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Orbs</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> are parts of configuration created by others which we could reuse.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L13"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Executors</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> are docker images with an Azure command line for some of our jobs.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L18"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Jobs</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> are the actual deployment steps.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L94"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Workflows</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> are logic to run a pipeline with or without Terraform.</span></span></span></span></span></span>
</li>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L18"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Jobs</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> section contains the following jobs:</span></span></span></span></span></span>
</p>

<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L19"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Build and push Docker image to ACR</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">: This job runs inside a docker image with the az command-line tool installed. It logs in to Azure and builds and pushes an image to the </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/services/container-registry/#features"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure Container Registry (ACR)</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>
</li>

<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L34"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">: This job uses a </span></span></span></span></span></span><a href="https://circleci.com/developer/orbs/orb/circleci/terraform"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform orb</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and creates an infrastructure. See the section on Terraform below for details.</span></span></span></span></span></span>
</li>

<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L47"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Setup packages</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">: This job installs an IRIS application and a couple of service applications. See the Setup Packages</span></span></span></span><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> section below for details.</span></span></span></span></span></span>
</li>

<h1 style="line-height:1.38">
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Terraform</span></span></span></span></span></span>
</h1>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">For infrastructure creation, we’re going to use an </span></span></span></span></span></span><a href="https://martinfowler.com/bliki/InfrastructureAsCode.html"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">infrastructure as code</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> approach and leverage the power of </span></span></span></span></span></span><a href="https://www.terraform.io/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Terraform speaks with AKS using its </span></span></span></span></span></span><a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure plugin</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. It’s handy to use an </span></span></span></span></span></span><a href="https://registry.terraform.io/modules/Azure/aks/azurerm/latest"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">AKS Terraform module</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> that plays as a wrapper and simplifies resource creation.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">You can find an example of creating an AKS resource with Terraform in </span></span></span></span></span></span><a href="https://www.hashicorp.com/blog/kubernetes-cluster-with-aks-and-terraform"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Creating a Kubernetes Cluster with AKS and Terraform</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Here, we enable Terraform to manage all resources for demo purposes and simplicity, that is, assign an </span></span></span></span></span></span><a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#owner"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Owner</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> role. Terraform as an application connects to Azure using Service Principal. So, to be more accurate, we assign an owner role to Service Principal as described in </span></span></span></span></span></span><a href="https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Create an Azure service principal with the Azure CLI</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. </span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s run a couple of commands on a local machine. Save the Azure subscription ID in an environment variable:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ export AZ_SUBSCRIPTION_ID=$(az account show --query id --output tsv)</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az ad sp create-for-rbac -n "Terraform" --role="Owner" --scopes="/subscriptions/${AZ_SUBSCRIPTION_ID}"</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">…</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">{</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "appId": "&amp;lt;appId>",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "displayName": "&amp;lt;displayName>",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "name": "&amp;lt;name>",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "password": "&amp;lt;password>",</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  "tenant": "&amp;lt;tenant>"</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">}</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">You can later find </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">appId</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">tenantId</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> listing Service Principals and looking for the display name Terraform:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az ad sp list --display-name "Terraform" | jq '.[] | "AppId: \(.appId), TenantId: \(.appOwnerTenantId)"'</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">But you can’t see the password this way. If you forget your password, the only way is to </span></span></span></span></span></span><a href="https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest#6-reset-credentials"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">reset credentials</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">In a pipeline, for AKS creation, we use a publicly available </span></span></span></span></span></span><a href="https://registry.terraform.io/modules/Azure/aks/azurerm/latest"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure Terraform module</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and Terraform version 1.0.11.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Set the environment variables in the </span></span></span></span></span></span><a href="https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">CircleCI project settings</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> with the retrieved credentials that Terraform uses for connections to Azure. Also, set the </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">DOMAIN_NAME</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> environment variable. This tutorial uses the demo-iris.myardyas.club domain name, but you’ll use your registered domain name. We use this variable in a pipeline to enable external access to the IRIS application. The mapping of CircleCI variables with the az </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">create-for-rbac</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> command is as follows:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">ARM_CLIENT_ID: appId</span></span></span></span></span></span>
<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">ARM_CLIENT_SECRET: password</span></span></span></span></span></span>
<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">ARM_TENANT_ID: tenant</span></span></span></span></span></span>
<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">ARM_SUBSCRIPTION_ID: Value of environment variable AZ_SUBSCRIPTION_ID</span></span></span></span></span></span>
<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">DOMAIN_NAME: your domain name</span></span></span></span></span></span></pre>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvrpk25mvzkg4wag4wh9.png)<span> </span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">To enable the </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform Remote state</span></span></span></span></span></span></span></span>](https://www.terraform.io/docs/language/state/remote.html)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, we use </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform state in Azure Storage</span></span></span></span></span></span></span></span>](https://docs.microsoft.com/en-us/azure/developer/terraform/store-state-in-azure-storage?tabs=azure-cli)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. To achieve this, let’s run these commands on a local machine. </span></span></span></span></span></span>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ export RESOURCE_GROUP_NAME=tfstate</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ export STORAGE_ACCOUNT_NAME=tfstate14112021 # Must be between 3 and 24 characters in length and use numbers and lower-case letters only</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ export CONTAINER_NAME=tfstate
  </span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"># Create resource group</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az group create --name ${RESOURCE_GROUP_NAME} --location eastus
  </span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"># Create storage account</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az storage account create --resource-group ${RESOURCE_GROUP_NAME} --name ${STORAGE_ACCOUNT_NAME} --sku Standard_LRS --encryption-services blob</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  
# Enable versioning. Read more at https://docs.microsoft.com/en-us/azure/storage/blobs/versioning-overview</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az storage account blob-service-properties update --account-name ${STORAGE_ACCOUNT_NAME} --enable-versioning true</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  
# Create blob container</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az storage container create --name ${CONTAINER_NAME} --account-name ${STORAGE_ACCOUNT_NAME}</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The Terraform code we put in the </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/tree/master/terraform"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Terraform</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> directory. It's divided into three files:</span></span></span></span></span></span>
</p>

<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/provider.tf"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">provider.tf</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is to set the Azure plugin version and a path to remote storage for saving the Terraform state.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/variables.tf"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">variables.tf</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is input data for the Terraform module.</span></span></span></span></span></span>
</li>
<li aria-level="1" style="list-style-type:disc">
  <a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">main.tf</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is the creation of the actual resources. </span></span></span></span></span></span>
</li>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We create an Azure </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf#L1"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">resource group</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf#L50"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">public IP</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf#L42"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure container registry</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, and so on. For </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf#L7"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">networking</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and the </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/terraform/main.tf#L18"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Azure Kubernetes service</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, we leverage publicly available Terraform modules.</span></span></span></span></span></span>
</p>

<h1 style="line-height:1.38">
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Setup Packages</span></span></span></span></span></span>
</h1>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">What we’re going to install into the newly created AKS cluster is located in the </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helm</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/tree/master/helm)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> directory. The descriptive </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Helmfile</span></span></span></span></span></span></span></span>](https://github.com/roboll/helmfile)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> approach enables us to define applications and their settings in the </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helmfile.yaml</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/helm/helmfile.yaml)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> file.</span></span></span></span></span></span>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Run the setup with the single command </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/.circleci/continue.yml#L92"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helmfile sync</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. The command installs an IRIS application and two additional applications, cert-manager and ingress-nginx, allowing us to call an application from the outside. For more information, see the </span></span></span></span></span></span><a href="https://github.com/myardyas/secured-rest-api/blob/master/helm/helmfile.yaml#L16"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">releases</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> section on GitHub.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We install the IRIS application using a Helm chart similar to that described in </span></span></span></span></span></span><a href="https://community.intersystems.com/post/automating-gke-creation-circleci-builds"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Automating GKE creation on CircleCI builds</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. For simplicity, we use </span></span></span></span></span></span><a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">deployment</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. That means data doesn’t persist during the pod’s restart. For persistence, you should use </span></span></span></span></span></span><a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Statefulset</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> or, better, </span></span></span></span></span></span><a href="https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=PAGE_DEPLOYMENT_IKO"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0b5394"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Kubernetes IRIS Operator</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> (IKO). You can find an example of IKO deployment in the </span></span></span></span></span></span><a href="https://github.com/intersystems-community/iris-k8s-monitoring/blob/master/helmfile.yaml#L23"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">iris-k8s-monitoring</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> repository.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Running the Pipeline</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">When you’ve added the .circleci/, terraform/ and helm/ directories, push them into GitHub:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git add .</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git commit -m "Setup everything"</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ git push</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">If everything is okay, you see a screen in the CIrcleCI UI that’s similar to the following:</span></span></span></span></span></span>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7997fo8u7il64yjhk0tg.png) <span> </span>

<h2 style="line-height:1.38">
  <span style="font-size:16pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Setting the A-record in the Domain Registrar</span></span></span></span></span></span>
</h2>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">One more thing is the creation of a binding by </span></span></span></span></span></span><a href="https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">A-record</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> between a public IP created in Azure by Terraform and your domain name in your Domain Registrar console.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s connect to a cluster:</span></span></span></span></span></span>
</p>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ az aks get-credentials --resource-group demo --name demo</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Define a public IP-address exposed by ingress-nginx:</span></span></span></span></span></span>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ kubectl -n ingress-nginx get service ingress-nginx-controller -ojsonpath='{.spec.loadBalancerIP}'</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">x.x.x.x</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Set this IP in your domain registrar (</span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">GoDaddy</span></span></span></span></span></span></span></span>](https://godaddy.com/)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Route53</span></span></span></span></span></span></span></span>](https://en.wikipedia.org/wiki/Amazon_Route_53)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#1155cc"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">GoogleDomains</span></span></span></span></span></span></span></span>](https://domains.google/)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, and so on) like this:</span></span></span></span></span></span>

<pre><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">YOUR_DOMAIN_NAME = x.x.x.x</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Now, wait for some time until the DNS change is propagated around the world and you can check the result:</span></span></span></span></span></span>

<pre><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ dig +short YOUR_DOMAIN_NAME</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The response should be x.x.x.x.</span></span></span></span></span></span>
</p>

<h2 style="line-height:1.38">
  <span style="font-size:16pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Testing</span></span></span></span></span></span>
</h2>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Assuming that the domain name is demo-iris.myardyas.club, we can perform manual testing. Note that we’ve used the </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">letsencrypt staging</span></span></span></span></span></span></span></span>](https://letsencrypt.org/docs/staging-environment/)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> issuer, so let's omit certificate checking here. In production, we should replace the issuer with </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">lets-encrypt-production</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/helm/cert-manager/lets-encrypt-production.yaml)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">here</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/helm/iris/values.yaml#L30)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Also, it’s worth setting your email </span></span></span></span></span></span>[<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">here</span></span></span></span></span></span></span></span>](https://github.com/myardyas/secured-rest-api/blob/master/helm/cert-manager/lets-encrypt-production.yaml#L7)<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> instead of at </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">example@gmail.com</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ curl -sku Bill:ChangeMe https://demo-iris.myardyas.club/crudall/_spec | jq .</span></span></span></span></span></span>
<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">…</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Create a person:</span></span></span></span></span></span>

<pre><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ curl -ku John:ChangeMe -XPOST -H "Content-Type: application/json"  https://demo-iris.myardyas.club/crud/persons/ -d '{"Name":"John Doe"}'</span></span></span></span></span></span></pre>

<span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Check to see if a person was created:</span></span></span></span></span></span>

<pre style="line-height: 1.38;"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ curl -sku Bill:ChangeMe https://demo-iris.myardyas.club/crud/persons/all | jq .</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">[</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  {</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    "Name": "John Doe"</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  }</span></span></span></span></span></span>
<span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">...</span></span></span></span></span></span></pre>

<p style="line-height:1.38">
  <span style="font-size:20pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Conclusion</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">That’s it! You've seen how a Terraform and CircleCI workflow creates a Kubernetes cluster in an Azure cloud. For our IRIS installation, we used the most straightforward Helm chart. For production, you should extend this chart, at least deployment should be replaced by Statefulset, or you should use </span></span></span></span></span></span><a href="https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=PAGE_DEPLOYMENT_IKO"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">IKO</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span>
</p>

<p style="line-height:1.38">
  <span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Don’t forget to remove created resources when you no longer need them. Although Azure has a </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/free/?v=b&adobe_mc_sdid=SDID%3D5114C6DF115C70B5-7C5850BC2C2B8004%7CMCORGID%3DEA76ADE95776D2EC7F000101@AdobeOrg%7CTS%3D1634537943&adobe_mc_ref=https%3A%2F%2Fwww.google.com%2F"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">free tier</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and AKS is </span></span></span></span></span></span><a href="https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#4a6ee0"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">free</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, you pay for resources designed to run an AKS cluster.</span></span></span></span></span></span>
</p>