<?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: Deniss T.</title>
    <description>The latest articles on DEV Community by Deniss T. (@tsoden).</description>
    <link>https://dev.to/tsoden</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F641645%2Ff8c86112-0d81-432c-910f-fc920d7a65fb.jpg</url>
      <title>DEV Community: Deniss T.</title>
      <link>https://dev.to/tsoden</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tsoden"/>
    <language>en</language>
    <item>
      <title>Granting Access to Cloud Build - Impersonating a Service Account</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sat, 05 Jun 2021 00:05:23 +0000</pubDate>
      <link>https://dev.to/tsoden/granting-access-to-cloud-build-impersonating-a-service-account-5hm</link>
      <guid>https://dev.to/tsoden/granting-access-to-cloud-build-impersonating-a-service-account-5hm</guid>
      <description>

&lt;p&gt;Another option to allow your team members to interact with the Cloud Build in your project is to &lt;a href="https://cloud.google.com/iam/docs/understanding-service-accounts"&gt;impersonate&lt;/a&gt; a service account.&lt;/p&gt;


&lt;h2&gt;
  
  
  How it Works:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a Service account giving it the Predefined roles or a Custom one (preferred) to grant it the required permissions.&lt;/li&gt;
&lt;li&gt;Your users will (only) need to have the following roles: 

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;roles/iam.serviceAccountTokenCreator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;roles/serviceusage.serviceUsageConsumer&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This will allow your team members to submit builds using the impersonation flag:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud builds submit \
  --config cloudbuild.yaml \
  --impersonate-service-account=&amp;lt;SERVICE_ACCOUNT&amp;gt;
  --gcs-log-dir=gs://&amp;lt;BUCKET_NAME&amp;gt;/&amp;lt;SUBDIRECTORY&amp;gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The &lt;strong&gt;Flaws&lt;/strong&gt; of this Option
&lt;/h2&gt;

&lt;p&gt;Allowing the users to impersonate service accounts like that will provide them with a lot of possibilities within the project as they will technically be able to list the service accounts within the project and impersonate any of them, thus having access not only to Cloud Build but other project resources as well.&lt;/p&gt;

&lt;p&gt;Therefore, you should never grant the &lt;strong&gt;Service Account Token Creator&lt;/strong&gt; role to a user this way.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Solution&lt;/strong&gt; for the Service Account Token Creator role
&lt;/h2&gt;

&lt;p&gt;Instead of giving users the project-wide Service Account Token Creator role for the account impersonation, you should make that role &lt;strong&gt;service account-specific&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Here is how you can do that via Cloud Console or CLI:&lt;/p&gt;

&lt;h4&gt;
  
  
  Cloud Console solution
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to IAM &amp;amp; Admin -&amp;gt; Service Accounts.&lt;/li&gt;
&lt;li&gt;Click 'SHOW INFO PANEL'.&lt;/li&gt;
&lt;li&gt;Select the relevant Service Account.&lt;/li&gt;
&lt;li&gt;Click 'ADD MEMBER'.&lt;/li&gt;
&lt;li&gt;Specify the user account granting it Service Account Token Creator role.&lt;/li&gt;
&lt;li&gt;Click 'SAVE'.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  CLI solution
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Using the &lt;code&gt;gcloud&lt;/code&gt; tool, add an &lt;a href="https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/add-iam-policy-binding"&gt;IAM policy binding&lt;/a&gt; for the service account:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud iam service-accounts add-iam-policy-binding &amp;lt;SERVICE_ACCOUNT&amp;gt; \
  --member="user:&amp;lt;USER_ACCOUNT&amp;gt;" \
  --role="roles/iam.serviceAccountTokenCreator"
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To see the current IAM policy bindings run the following &lt;code&gt;gcloud&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud iam service-accounts get-iam-policy &amp;lt;SERVICE_ACCOUNT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this case, your team members (group) will only need to have the Service Usage Consumer role, while the Service Account Token Creator role will be bound only to the specified service account.&lt;/p&gt;





