<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mher Poghosyan</title>
    <description>The latest articles on DEV Community by Mher Poghosyan (@mher_poghosyan).</description>
    <link>https://dev.to/mher_poghosyan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245164%2F84b3e33a-84bb-4e42-bb21-248c1f1a736c.png</url>
      <title>DEV Community: Mher Poghosyan</title>
      <link>https://dev.to/mher_poghosyan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mher_poghosyan"/>
    <language>en</language>
    <item>
      <title>A zero-trust service mesh in 3 months: Istio ambient mode as a self-service building block</title>
      <dc:creator>Mher Poghosyan</dc:creator>
      <pubDate>Sun, 15 Nov 2026 08:40:52 +0000</pubDate>
      <link>https://dev.to/mher_poghosyan/a-zero-trust-service-mesh-in-3-months-istio-ambient-mode-as-a-self-service-building-block-561f</link>
      <guid>https://dev.to/mher_poghosyan/a-zero-trust-service-mesh-in-3-months-istio-ambient-mode-as-a-self-service-building-block-561f</guid>
      <description>&lt;p&gt;A regulated launch in New Jersey needed every service-to-service connection encrypted and mutually authenticated. The requirement had been open for a year and a half. I joined the team to close it, and three months later the mesh was ready as a building block: any team joins in about ten minutes, without changing a line of application code.&lt;/p&gt;

&lt;p&gt;Here is how it is built, the details that decided whether it worked, and a clean-room reference implementation: &lt;a href="https://github.com/devopsmher/istio-ambient-building-block" rel="noopener noreferrer"&gt;github.com/devopsmher/istio-ambient-building-block&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The requirement in engineering terms
&lt;/h3&gt;

&lt;p&gt;The launch fell under New Jersey’s internet gaming rules and the GLI-19 standard. For the platform that meant four things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every connection&lt;/strong&gt; between services encrypted and mutually authenticated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deny by default&lt;/strong&gt; : a service talks only to callers that are explicitly allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No bypass&lt;/strong&gt; : plain-text traffic must not reach a workload, even from inside the cluster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence&lt;/strong&gt; : something an auditor can check, and that we can re-check after every change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why ambient mode
&lt;/h3&gt;

&lt;p&gt;The classic Istio data plane puts a sidecar proxy into every pod. That works, but for dozens of teams it turns the mesh into an application change: sidecar injection, rolling restarts, extra CPU and memory in every pod, and every team in the critical path.&lt;/p&gt;

&lt;p&gt;Ambient mode moves the proxy out of the pod:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ztunnel&lt;/strong&gt; , one per node, carries mTLS for every pod of an enrolled namespace and enforces L4 authorization by workload identity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Waypoints&lt;/strong&gt; add L7 features (HTTP authorization, retries, header routing) only for the namespaces that need them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Joining is a label&lt;/strong&gt; : istio.io/dataplane-mode=ambient on the namespace. Leaving is removing it. No restarts in either direction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That made the mesh an infrastructure change, owned by the platform, instead of a migration that every team had to schedule.&lt;/p&gt;

&lt;h3&gt;
  
  
  The pieces
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Terraform module (istio_enabled)
  └─ istiod · istio-cni · ztunnel · STRICT mTLS · shared Gateway · Kiali
Team values file → Argo CD ApplicationSet
  ├─ mesh-namespace : ambient label · default-deny · allow rules · NetworkPolicy
  ├─ mesh-routes : Gateway API HTTPRoutes to the shared gateway
  └─ mesh-egress : external hosts as ServiceEntries
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whole mesh sits behind one Terraform feature flag, istio_enabled, off by default. Turning it on installs Istio and changes nothing for running workloads: namespaces still opt in one by one.&lt;/p&gt;

&lt;p&gt;North-south traffic uses the Kubernetes Gateway API: one shared Gateway, and an HTTPRoute per team route. The same resources work with other Gateway API implementations, so teams learn one model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two layers of defense
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Identity.&lt;/strong&gt; Every workload has a SPIFFE identity such as cluster.local/ns/orders/sa/checkout. Each team namespace starts with a default-deny policy and allows only the callers listed in its values file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;allowFrom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;payments&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;istio-ingress&lt;/span&gt;
    &lt;span class="na"&gt;serviceAccounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;public-istio&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;orders&lt;/span&gt;
    &lt;span class="na"&gt;serviceAccounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Transport.&lt;/strong&gt; A mesh-wide PeerAuthentication enforces STRICT mTLS, and a NetworkPolicy in every enrolled namespace admits only mesh traffic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15008&lt;/span&gt; &lt;span class="c1"&gt;# HBONE: the mTLS tunnel between ztunnels
