<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashwin Kumar Naik on Medium]]></title>
        <description><![CDATA[Stories by Ashwin Kumar Naik on Medium]]></description>
        <link>https://medium.com/@ashwinkumarnaik91?source=rss-72c3bcf586e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_x32j-XPlSrkpHcUQ8aF_w.jpeg</url>
            <title>Stories by Ashwin Kumar Naik on Medium</title>
            <link>https://medium.com/@ashwinkumarnaik91?source=rss-72c3bcf586e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:59:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashwinkumarnaik91/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Alloy DB Terraform Module]]></title>
            <link>https://medium.com/google-cloud/alloy-db-terraform-module-b427ae079ea?source=rss-72c3bcf586e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b427ae079ea</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[alloydb]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Ashwin Kumar Naik]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 11:19:37 GMT</pubDate>
            <atom:updated>2023-04-11T11:19:37.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dI6mtMksIyFOQr1qMTASZw.jpeg" /></figure><p><em>This </em><strong><em>blog</em></strong><em> gives an high level overview of </em><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db"><em>terraform-google-alloy-db</em></a> <em>module. Apart from this we will show some examples of usage of the module in different configurations.</em></p><h3>Introduction</h3><p>AlloyDB is a completely managed, PostgreSQL-compatible database for demanding OLTP and OLAP Systems. This product delivers enterprise-grade performance and availability, without sacrificing compatibility with open-source PostgreSQL. That means you can get the best of both worlds: the power and reliability of a commercial database, with the flexibility and cost-effectiveness of open source software.</p><h4>Clusters</h4><p>An Alloy DB cluster contains all the resources for a PostgreSQL deployment.As the top-level resource in AlloyDB, clusters are the main unit of resource management, enabling administrators to monitor performance and configure policies and features across multiple instances simply.</p><h4>Primary instances</h4><p>A primary instance provides the read/write connection point for the databases in a cluster. Every cluster has one primary instance.</p><h4>Read pool instances</h4><p>A read pool instance provides a read only connection point for database data in a cluster. You can create multiple read pool instances in a cluster, and you can scale each one’s computing capacity individually.</p><p>You are not required to have any read pool instances in a cluster, but they provide better support for data analytics workloads than do primary instances.</p><h3>Pre Requisites</h3><ul><li>Basic Understanding of T<em>erraform</em></li><li>Access to <em>Google Cloud Platform</em> .</li><li><a href="https://console.cloud.google.com/flows/enableapi?apiid=alloydb.googleapis.com,compute.googleapis.com,cloudresourcemanager.googleapis.com,servicenetworking.googleapis.com&amp;_ga=2.95637716.999325796.1681108978-295761177.1680713403">Enable the APIs</a> , AlloyDB, Compute Engine, Resource Manager, and Service Networking APIs.</li></ul><h3>Terraform Module Details</h3><p>Below are the variables necessary to run the terraform alloy-db <a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db">module</a>.</p><blockquote>Refer <a href="https://developer.hashicorp.com/terraform/tutorials/modules/module-use">this</a> tutorial which shows how use a terraform module in your terraform code.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fce48646d7bc8b5b4f44c6321c891fb6/href">https://medium.com/media/fce48646d7bc8b5b4f44c6321c891fb6/href</a></iframe><h4>Configuring AlloyDB Primary Instance</h4><p><em>Terraform</em> variable schema to configure the AlloyDB Primary Instance is shown below.</p><pre>object({<br>    instance_id       = string,     # Name of Alloy DB Instance<br>    instance_type     = string,     # Instance type PRIMARY || READ_POOL<br>    machine_cpu_count = number,     # The number of CPU&#39;s in the VM instance.<br>    display_name      = string,     # Display Name of Alloy DB Instance<br>    database_flags    = map(string) # Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.<br>  }</pre><p><strong>Example : </strong>Below is an example to configure the primary instance variable.</p><pre>{<br>    instance_id       = &quot;primary-instance&quot;,<br>    instance_type     = &quot;PRIMARY&quot;,<br>    machine_cpu_count = 2,<br>    database_flags    = {},<br>    display_name      = &quot;alloydb-primary-instance&quot;<br>}</pre><h4>Configuring AlloyDB ReadPool Instance</h4><p><em>Terraform</em> variable schema to configure the AlloyDB Read-Pool Instances is shown below.</p><pre>list(object({<br>    instance_id       = string, # Name of Alloy DB Instance<br>    display_name      = string, # Display Name of Alloy DB Instance<br>    instance_type     = string, # Instance type PRIMARY || READ_POOL<br>    node_count        = number, # Read capacity, i.e. number of nodes in a read pool instance.<br>    database_flags    = map(string),  # Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.<br>    availability_type = string, # Availability type of an Instance. Defaults to REGIONAL for both primary and read instances. Note that primary and read instances can have different availability types. Possible values are AVAILABILITY_TYPE_UNSPECIFIED, ZONAL, and REGIONAL.<br>    ZONE              = string, # The Compute Engine zone that the instance should serve from,<br>    machine_cpu_count = number  # The number of CPU&#39;s in the VM instance.<br>  })</pre><p><strong>Example : </strong>Below is an example to configure the read pool instances variable.</p><pre>[<br>    {<br>      instance_id       = &quot;read-instance-1&quot;,<br>      display_name      = &quot;read-instance-1&quot;,<br>      instance_type     = &quot;READ_POOL&quot;,<br>      node_count        = 1,<br>      database_flags    = {},<br>      availability_type = &quot;ZONAL&quot;,<br>      ZONE              = &quot;us-central1-a&quot;,<br>      machine_cpu_count = 1<br>    }<br>]</pre><h4>Configuring Backup</h4><p><em>Terraform</em> variable schema for configuring AlloyDB Cluster backup is shown below.</p><pre>object({<br>    location      = optional(string), # Backup Location<br>    backup_window = optional(string), # Backup Windows in Seconds<br>    enabled       = optional(bool),   # Backup Enabled Flag<br>    weekly_schedule = object({.       # Backup Weekly Schedule<br>      days_of_week = optional(list(string)),<br>      start_times  = list(string),<br>    }),<br>    quantity_based_retention_count = optional(number), # Number of Backups to retain<br>    time_based_retention_count     = optional(string), # Number of Backups to retain by time<br>    labels                         = optional(map(string)) # Labels for Backup<br>  }</pre><p><strong>Example : </strong>Below is an example to configure the backup variable.</p><pre>{<br>    location      = &quot;us-central1&quot;<br>    backup_window = &quot;1800s&quot;,<br>    enabled       = true,<br>    weekly_schedule = {<br>      days_of_week = [&quot;FRIDAY&quot;],<br>      start_times  = [&quot;2:00:00:00&quot;, ]<br>    }<br>    quantity_based_retention_count = 1,<br>    time_based_retention_count     = null,<br>    labels = {<br>      test = &quot;alloydb-cluster&quot;<br>    },<br>  }</pre><h3>Module Usage Examples</h3><h4>AlloyDB with Primary Instance only</h4><p>Refer the below repo for the example usage of the module to deploy AlloyDB cluster with primary instance only.</p><p><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db/tree/main/examples/example_with_primary_instance">terraform-google-alloy-db/examples/example_with_primary_instance at main · GoogleCloudPlatform/terraform-google-alloy-db</a></p><p>Below is the architecture of the alloy db with primary instance only .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*OKZT1pVh5Hu5yN507OIvmA.png" /><figcaption><strong>Alloy DB with Primary Instance</strong></figcaption></figure><h4>AlloyDB with Multiple Read Pool Instances</h4><p>Refer the below repo for the example usage of the module to deploy AlloyDB cluster with primary instance and multiple read-pool instances.</p><p><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db/tree/main/examples/example_with_multiple_readpool">terraform-google-alloy-db/examples/example_with_multiple_readpool at main · GoogleCloudPlatform/terraform-google-alloy-db</a></p><p>Below is the architecture of the AlloyDB with primary instance and multiple read-pool instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ci4lgTjeL-8Gn5uIqHPNyA.png" /><figcaption><strong>Alloy DB with Multiple Readpool Instance</strong></figcaption></figure><h4>AlloyDB with Backup Enabled</h4><p>Refer the below repo for the example usage of the module to deploy AlloyDB cluster with primary instance and Backup enabled.</p><p><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db/tree/main/examples/simple_example">terraform-google-alloy-db/examples/simple_example at main · GoogleCloudPlatform/terraform-google-alloy-db</a></p><h3>Conclusion</h3><p><em>In conclusion users can use </em><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db"><em>terraform-google-alloy-db</em></a> <em>to deploy an alloy DB Cluster. Examples shown above should help users implement the Alloy DB Cluster with different configuration.</em></p><p><em>If there are any concerns or issues with </em><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db"><em>terraform-google-alloy-db</em></a><strong><em> </em></strong><em>module</em><strong><em> </em></strong><em>kindly raise an issue </em><a href="https://github.com/GoogleCloudPlatform/terraform-google-alloy-db/issues/new"><em>here</em></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b427ae079ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/alloy-db-terraform-module-b427ae079ea">Alloy DB Terraform Module</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Cloud Workflows Terraform Module]]></title>
            <link>https://medium.com/google-cloud/google-cloud-workflows-terraform-module-cfe91a257cf?source=rss-72c3bcf586e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfe91a257cf</guid>
            <category><![CDATA[gcp-workflows]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gcp-app-dev]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[eventarc]]></category>
            <dc:creator><![CDATA[Ashwin Kumar Naik]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 14:25:39 GMT</pubDate>
            <atom:updated>2022-12-04T14:25:39.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*lpoJhV99LLwKx1DXeafzAQ.png" /></figure><p><em>This </em><strong><em>blog</em></strong><em> gives an high level overview of </em><a href="http://terraform-google-cloud-workflows/"><em>terraform-google-cloud-workflows</em></a><em> module. In this blog we will showcase some use cases where this module can be used. Apart from this we will show some examples of using the module.</em></p><h3>Introduction</h3><p>Customers who want to implement IT process automation, Business process automation, App integration &amp; micro-service orchestration , Data and ML pipelines on GCP can implement it using <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows">Cloud Workflows Terraform module</a>.This module deploys a Cloud Workflow on GCP which can be triggered by a <a href="https://cloud.google.com/scheduler">Cloud Scheduler</a> or based on an <a href="https://cloud.google.com/eventarc">Event Arc</a> Trigger. This will benefit the users by combining Google Cloud services and APIs to build reliable applications, process automation, and data and machine learning pipelines , following the Infrastructure as Code principles.</p><ul><li><a href="https://cloud.google.com/workflows/docs/overview"><strong>Google Cloud Workflows</strong></a> is a fully-managed orchestration platform that executes services in an order that you define: a <em>workflow</em>. These workflows can combine services including custom services hosted on Google Cloud services like Cloud Run,Cloud Functions, Cloud Vision AI, BigQuery etc. OR any HTTP-based API.</li><li><a href="https://cloud.google.com/scheduler"><strong>Cloud Scheduler</strong></a> is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more.</li><li><a href="https://cloud.google.com/eventarc/docs"><strong>Eventarc</strong></a> lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.</li></ul><h3>Use Cases</h3><p>There are several use cases where you can use the Cloud Workflow terraform module integrated with Cloud Scheduler OR Event Arc</p><ul><li><strong>Service orchestration</strong> : <em>Create solutions by combining services</em> — Perform a sequence of operations across multiple systems, waiting for all operations to complete. Can be event-driven.</li><li><strong>Batch jobs</strong>: <em>Operate on multiple items</em> — Perform operations on a set of items or batch data. Often scheduled. For example:</li><li><strong>Business processes</strong>: <em>Automate line-of-business workflows</em> — Encode the steps in a business process, including conditions, actions, and human-in-the-loop events.</li><li><strong>IT process automation: </strong><em>Managed execution of service operations</em> — Easily script sequences of Google Cloud service operations.</li></ul><h3>Terraform Module Details</h3><p>Below are the variables necessary to run the terraform workflow modules.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8de9e25e987c9eff1b7e671a89236753/href">https://medium.com/media/8de9e25e987c9eff1b7e671a89236753/href</a></iframe><p>The <strong>workflow_trigger</strong> variable defines the trigger for the Workflow. This will let the user define <strong>either</strong> a Cloud Scheduler or Event Arc Trigger .Below is the terraform variable schema for the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb3edd6689c458a7c2f39d73c73244b0/href">https://medium.com/media/fb3edd6689c458a7c2f39d73c73244b0/href</a></iframe><h4>Defining a Cloud Scheduler Trigger</h4><p>To define Cloud Scheduler as the trigger user has to create a map with <em>cloud_scheduler </em>with following params</p><ul><li><strong><em>name</em></strong>: Cloud Scheduler Name</li><li><strong><em>cron</em></strong>: <a href="https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules">Cronjob format</a> Schedule</li><li><strong><em>time_zone</em></strong>: Time Zone to run the cron in</li><li><strong><em>deadline</em></strong>: The deadline for job attempts</li><li><strong><em>service_account_email</em></strong>: The Service Account to run the cloud scheduler.</li></ul><p>Below is an example</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8dc7cb34aa407f93ad3e78158ea6c80/href">https://medium.com/media/c8dc7cb34aa407f93ad3e78158ea6c80/href</a></iframe><h4>Defining an Event Arc Trigger</h4><p>To define Event Arc as the trigger user has to create a map with <em>cloud_scheduler </em>with following params</p><ul><li><strong><em>name</em></strong>: Event Arc Trigger Name</li><li><strong><em>service_account_email</em></strong>: The Service Account to run the Event Arc Trigger.</li><li><strong><em>matching_criteria</em>: </strong>The filtering criteria for the event arc trigger.This is an array.Hence Multiple matching criteria can be defined.</li></ul><p>Below is an example</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8c7ad8e4d62b4d9a9293c3991c7a2f1/href">https://medium.com/media/f8c7ad8e4d62b4d9a9293c3991c7a2f1/href</a></iframe><h3>Module Usage Examples</h3><h4>1. Scheduling a Workflow to invoke a REST API</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqzNZelfoPvhxSwSM2ktJA.png" /><figcaption><strong>Cloud Scheduler trigger Workflows</strong></figcaption></figure><p>To implement refer the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows/tree/main/examples/schedule_workflow">example</a> which is using the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows">terraform module</a> to schedule a Workflow.In this example we have a workflow which is calling a REST API based on the cron <strong>*/3 * * * * .</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/15c291f8e89a6e103c5d39fa997ed495/href">https://medium.com/media/15c291f8e89a6e103c5d39fa997ed495/href</a></iframe><blockquote>On running the above example a scheduler &amp; workflow will be created. Workflow will have the cloud Scheduler as its trigger.</blockquote><h4>2. GCS new objects Event Arc triggering a Workflow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1TIgw36t1VXg0837yMMSA.png" /><figcaption><strong>Event Arc Event Trigger Workflow</strong></figcaption></figure><p>To implement refer the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows/tree/main/examples/schedule_workflow">example</a> which is using the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows">terraform module </a>to trigger a Workflow based on new objects created in a certain GCS Bucket via Event Arc<strong>.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbe0e3bf3aed836ee53c5f4f93bd7704/href">https://medium.com/media/fbe0e3bf3aed836ee53c5f4f93bd7704/href</a></iframe><blockquote>On running the above example you will have a Event Arc Trigger &amp; workflow created. The Event Arc trigger will have event type as <strong>google.cloud.storage.object.v1.finalized</strong> .Workflow will have the Event Arc Trigger as its trigger.</blockquote><h4>3. Pubsub Event Arc triggering a Workflow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sc9LGD3kMd64wXhLSogtJg.png" /><figcaption><strong>Cloud Workflow with Event Arc Trigger on new Pubsub Message</strong></figcaption></figure><p>To implement refer the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows/tree/main/examples/pubsub_event_arc_trigger_workflow">example</a> which is using the <a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows">terraform module </a>to trigger a Workflow based on new messages published to Pubsub via Event Arc<strong>.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46688287f5359b7dde5348d2e6e2b4e3/href">https://medium.com/media/46688287f5359b7dde5348d2e6e2b4e3/href</a></iframe><blockquote>On running the above example you will have a Event Arc Trigger &amp; workflow created. The Event Arc trigger will have event type as <strong>google.cloud.pubsub.topic.v1.messagePublished</strong> .Workflow will have the Event Arc Trigger as its trigger.</blockquote><h3>Conclusion</h3><p><em>In conclusion users can use </em><a href="http://terraform-google-cloud-workflows/"><strong><em>terraform-google-cloud-workflows</em></strong></a><em> to deploy workflows while trigger being either </em><strong><em>cloud scheduler</em></strong><em> or </em><strong><em>event arc trigger</em></strong><em>. Examples shown above should help users implement their own workflows.</em></p><p><em>If there are any concerns or issues with </em><a href="http://terraform-google-cloud-workflows/"><strong><em>terraform-google-cloud-workflows</em></strong></a><strong><em> </em></strong><em>module</em><strong><em> </em></strong><em>kindly raise an issue </em><a href="https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows/issues"><em>here</em></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfe91a257cf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/google-cloud-workflows-terraform-module-cfe91a257cf">Google Cloud Workflows Terraform Module</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>