</description>
      <category>googlecloud</category>
      <category>cloudbuild</category>
      <category>googlecloudiam</category>
    </item>
    <item>
      <title>Granting Access to Cloud Build - Custom Roles</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sat, 05 Jun 2021 00:05:04 +0000</pubDate>
      <link>https://dev.to/tsoden/granting-access-to-cloud-build-custom-roles-a2n</link>
      <guid>https://dev.to/tsoden/granting-access-to-cloud-build-custom-roles-a2n</guid>
      <description>

&lt;p&gt;In this article, I will describe how to take advantage of the &lt;strong&gt;Custom roles&lt;/strong&gt; to allow your team to use the Cloud Build in your project.&lt;/p&gt;

&lt;p&gt;This is a better solution than using the Predefined roles as it gives you more control over the permissions you give to your team members.&lt;/p&gt;


&lt;h2&gt;
  
  
  Create a Custom Role
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/cloud-build/docs/securing-builds/configure-access-control#creating_iam_custom_roles"&gt;Create a Custom role&lt;/a&gt; that contains all the required permissions. Later, you can assign it to the group with the relevant team members.&lt;/p&gt;

&lt;p&gt;Here are the minimum permissions that your Custom role will need to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.create&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.get&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.list&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;storage.buckets.get&lt;/code&gt; &lt;em&gt;- Grants permission to read bucket metadata&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;storage.buckets.list&lt;/code&gt; &lt;em&gt;- Grants permission to list buckets in the project&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;storage.objects.get&lt;/code&gt; &lt;em&gt;- Grants permission to view objects&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;storage.objects.create&lt;/code&gt; &lt;em&gt;- Grants permission to create objects&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;serviceusage.services.use&lt;/code&gt; &lt;em&gt;- Required to use the project for quota and billing purposes&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; that the &lt;code&gt;storage.objects.get&lt;/code&gt; permission is needed for accessing the build logs, if you are storing the logs in a non-default bucket (see the "The Access Denied Error" section in my previous article).&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Sample&lt;/strong&gt; command for submitting a build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud builds submit \
  --config cloudbuild.yaml \
  --gcs-log-dir=gs://&amp;lt;BUCKET_NAME&amp;gt;/&amp;lt;SUBDIRECTORY&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;







</description>
      <category>googlecloud</category>
      <category>cloudbuild</category>
      <category>googlecloudiam</category>
    </item>
    <item>
      <title>Granting Access to Cloud Build - Predefined Roles</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sat, 05 Jun 2021 00:04:58 +0000</pubDate>
      <link>https://dev.to/tsoden/granting-access-to-cloud-build-predefined-roles-176e</link>
      <guid>https://dev.to/tsoden/granting-access-to-cloud-build-predefined-roles-176e</guid>
      <description>

&lt;p&gt;In this article, I will go through the permissions required for your team members to use the Cloud Build in your project, and which &lt;strong&gt;Predefined roles&lt;/strong&gt; you could use for that.&lt;/p&gt;


&lt;h2&gt;
  
  
  Required Permissions
&lt;/h2&gt;

&lt;p&gt;First of all, let’s review which permissions your team members will need.&lt;/p&gt;

&lt;p&gt;The users who access the Cloud Build API will need to have the following permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;storage.buckets.get&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;storage.buckets.list&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;storage.objects.create&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;serviceusage.services.use&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The storage permissions are required as Cloud Build pushes its logs into the Google Cloud Storage, while serviceusage.services.use is needed since it enables you to consume quota and billing for the project.&lt;/p&gt;

&lt;p&gt;Besides the permissions mentioned above, your team will also need the &lt;a href="https://cloud.google.com/cloud-build/docs/securing-builds/configure-access-control"&gt;obvious ones&lt;/a&gt; like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.create&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.get&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloudbuild.builds.list&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  &lt;span&gt;Predefined Roles&lt;/span&gt;
&lt;/h2&gt;