&lt;/span&gt;        &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ipBlock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;169.254.7.127/32&lt;/span&gt; &lt;span class="c1"&gt;# kubelet probes, IPv4
&lt;/span&gt;      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ipBlock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fd16:9254:7127:1337:ffff:ffff:ffff:ffff/128&lt;/span&gt; &lt;span class="c1"&gt;# kubelet probes, IPv6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Istio decides who may connect; the CNI (Calico in our case) makes sure nothing reaches a pod around the mesh.&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-service onboarding
&lt;/h3&gt;

&lt;p&gt;A team writes one values file and opens a pull request. CI renders the three charts with it and validates the result against the Kubernetes, Istio and Gateway API schemas, so a typo fails in the pull request, not in the cluster. After the merge, an Argo CD ApplicationSet creates the team’s Application, and within minutes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the namespace is in ambient mode;&lt;/li&gt;
&lt;li&gt;default-deny and the allow rules are in force;&lt;/li&gt;
&lt;li&gt;the routes are attached to the shared gateway;&lt;/li&gt;
&lt;li&gt;the external hosts are registered as ServiceEntries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Leaving the mesh is the same file with enrolled: false. In the reference implementation the team namespace is also protected from deletion: it carries helm.sh/resource-policy: keep and an Argo CD Delete=false sync option, because a mistake in a GitOps repository should never delete a team's workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  A validation plan as a deliverable
&lt;/h3&gt;

&lt;p&gt;Before the first team joined, I wrote a validation plan: a table of scenarios, each with a command and an expected result.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ingress through the shared gateway;&lt;/li&gt;
&lt;li&gt;a route from a namespace that is not allowed to attach to the gateway;&lt;/li&gt;
&lt;li&gt;east-west traffic from an allowed caller and from an unknown one;&lt;/li&gt;
&lt;li&gt;plain text from outside the mesh;&lt;/li&gt;
&lt;li&gt;egress to an external API and to an external database;&lt;/li&gt;
&lt;li&gt;health probes after enrolment;&lt;/li&gt;
&lt;li&gt;the same checks through a waypoint;&lt;/li&gt;
&lt;li&gt;rollback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It became the most useful document of the project: we ran it after the PoC and before handing the mesh over, it is the checklist for every upgrade, and its output is exactly the evidence an auditor asks for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Details that decide whether it works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NetworkPolicy and ambient.&lt;/strong&gt; Mesh traffic arrives on port 15008, and kubelet probes come from fixed link-local addresses after istio-cni rewrites them. Allow both families of probe addresses, or pods go unready the moment they join the mesh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Waypoints change who the caller is.&lt;/strong&gt; With a waypoint, ztunnel sees the waypoint’s identity, not the original client’s. Put the caller rules on the waypoint, and let ztunnel admit only the waypoint, so nothing can skip it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingress bypasses waypoints by default.&lt;/strong&gt; Label the namespace with istio.io/ingress-use-waypoint=true and enable ENABLE_INGRESS_WAYPOINT_ROUTING in istiod; otherwise ingress traffic misses the L7 policy, and a ztunnel that admits only the waypoint rejects it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Egress is explicit.&lt;/strong&gt; Every external API and database gets a ServiceEntry visible only in its namespace. Databases speak TCP, so test them separately from HTTPS APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No big bang.&lt;/strong&gt; A feature flag for the cluster, an opt-in label per namespace and a one-line rollback made it possible to start with one team and grow without a freeze.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin versions.&lt;/strong&gt; One Istio minor version at a time, the Gateway API CRDs that this Istio release documents, and the validation plan after every upgrade.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Observability and handover
&lt;/h3&gt;

&lt;p&gt;The mesh came with Kiali behind single sign-on, Istio dashboards in the shared Grafana, tracing through waypoints and gateways, and alerts with short runbooks, for example: istiod unavailable, ztunnel not ready on a node, a spike of denied connections, 5xx growth at the gateway.&lt;/p&gt;

&lt;p&gt;At the end, I wrote the HOWTO and handed the mesh over to the platform team as a ready building block.&lt;/p&gt;

&lt;h3&gt;
  
  
  Results
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The service mesh the launch had been waiting for 1.5 years, &lt;strong&gt;delivered in 3 months&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;About ten minutes&lt;/strong&gt; for a team to join, with no application code changes.&lt;/li&gt;
&lt;li&gt;STRICT mTLS and default-deny across the mesh, with a validation plan as evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;p&gt;The reference implementation is on GitHub: &lt;a href="https://github.com/devopsmher/istio-ambient-building-block" rel="noopener noreferrer"&gt;devopsmher/istio-ambient-building-block&lt;/a&gt;. It is a clean-room rewrite of the pattern with no code from the original project: the Terraform module behind the feature flag, the three team charts with JSON schemas, the Argo CD ApplicationSet, the validation plan and the runbooks. Everything renders and validates in CI without a cluster.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Mher Poghosyan is a Senior DevOps &amp;amp; Platform Engineer in Yerevan, Armenia. He builds Kubernetes platforms on AWS and GCP.&lt;/em&gt; &lt;a href="https://www.linkedin.com/in/mher-poghosyan/" rel="noopener noreferrer"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt; &lt;em&gt;·&lt;/em&gt; &lt;a href="https://github.com/devopsmher" rel="noopener noreferrer"&gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/a&gt; _· &lt;em&gt;[_Medium&lt;/em&gt;](&lt;a href="https://medium.com/@mher.poghosyan" rel="noopener noreferrer"&gt;https://medium.com/@mher.poghosyan&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>istio</category>
      <category>kubernetes</category>
      <category>calico</category>
      <category>servicemesh</category>
    </item>
    <item>
      <title>From 2–3 days to 30 minutes: an internal IaC platform with Terragrunt stacks</title>
      <dc:creator>Mher Poghosyan</dc:creator>
      <pubDate>Sat, 14 Nov 2026 22:59:00 +0000</pubDate>
      <link>https://dev.to/mher_poghosyan/from-2-3-days-to-30-minutes-an-internal-iac-platform-with-terragrunt-stacks-4ibi</link>
      <guid>https://dev.to/mher_poghosyan/from-2-3-days-to-30-minutes-an-internal-iac-platform-with-terragrunt-stacks-4ibi</guid>
      <description>&lt;h2&gt;
  
  
  From 2–3 days to 30 minutes: an internal IaC platform with Terragrunt stacks
&lt;/h2&gt;

&lt;p&gt;A new team needed an AWS environment: an account baseline, a VPC, DNS, an EKS cluster, GitOps, monitoring, security settings. A DevOps engineer spent two to three days on it: copying folders from another team's live repository, renaming things, hunting for the one value that was different last time.&lt;/p&gt;

&lt;p&gt;Today the same team writes about fifteen lines, opens a pull request and has a working environment about thirty minutes after the merge. Most of that time is EKS creating its control plane.&lt;/p&gt;

&lt;p&gt;Here is how the platform is built, what I learned while building it, and a clean-room reference implementation you can read and run: &lt;a href="https://github.com/devopsmher/terragrunt-platform" rel="noopener noreferrer"&gt;github.com/devopsmher/terragrunt-platform&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where we started
&lt;/h2&gt;

&lt;p&gt;The company had more than seventy DevOps engineers spread across domain teams. Every team had its own Terraform, and most of it had been copied from another team at some point.&lt;/p&gt;

&lt;p&gt;That worked until it didn't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Copies drifted.&lt;/strong&gt; Two environments built from "the same" code had different subnet layouts, different tags, different IAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modules floated.&lt;/strong&gt; &lt;code&gt;ref=main&lt;/code&gt; was common, so a change in a shared module reached production on the next plan, unreviewed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bootstrap was manual.&lt;/strong&gt; State buckets, CI credentials, DNS delegation: a checklist in someone's head.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reviews were useless.&lt;/strong&gt; When every environment is a few thousand lines of copied code, nobody reads the diff.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I wanted instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Self-service.&lt;/strong&gt; A team describes what it needs; it does not write Terraform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The same result every time.&lt;/strong&gt; One definition of "a team environment", not twenty variations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioned and reviewable.&lt;/strong&gt; Every change to an environment is a small diff with a plan attached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure by default.&lt;/strong&gt; No long-lived keys in CI, no "admin because it was easier".&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Four layers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;live repository  →  stack  →  units  →  modules  →  AWS
  values only       composition  contracts  Terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Modules&lt;/strong&gt; are plain Terraform. Mostly thin wrappers over well-known modules from &lt;code&gt;terraform-aws-modules&lt;/code&gt;, pinned to exact versions, with our defaults on top: tags, subnet layout, access rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Units&lt;/strong&gt; wrap one module each and add a contract: which values the unit needs, which outputs it gives, which other units it depends on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stacks&lt;/strong&gt; compose units into a product. In the reference implementation that product is &lt;code&gt;team-environment&lt;/code&gt;: account baseline, network, DNS and EKS with Karpenter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live repositories&lt;/strong&gt; belong to domain teams. They hold values and a pinned release, nothing else.&lt;/p&gt;

&lt;p&gt;This is a whole environment from the team's side:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;stack&lt;/span&gt; &lt;span class="s2"&gt;"platform"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${local.catalog}//stacks/team-environment?ref=${local.version}"&lt;/span&gt;
  &lt;span class="n"&gt;path&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"platform"&lt;/span&gt;

  &lt;span class="n"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;catalog&lt;/span&gt;            &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;catalog&lt;/span&gt;
    &lt;span class="n"&gt;version&lt;/span&gt;            &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;
    &lt;span class="n"&gt;team&lt;/span&gt;               &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"payments"&lt;/span&gt;
    &lt;span class="n"&gt;environment&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dev"&lt;/span&gt;
    &lt;span class="n"&gt;cidr&lt;/span&gt;               &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"10.20.0.0/16"&lt;/span&gt;
    &lt;span class="n"&gt;zone_name&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"payments-dev.example.com"&lt;/span&gt;
    &lt;span class="n"&gt;kubernetes_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"1.35"&lt;/span&gt;
    &lt;span class="n"&gt;github_repository&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"example-org/payments-live"&lt;/span&gt;
    &lt;span class="n"&gt;state_bucket&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"tfstate-${local.env.locals.account_id}-${local.env.locals.region}"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terragrunt stacks made this possible without a custom generator: &lt;code&gt;terragrunt stack generate&lt;/code&gt; expands the stack into units, and &lt;code&gt;terragrunt stack run plan&lt;/code&gt; runs them in dependency order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contracts between layers
&lt;/h2&gt;

&lt;p&gt;The most useful decision was to treat every boundary as a contract and write it down where people look first: at the top of the unit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Unit: eks — cluster, system node group and Karpenter with interruption handling.&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Contract&lt;/span&gt;
&lt;span class="c1"&gt;#   values in : catalog, version, name, kubernetes_version, network_path, account_baseline_path, tags&lt;/span&gt;
&lt;span class="c1"&gt;#   needs     : network.vpc_id, network.private_subnet_ids, network.intra_subnet_ids,&lt;/span&gt;
&lt;span class="c1"&gt;#               account_baseline.apply_role_arn&lt;/span&gt;
&lt;span class="c1"&gt;#   outputs   : cluster_name, cluster_endpoint, oidc_provider_arn, karpenter_queue_name, ...&lt;/span&gt;

&lt;span class="n"&gt;dependency&lt;/span&gt; &lt;span class="s2"&gt;"network"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;config_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;network_path&lt;/span&gt;

  &lt;span class="n"&gt;mock_outputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;vpc_id&lt;/span&gt;             &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"vpc-00000000000000000"&lt;/span&gt;
    &lt;span class="n"&gt;private_subnet_ids&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"subnet-00000000000000001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"subnet-00000000000000002"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"subnet-00000000000000003"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;intra_subnet_ids&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"subnet-00000000000000004"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"subnet-00000000000000005"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"subnet-00000000000000006"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;mock_outputs_allowed_terraform_commands&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"init"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"validate"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"plan"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things make the contract real rather than decorative:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Missing values fail early.&lt;/strong&gt; A stack that forgets a value fails at generation time, not twenty minutes into an apply.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mock outputs only for planning.&lt;/strong&gt; A brand-new environment can be planned before its VPC exists, but mocks are never allowed for &lt;code&gt;apply&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict input validation in CI.&lt;/strong&gt; &lt;code&gt;terragrunt hcl validate --inputs --strict&lt;/code&gt; fails if a unit passes an input its module does not declare, or misses one it needs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Renaming an output is a breaking change, and the version number says so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Versions and release discipline
&lt;/h2&gt;

&lt;p&gt;The catalog (modules, units and stacks) is released together under one semver tag:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MAJOR&lt;/strong&gt;: a breaking contract change or a resource replacement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MINOR&lt;/strong&gt;: a new optional value or a new unit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PATCH&lt;/strong&gt;: a fix that changes no contract.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Live repositories pin an exact tag. An upgrade is a one-line pull request: &lt;code&gt;dev&lt;/code&gt; first, read the plan, then &lt;code&gt;prod&lt;/code&gt;. A small script in CI rejects anything that floats: branches, missing refs, version ranges for registry modules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./live/payments/dev/terragrunt.stack.hcl:6: version is not a release tag (vX.Y.Z)
./units/dns/terragrunt.hcl:12: source is not pinned with ?ref=${values.version}
./modules/network/main.tf:21: module version is not exact (X.Y.Z)
pinning check failed: see the lines above
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It sounds strict. In practice it removed a whole class of "nobody changed anything, but the plan is different" incidents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan in the pull request, apply after merge, no keys
&lt;/h2&gt;

&lt;p&gt;CI has no AWS keys. Every account gets two roles from the &lt;code&gt;account-baseline&lt;/code&gt; unit, and GitHub Actions exchanges its OIDC token for short-lived credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan role&lt;/strong&gt;: read-only, trusted for pull requests of the team's live repository. With S3 native locking it can still write the &lt;code&gt;.tflock&lt;/code&gt; file it needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply role&lt;/strong&gt;: trusted only for jobs that run in the protected GitHub environment of that account, for example &lt;code&gt;payments-dev&lt;/code&gt;, which requires an approval.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Trusting an environment instead of a branch matters: a workflow edited inside a pull request still cannot assume the apply role, because its job never passes the environment's protection rules.&lt;/p&gt;

&lt;p&gt;A pull request that touches &lt;code&gt;live/payments/dev&lt;/code&gt; plans only that environment. A change to the shared &lt;code&gt;root.hcl&lt;/code&gt; plans every environment. Each environment gets its own job, its own role and its own concurrency group.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick start that a team can actually follow
&lt;/h2&gt;

&lt;p&gt;The platform is only self-service if a team can use it without asking the platform team. The documentation was part of the product from day one, written in two languages, with a quick start of four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy the example environment directory and change the values.&lt;/li&gt;
&lt;li&gt;Bootstrap once: an admin applies the account baseline, which creates the state bucket and the CI roles.&lt;/li&gt;
&lt;li&gt;Open a pull request: CI plans; merge and approve: CI applies.&lt;/li&gt;
&lt;li&gt;Delegate the DNS zone from the parent domain.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The one manual step, bootstrap, is written down explicitly instead of hidden. Pretending there is no chicken-and-egg problem does not make it go away.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A new team environment: &lt;strong&gt;from 2–3 days to about 30 minutes&lt;/strong&gt;, most of it EKS.&lt;/li&gt;
&lt;li&gt;Every environment comes from the same versioned definition; differences are visible as values, not as code.&lt;/li&gt;
&lt;li&gt;Upgrades are one-line pull requests with a plan.&lt;/li&gt;
&lt;li&gt;I designed and built the platform on my own in under four months: modules, stacks, contracts, CI and documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start from contracts, not modules.&lt;/strong&gt; Deciding what a unit takes and gives was harder and more important than any Terraform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep stacks thin.&lt;/strong&gt; Composition belongs in stacks; logic belongs in modules, where it can be tested.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin everything, including your own catalog.&lt;/strong&gt; If your own code floats, nobody will take pinning seriously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mocks are for planning only.&lt;/strong&gt; Allowing them for apply turns a missing dependency into a broken environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation is part of the platform.&lt;/strong&gt; The quick start removed more support requests than any feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Working with an AI coding agent, with guardrails
&lt;/h2&gt;

&lt;p&gt;I used Claude Code as a pair engineer through the whole project: module and stack code, CI scripts, merge request reviews, documentation and its translation. It also had read access to Jira, Confluence and Kubernetes through MCP.&lt;/p&gt;

&lt;p&gt;The rules were simple and non-negotiable: the agent had read-only access to clouds and clusters, it never ran &lt;code&gt;apply&lt;/code&gt;, and every change was reviewed by me before commit. With those rules, an agent made me faster without taking any decision about production away from a human.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The reference implementation is on GitHub: &lt;a href="https://github.com/devopsmher/terragrunt-platform" rel="noopener noreferrer"&gt;devopsmher/terragrunt-platform&lt;/a&gt;. It is a clean-room rewrite of the pattern and contains no code from the original project. Every module passes &lt;code&gt;terraform validate&lt;/code&gt;, the example stack generates and passes strict input validation, and the CI workflows are ready for a real account.&lt;/p&gt;

&lt;p&gt;Next in the platform: handing every new cluster over to GitOps right after creation.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Mher Poghosyan is a Senior DevOps &amp;amp; Platform Engineer in Yerevan, Armenia. He builds Kubernetes platforms on AWS and GCP. &lt;a href="https://www.linkedin.com/in/mher-poghosyan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; · &lt;a href="https://github.com/devopsmher" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>aws</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Can AI Ever Replace Priests in the Armenian Apostolic Church?</title>
      <dc:creator>Mher Poghosyan</dc:creator>
      <pubDate>Tue, 04 Mar 2025 19:38:29 +0000</pubDate>
      <link>https://dev.to/mher_poghosyan/can-ai-ever-replace-priests-in-the-armenian-apostolic-church-1f8g</link>
      <guid>https://dev.to/mher_poghosyan/can-ai-ever-replace-priests-in-the-armenian-apostolic-church-1f8g</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcenkghpluqrh4iwo2oag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcenkghpluqrh4iwo2oag.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In an era where artificial intelligence is revolutionizing every industry, one question remains: Are there roles that AI will never be able to replace? One such role is that of a priest in the Armenian Apostolic Church. Let’s explore why AI will never take on this sacred responsibility.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Requirement of Baptism and the Soul
&lt;/h3&gt;

&lt;p&gt;Becoming a priest in the Armenian Apostolic Church requires baptism, which is a sacred rite that signifies spiritual rebirth.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI cannot be baptized&lt;/strong&gt;  — It is not a living being and does not possess a soul.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faith in the immortality of the soul&lt;/strong&gt;  — Christianity teaches that every human has a soul that continues after death. Since AI has no soul, it cannot fully participate in religious sacraments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The Necessity of Genuine Faith
&lt;/h3&gt;

&lt;p&gt;A priest is not just a religious scholar; he is a believer who dedicates his life to God.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI cannot believe in God&lt;/strong&gt;  — Faith is not a function of data processing; it is a deeply personal experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A priest’s role is not just intellectual but spiritual&lt;/strong&gt;  — AI may generate religious texts, but it will never experience faith or devotion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Spiritual Guidance and Emotional Connection
&lt;/h3&gt;

&lt;p&gt;A crucial part of being a priest is guiding people through their spiritual journeys, offering emotional and moral support.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI lacks true empathy&lt;/strong&gt;  — While AI can analyze emotions and respond accordingly, it does not feel or understand human struggles on a personal level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A priest shares his personal journey of faith&lt;/strong&gt;  — Faith is lived and experienced, not just learned. AI cannot form a genuine connection with believers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. The Divine Nature of Priesthood
&lt;/h3&gt;

&lt;p&gt;According to Christian teachings, a soul is given by God at birth.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI is not born naturally&lt;/strong&gt;  — It is created by humans, not by divine will.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Without a soul, AI cannot serve as a priest&lt;/strong&gt;  — The role of a priest is not just about knowledge; it’s about spiritual existence and divine calling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion: AI Will Never Replace Priests
&lt;/h3&gt;

&lt;p&gt;The Armenian Apostolic Church is more than an institution — it is a living faith that has been passed down for generations. AI may assist with translations, research, and religious education, but it will never replace the role of a priest.&lt;/p&gt;

&lt;p&gt;Priesthood is not just about delivering sermons — it is about faith, soul, and divine connection. And these are things no machine can ever truly possess.&lt;/p&gt;

&lt;p&gt;👉 What do you think? Are there other fields where AI will never replace humans? Let’s discuss in the comments!&lt;/p&gt;

&lt;h1&gt;
  
  
  ArtificialIntelligence #Faith #Religion #Technology #ArmenianApostolicChurch
&lt;/h1&gt;

</description>
      <category>church</category>
      <category>ai</category>
      <category>apostolic</category>
      <category>armenia</category>
    </item>
    <item>
      <title>Может ли ИИ заменить священников в Армянской Апостольской Церкви?</title>
      <dc:creator>Mher Poghosyan</dc:creator>
      <pubDate>Tue, 04 Mar 2025 19:34:07 +0000</pubDate>
      <link>https://dev.to/mher_poghosyan/mozhiet-li-ii-zamienit-sviashchiennikov-v-armianskoi-apostolskoi-tsierkvi-k6n</link>
      <guid>https://dev.to/mher_poghosyan/mozhiet-li-ii-zamienit-sviashchiennikov-v-armianskoi-apostolskoi-tsierkvi-k6n</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcenkghpluqrh4iwo2oag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcenkghpluqrh4iwo2oag.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;В эпоху искусственного интеллекта многие профессии подвергаются автоматизации. Однако религия, особенно такие древние традиции, как Армянская Апостольская Церковь, ставит перед ИИ непреодолимые барьеры. Давайте разберем, почему искусственный интеллект никогда не сможет заменить священников этой церкви.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Таинство крещения и душа
&lt;/h3&gt;

&lt;p&gt;Чтобы стать священником в Армянской Апостольской Церкви, человек должен быть крещён. Крещение — это не просто ритуал, а духовное перерождение, в ходе которого человек принимает Святой Дух и становится частью Церкви.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ИИ не может быть крещён&lt;/strong&gt; : он не рождается, не имеет физического тела, и, главное, не обладает душой.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Вера в бессмертную душу&lt;/strong&gt; : Церковь учит, что у каждого человека есть душа, которая продолжает существовать после смерти. ИИ не обладает душой, следовательно, он не может участвовать в духовных таинствах.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Вера в Бога и Троицу
&lt;/h3&gt;

&lt;p&gt;Священник не просто исполняет ритуалы — он верит в Бога, Троицу (Отца, Сына и Святого Духа) и следует канонам Церкви.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ИИ не может верить&lt;/strong&gt; : вера — это осознанное, внутреннее чувство, а не алгоритмическая обработка информации. Даже если ИИ сможет цитировать Библию или вести богословские дискуссии, это не будет выражением личной веры.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Духовное наставничество
&lt;/h3&gt;

&lt;p&gt;Священник не просто читает молитвы и проводит обряды — он является духовным наставником, помогает людям найти смысл жизни, справляться с трудностями и укреплять веру.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ИИ не может проявлять истинное сочувствие&lt;/strong&gt; : Он может анализировать эмоции, предлагать советы, но это останется имитацией. Священник же сопереживает на глубинном уровне, потому что сам является частью общины и носителем духовного опыта.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Священник делится личной верой&lt;/strong&gt; : Опыт служения Богу, молитвы и жизни в вере нельзя воспроизвести алгоритмом.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Бог дает душу человеку
&lt;/h3&gt;

&lt;p&gt;Согласно христианскому учению, душа даётся человеку Богом в момент рождения.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ИИ не рождается естественным путём&lt;/strong&gt; : Его не создаёт Бог, а разрабатывают программисты.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Отсутствие души делает невозможным духовное служение&lt;/strong&gt; : Священник — это не просто носитель знаний о религии, а человек, который живёт духовной жизнью и соединён с Богом.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Вывод: ИИ никогда не заменит священников
&lt;/h3&gt;

&lt;p&gt;Армянская Апостольская Церковь — это не просто организация, а живая вера, передающаяся из поколения в поколение. Искусственный интеллект может быть полезен в анализе текстов, переводе религиозных книг или даже в создании виртуальных помощников для изучения Библии, но он никогда не заменит священника.&lt;/p&gt;

&lt;p&gt;Священство — это призвание, связанное с духовностью, душой и верой, которые неподвластны алгоритмам. ИИ может стать инструментом, но не носителем веры.&lt;/p&gt;

</description>
      <category>armenia</category>
      <category>church</category>
      <category>apostolic</category>
      <category>ai</category>
    </item>
    <item>
      <title>GitHub Actions Manual Approval via Telegram</title>
      <dc:creator>Mher Poghosyan</dc:creator>
      <pubDate>Mon, 03 Mar 2025 07:25:25 +0000</pubDate>
      <link>https://dev.to/mher_poghosyan/github-actions-manual-approval-via-telegram-2j1a</link>
      <guid>https://dev.to/mher_poghosyan/github-actions-manual-approval-via-telegram-2j1a</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi0t88vh3ripynek5bjsx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi0t88vh3ripynek5bjsx.jpeg" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Approval via Telegram&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In CI/CD workflows, especially those involving &lt;strong&gt;production deployments&lt;/strong&gt; , an extra layer of approval can be crucial. Using &lt;strong&gt;Telegram Manual Approval&lt;/strong&gt; for GitHub Actions allows workflows to &lt;strong&gt;pause until an explicit approval or rejection is given via Telegram&lt;/strong&gt;. This article walks through &lt;strong&gt;setup, configuration, and usage&lt;/strong&gt; of this approach to ensure controlled and secure deployments.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why Use Telegram Manual Approval?
&lt;/h3&gt;

&lt;p&gt;GitHub Actions enables automation, but sometimes manual intervention is needed before proceeding with sensitive operations like &lt;strong&gt;deployments&lt;/strong&gt;. With &lt;strong&gt;Telegram Manual Approval&lt;/strong&gt; , you can:&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Pause the workflow&lt;/strong&gt; until an approval or rejection is received.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Grant specific users the ability to approve or reject&lt;/strong&gt; the workflow.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Enhance security and reduce deployment risks.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Automate approval requests via Telegram messages.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;When the workflow reaches the &lt;strong&gt;telegram-manual-approval&lt;/strong&gt; step, it sends a &lt;strong&gt;customizable message&lt;/strong&gt; to a specified &lt;strong&gt;Telegram chat&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The message includes &lt;strong&gt;Approve&lt;/strong&gt; and &lt;strong&gt;Reject&lt;/strong&gt;  buttons.&lt;/li&gt;
&lt;li&gt;A user with the appropriate permissions can &lt;strong&gt;click on the buttons&lt;/strong&gt; to either:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Approve:&lt;/strong&gt; The workflow continues execution.&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Reject:&lt;/strong&gt; The workflow fails and stops.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Setup Guide
&lt;/h3&gt;
&lt;h3&gt;
  
  
  1️⃣ Create a Telegram Bot
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open Telegram and &lt;strong&gt;search for&lt;/strong&gt; &lt;a class="mentioned-user" href="https://dev.to/botfather"&gt;@botfather&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Use the command /newbot to &lt;strong&gt;create a bot&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Save the API token&lt;/strong&gt; provided by BotFather.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2️⃣ Get Your Telegram Chat ID
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use @getmyid_bot in Telegram to &lt;strong&gt;retrieve your chat ID&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3️⃣ Store Secrets in GitHub
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to &lt;strong&gt;GitHub Repository → Settings → Secrets and Variables → Actions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Save:&lt;/li&gt;
&lt;li&gt;TELEGRAM_KEY → &lt;strong&gt;Your bot’s API key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;TELEGRAM_CHAT_ID → &lt;strong&gt;Your Telegram chat ID&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  How to Use the Action in GitHub Actions
&lt;/h3&gt;

&lt;p&gt;Add the following step to your &lt;strong&gt;GitHub Actions workflow file&lt;/strong&gt; (.github/workflows/deploy.yml):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;khasanovbi/telegram-manual-approval@v0.0.2&lt;/span&gt;
    &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;telegram-key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.TELEGRAM_KEY }}&lt;/span&gt;
      &lt;span class="na"&gt;telegram-chat-id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ vars.TELEGRAM_CHAT_ID }}&lt;/span&gt;
      &lt;span class="na"&gt;github-to-telegram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="na"&gt;githubUsername&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;telegramUsername&lt;/span&gt;
          &lt;span class="na"&gt;anotherGitHubUsername&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;
      &lt;span class="na"&gt;approvers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;githubUsername&lt;/span&gt;
      &lt;span class="na"&gt;super-approvers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;anotherGitHubUsername&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Explanation of Parameters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;telegram-key&lt;/strong&gt; → The Telegram bot token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;telegram-chat-id&lt;/strong&gt; → The chat ID where the approval request is sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;github-to-telegram&lt;/strong&gt; → Maps GitHub usernames to Telegram usernames or IDs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;approvers&lt;/strong&gt; → GitHub users allowed to approve/reject deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;super-approvers&lt;/strong&gt; → Users with elevated privileges (can override settings).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Message Text Customization