&lt;p&gt;The following roles can grant your team the permissions mentioned above:&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;storage.buckets.get&lt;/strong&gt; and &lt;strong&gt;storage.buckets.list&lt;/strong&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;roles/storage.admin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;roles/viewer&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(&lt;strong&gt;storage.objects.create&lt;/strong&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;roles/storage.objectCreator&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(&lt;strong&gt;serviceusage.services.use&lt;/strong&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;roles/serviceusage.serviceUsageConsumer&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And, of course, &lt;code&gt;roles/cloudbuild.builds.editor&lt;/code&gt; to &lt;strong&gt;create&lt;/strong&gt; and &lt;strong&gt;cancel&lt;/strong&gt; builds.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Access Denied Error
&lt;/h2&gt;

&lt;p&gt;Due to the &lt;a href="https://issuetracker.google.com/134928412"&gt;known issue&lt;/a&gt; with the Cloud Build logs, your team members will still be experiencing the Access Denied error unless they have one of the &lt;strong&gt;Basic&lt;/strong&gt; roles (Viewer/Editor/Owner).&lt;/p&gt;

&lt;p&gt;This error is driven by not having access to the Cloud Build logs stored in GCS - they are stored in a Google-managed bucket that is available for Basic roles only.&lt;/p&gt;

&lt;p&gt;This doesn't affect the builds themselves but their logs - your team will still be able to use the Cloud Build without having a Viewer/Editor/Owner role. &lt;/p&gt;


&lt;h2&gt;
  
  
  The Access Denied Error: &lt;strong&gt;Solution&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's see how to avoid the Access Denied error without giving the users a Basic role.&lt;/p&gt;

&lt;p&gt;As mentioned previously, the root cause of that error is that Cloud Build stores logs in a Google-managed bucket by default. &lt;/p&gt;

&lt;p&gt;However, we are not obliged to use that particular&lt;br&gt;
bucket and can specify one of our own with the following flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--gcs-log-dir=gs://&amp;lt;BUCKET_NAME&amp;gt;/&amp;lt;SUBDIRECTORY&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; that you will need to specify the subdirectory for the bucket of your choice. Otherwise you will run into the following error:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ERROR: (gcloud.builds.submit) wrong collection: expected [storage.buckets], got [storage.objects]&lt;/p&gt;
&lt;/blockquote&gt;





</description>
      <category>googlecloud</category>
      <category>cloudbuild</category>
      <category>googlecloudiam</category>
    </item>
    <item>
      <title>Granting Access to Cloud Build - Intro</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sat, 05 Jun 2021 00:04:39 +0000</pubDate>
      <link>https://dev.to/tsoden/granting-access-to-cloud-build-intro-5ckn</link>
      <guid>https://dev.to/tsoden/granting-access-to-cloud-build-intro-5ckn</guid>
      <description>

&lt;p&gt;In this series, I will review a situation when you own a GCP project and your development team needs to use the Cloud Build in it. Your team members will need certain permissions for that but there are a few details which you will need to consider when making a decision.&lt;/p&gt;




&lt;h2&gt;
  
  
  Available Options
&lt;/h2&gt;

&lt;p&gt;There are three options that I will cover. Not to make it a long read, I have divided them into the separate articles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://dev.to/dtsokarev/granting-access-to-cloud-build-predefined-roles-176e"&gt;Using Predefined roles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/dtsokarev/granting-access-to-cloud-build-custom-roles-a2n"&gt;Using Custom roles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/dtsokarev/granting-access-to-cloud-build-impersonating-a-service-account-5hm"&gt;Impersonating a Service Account&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;





</description>
      <category>googlecloud</category>
      <category>cloudbuild</category>
      <category>googlecloudiam</category>
    </item>
    <item>
      <title>A simple way to automate On-demand Backups for Cloud SQL</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sat, 15 May 2021 21:40:11 +0000</pubDate>
      <link>https://dev.to/tsoden/a-simple-way-to-automate-on-demand-backups-for-cloud-sql-2bkf</link>
      <guid>https://dev.to/tsoden/a-simple-way-to-automate-on-demand-backups-for-cloud-sql-2bkf</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hGUVw1F_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AxvO389jnT-RsVLHMLQnqBg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hGUVw1F_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AxvO389jnT-RsVLHMLQnqBg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Cloud SQL offers two types of backups: &lt;a href="https://cloud.google.com/sql/docs/mysql/backup-recovery/backups#on-demand-backups"&gt;on-demand&lt;/a&gt; and &lt;a href="https://cloud.google.com/sql/docs/mysql/backup-recovery/backups#automated-backups"&gt;automated&lt;/a&gt;. While enabled automated backups occur once a day and cannot be scheduled for shorter intervals, you can create the on-demand ones at any time. This article will show you how to automate the on-demand backups to be created every X hours in the simplest way possible. For that, I will be using the &lt;a href="https://cloud.google.com/scheduler"&gt;Cloud Scheduler&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  I: Create a Custom Role that will allow creating Cloud SQL backups
&lt;/h3&gt;

&lt;p&gt;You need the following &lt;a href="https://cloud.google.com/sql/docs/mysql/project-access-control#permissions_and_their_roles"&gt;permission&lt;/a&gt; to create Cloud SQL backups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cloudsql.backupRuns.create&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This permission should be granted to the service account that will be used by Cloud Scheduler as identity.&lt;/p&gt;

&lt;p&gt;You could simply grant the service account one of the predefined roles, such as &lt;strong&gt;Cloud SQL Editor&lt;/strong&gt; or &lt;strong&gt;Cloud SQL Admin&lt;/strong&gt; , however, following the principle of least privilege, I encourage you to create a &lt;a href="https://cloud.google.com/iam/docs/creating-custom-roles"&gt;custom role&lt;/a&gt; instead. Here is how you can do it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In Cloud Console, navigate to &lt;strong&gt;IAM &amp;amp; Admin&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Roles&lt;/strong&gt; and click “ &lt;strong&gt;CREATE ROLE&lt;/strong&gt; ”.&lt;/li&gt;
&lt;li&gt;Fill in the required fields and add the &lt;code&gt;cloudsql.backupRuns.create&lt;/code&gt; permission.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the Cloud Console it will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sYF4lzzK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/506/1%2ADKNB7-sJDgyFG2IM5cDVJQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sYF4lzzK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/506/1%2ADKNB7-sJDgyFG2IM5cDVJQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  II: Create a Service Account for your Cloud Scheduler job
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating"&gt;Create&lt;/a&gt; a service account giving it the role from the previous step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cZ74ucJi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/501/1%2Acar3O4R5vzvOmawHfdm8gQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cZ74ucJi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/501/1%2Acar3O4R5vzvOmawHfdm8gQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  III: Create a Cloud Scheduler job
&lt;/h3&gt;

&lt;p&gt;1. Define the &lt;strong&gt;job&lt;/strong&gt; and its &lt;strong&gt;frequency&lt;/strong&gt;. I have configured it to run every 6 hours:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pizkv9yA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/495/1%2A_Qyv3U1U9-tc-Z68dRIxWg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pizkv9yA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/495/1%2A_Qyv3U1U9-tc-Z68dRIxWg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Select &lt;strong&gt;HTTP&lt;/strong&gt; as the target type and provide the following &lt;a href="https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/insert"&gt;URL&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember to replace &lt;strong&gt;{project}&lt;/strong&gt; with your project ID, and &lt;strong&gt;{instance}&lt;/strong&gt; with your Cloud SQL instance ID. Make sure that the selected HTTP method is &lt;strong&gt;POST&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;3. For &lt;strong&gt;Auth header&lt;/strong&gt; select the “Add OAuth token” option.&lt;/p&gt;

&lt;p&gt;4. Specify the &lt;strong&gt;service account&lt;/strong&gt; you have created in Step II.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c7GJ0h-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/494/1%2AW2CNlsrZ3Y0nAsPafNKULQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c7GJ0h-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/494/1%2AW2CNlsrZ3Y0nAsPafNKULQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. Click “ &lt;strong&gt;CREATE&lt;/strong&gt; ”.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;That’s it! Now your Cloud SQL instance will have the backups created every X hours (in my particular example — every 6 hours), and you can modify the frequency easily.&lt;/p&gt;

&lt;p&gt;Nevertheless, you should keep in mind the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On-demand backups are not automatically deleted the way automated backups are. They persist until you delete them or until their instance is deleted. Because they are not automatically deleted, on-demand backups can have a long-term effect on your billing charges if you do not delete them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Reference: &lt;a href="https://cloud.google.com/sql/docs/mysql/backup-recovery/backups#on-demand-backups"&gt;https://cloud.google.com/sql/docs/mysql/backup-recovery/backups#on-demand-backups&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, you can address this issue by configuring &lt;a href="https://cloud.google.com/storage/docs/lifecycle#conditions"&gt;Object Lifecycle Management&lt;/a&gt; on the GCS bucket storing your backups.&lt;/p&gt;

</description>
      <category>cloudsql</category>
      <category>googlecloud</category>
      <category>cloudscheduler</category>
    </item>
    <item>
      <title>Automated deployments for GCP Cloud Functions</title>
      <dc:creator>Deniss T.</dc:creator>
      <pubDate>Sun, 06 Dec 2020 15:28:17 +0000</pubDate>
      <link>https://dev.to/tsoden/automated-deployments-for-gcp-cloud-functions-2a8p</link>
      <guid>https://dev.to/tsoden/automated-deployments-for-gcp-cloud-functions-2a8p</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YoKTthXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2APP2nPtusWhLhE6fWwCjpaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YoKTthXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2APP2nPtusWhLhE6fWwCjpaA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;In this article, I will describe a scenario, in which you have two projects: &lt;strong&gt;dev&lt;/strong&gt; and &lt;strong&gt;prod&lt;/strong&gt;. Upon the successful deployment of your Cloud Function in the development project, it will also be deployed to the production. &lt;/p&gt;

&lt;p&gt;For that, I will use a GitHub repository, to which I will be pushing the files for my function. In turn, this will be triggering the Cloud Build to deploy the functions.&lt;/p&gt;

&lt;p&gt;I will first configure it for the development project only &lt;em&gt;(steps 1–7),&lt;/em&gt; but then I will describe how you can automate the deployments to the production as well &lt;em&gt;(steps 8–10)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;GCP documentation reference — &lt;/em&gt;&lt;a href="https://cloud.google.com/functions/docs/testing/test-cicd"&gt;&lt;em&gt;link&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1
&lt;/h2&gt;

&lt;p&gt;Create a GitHub repository for your Cloud Function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2
&lt;/h2&gt;

&lt;p&gt;Create the files for your function. For simplicity purposes, I will grab the sample from the &lt;a href="https://cloud.google.com/functions/docs/quickstart-nodejs"&gt;Node.js Quickstart&lt;/a&gt; for Cloud Functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;index.js&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
* Responds to any HTTP request.
*
* @param {!express:Request} req HTTP request context.
* @param {!express:Response} res HTTP response context.
*/&lt;/span&gt;
&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;helloWorld&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Hello&lt;/span&gt; &lt;span class="nx"&gt;World&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&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;&lt;strong&gt;package.json&lt;/strong&gt;:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;“name”:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;“sample-http”&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;“version”:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3
&lt;/h2&gt;

&lt;p&gt;Push your function files to the GitHub repository you created in &lt;strong&gt;Step 1&lt;/strong&gt;. I will also create a branch called &lt;strong&gt;dev&lt;/strong&gt; to later use it for the trigger.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
git add .
git commit -m “First commit”
git branch dev
git remote add origin _[LINK-TO-THE-GITHUB-REPO]_
git push -u origin dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4
&lt;/h2&gt;

&lt;p&gt;Go to the Cloud Build settings in your development project and enable the suggested roles for &lt;strong&gt;Service Accounts&lt;/strong&gt; and &lt;strong&gt;Cloud Functions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zWXNwFSj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/526/0%2AKhAhVQqPX_lLS9Nf" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zWXNwFSj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/526/0%2AKhAhVQqPX_lLS9Nf" alt="Cloud Build Settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5
&lt;/h2&gt;

&lt;p&gt;Navigate to the Cloud Build &lt;strong&gt;Triggers&lt;/strong&gt; page to create a trigger:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter the &lt;strong&gt;name&lt;/strong&gt; for your trigger.&lt;/li&gt;
&lt;li&gt;Make sure that “ &lt;strong&gt;Push to a branch&lt;/strong&gt; ” is selected for the event.&lt;/li&gt;
&lt;li&gt;Under “ &lt;strong&gt;Source&lt;/strong&gt; ” click “ &lt;strong&gt;CONNECT NEW REPOSITORY&lt;/strong&gt; ” and select “GitHub (Cloud Build GitHub App)”.&lt;/li&gt;
&lt;li&gt;Authorize your GitHub and select the repository you created in &lt;strong&gt;Step 1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;branch&lt;/strong&gt; , pushing to which you want the build to be triggered.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;CREATE&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J612YtHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/752/0%2ARER9zpFSAAi_PFd6" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J612YtHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/752/0%2ARER9zpFSAAi_PFd6" alt="Cloud Build Triggers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6
&lt;/h2&gt;

&lt;p&gt;Create a config file for your build. I have created the following &lt;strong&gt;cloudbuild.yaml&lt;/strong&gt; for that:&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="pi"&gt;:&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;‘gcr.io/cloud-builders/npm’&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;‘install’&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;‘gcr.io/cloud-builders/npm’&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;‘test’&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;‘gcr.io/cloud-builders/gcloud’&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;‘functions’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘deploy’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘cicdFunction_dev’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — trigger-http’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — runtime’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘nodejs10’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — entry-point’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘helloWorld’&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;GCP documentation reference — &lt;/em&gt;&lt;a href="https://cloud.google.com/functions/docs/testing/test-cicd#setting_up"&gt;&lt;em&gt;link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;“helloWorld”&lt;/em&gt; is the name of the function in my &lt;strong&gt;index.js&lt;/strong&gt; file, while &lt;em&gt;“cicdFunction_dev”&lt;/em&gt; will be the name of the deployed Cloud Function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7
&lt;/h2&gt;

&lt;p&gt;Push the config file to the GitHub repository and wait for the Cloud Build to deploy the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add cloudbuild.yaml
git commit -m “Added cloudbuild.yaml”
git push -u origin dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can check the build status and details by visiting the Cloud Build &lt;strong&gt;History&lt;/strong&gt; page.&lt;/p&gt;

&lt;p&gt;Check the Cloud Functions page in Cloud Console and you will see that your function has been deployed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--63EtcYEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/795/0%2ATCo_pn7JScS6cyjR" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--63EtcYEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/795/0%2ATCo_pn7JScS6cyjR" alt="The deployed Cloud Function in the GCP Console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will notice that it also contains the Cloud Build config file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z6s6XL2N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AEFTI-MV2y-vbN6ey" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z6s6XL2N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AEFTI-MV2y-vbN6ey" alt="The deployed Cloud Function in the GCP Console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8
&lt;/h2&gt;

&lt;p&gt;Now set up the &lt;strong&gt;prod&lt;/strong&gt; project.&lt;/p&gt;

&lt;p&gt;Add the Cloud Build service account from the &lt;strong&gt;dev&lt;/strong&gt; project as an IAM member &lt;em&gt;(Cloud Console -&amp;gt; IAM &amp;amp; Admin -&amp;gt; IAM),&lt;/em&gt; giving it the &lt;strong&gt;Cloud Functions Deployer&lt;/strong&gt; and &lt;strong&gt;Service Account User&lt;/strong&gt; roles in your production project.&lt;/p&gt;

&lt;p&gt;Make sure to give the new roles a few minutes to propagate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9
&lt;/h2&gt;

&lt;p&gt;Add another deployment step in your Cloud Build config file, specifying the production project.&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="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;‘gcr.io/cloud-builders/gcloud’&lt;/span&gt;
  &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;‘functions’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘deploy’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘cicdFunction_prod’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — trigger-http’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — runtime’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘nodejs10’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — entry-point’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘helloWorld’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘ — project’&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;‘PRODUCTION_PROJECT’&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 10
&lt;/h2&gt;

&lt;p&gt;Push the updated config file to the GitHub repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add cloudbuild.yaml
git commit -m “Added production deployment step”
git push -u origin dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will trigger the build that will also deploy the function to the production project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xBY1716q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AdpNig1dy2xe5jHNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xBY1716q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AdpNig1dy2xe5jHNG" alt="The deployed Cloud Function in the GCP Console"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;From now on, this function will be getting deployed in production project as well &lt;em&gt;(after pushing to the GitHub repository or triggering the build manually)&lt;/em&gt; if the deployment to development is successful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Successful deployment of a function still doesn’t guarantee that there are no logical errors within your code. Therefore, you may want to include additional testing before deploying your function to the production environment.&lt;/p&gt;

</description>
      <category>cloudfunctions</category>
      <category>cloudbuild</category>
      <category>cicd</category>
      <category>googlecloud</category>
    </item>
  </channel>
</rss>