&lt;/h3&gt;

&lt;p&gt;You can personalize &lt;strong&gt;approval/rejection messages&lt;/strong&gt; and buttons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="n"&gt;approval&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"%%actor%% wants to deploy %%github_ref_url%% to production."&lt;/span&gt;
&lt;span class="n"&gt;approve&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"✅ Approve"&lt;/span&gt;
&lt;span class="n"&gt;reject&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"❌ Reject"&lt;/span&gt;
&lt;span class="n"&gt;approved&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"✅ Approved by %%approver%%"&lt;/span&gt;
&lt;span class="n"&gt;rejected&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"❌ Rejected by %%approver%%"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Available Template Variables
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;%%actor%%&lt;/strong&gt; → The user who triggered the workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;%%approver%%&lt;/strong&gt; → The user who approved or rejected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;%%github_ref_url%%&lt;/strong&gt; → URL to the GitHub branch/tag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;%%workflow_run_url%%&lt;/strong&gt; → URL to the workflow run.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example: Deployment Workflow with Approval
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Release&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Environment'&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;stage&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;environment&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.environment }}&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;khasanovbi/telegram-manual-approval@v0.0.2&lt;/span&gt;
        &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inputs.environment == 'prod'&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;telegram-key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'${{ secrets.TELEGRAM_KEY }}'&lt;/span&gt;
          &lt;span class="na"&gt;telegram-chat-id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'${{ vars.TELEGRAM_CHAT_ID }}'&lt;/span&gt;
          &lt;span class="na"&gt;github-to-telegram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
              &lt;span class="na"&gt;githubUsername&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;telegramUsername&lt;/span&gt;
              &lt;span class="na"&gt;anotherGitHubUsername&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;
          &lt;span class="na"&gt;approvers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
              &lt;span class="s"&gt;githubUsername&lt;/span&gt;
          &lt;span class="na"&gt;super-approvers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
              &lt;span class="s"&gt;anotherGitHubUsername&lt;/span&gt;

      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run deploy&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;echo "Deploying..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What Happens Here?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The workflow is manually triggered (workflow_dispatch).&lt;/li&gt;
&lt;li&gt;If the environment is &lt;strong&gt;‘prod’&lt;/strong&gt; , the Telegram approval request is sent.&lt;/li&gt;
&lt;li&gt;The deployment &lt;strong&gt;pauses&lt;/strong&gt; until an approval is received.&lt;/li&gt;
&lt;li&gt;Once approved, the deployment continues (Run deploy).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Using &lt;strong&gt;Telegram Manual Approval&lt;/strong&gt; adds an extra layer of &lt;strong&gt;security and control&lt;/strong&gt; to GitHub Actions workflows. This is particularly useful for &lt;strong&gt;critical deployments&lt;/strong&gt; where an extra review step is necessary.&lt;/p&gt;

&lt;p&gt;By integrating Telegram approvals, teams can:&lt;br&gt;&lt;br&gt;
✔ Ensure &lt;strong&gt;controlled deployments&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
✔ Improve &lt;strong&gt;team collaboration&lt;/strong&gt; through chat-based approvals.&lt;br&gt;&lt;br&gt;
✔ Reduce the risk of &lt;strong&gt;accidental deployments&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹 &lt;strong&gt;Try it out and enhance your GitHub CI/CD workflows today!&lt;/strong&gt;  🚀&lt;/p&gt;

</description>
      <category>approval</category>
      <category>githubactions</category>
      <category>continuousdelivery</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
