Best React Native Development Company in India

As one of the well experienced React Native Development Company in India, Master Software Solutions has been making masterpiece React Native Apps. The best part about using this technology over…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Managing your GCP inventory with Cloud Asset API

Using Cloud Functions with Cloud Asset API and BigQuery to keep track of your Google Cloud Platform (GCP) inventory.

Image from Google

The purpose of this article is to promote good housekeeping habits in the cloud. I am referring to making sure resources are cleaned up, especially in lower environments that sometimes get left behind and forgotten about once a project has moved onto production. Admittedly, housekeeping tasks are the not-so-sexy parts of cloud; engineers and architects just want to build things and play with new toys — not track resources they have provisioned.

To accomplish this, we will require the following APIs to be enabled:

We will also create a BigQuery dataset to export the Cloud Asset data to:

And because we will be using a Pub/Sub trigger, I will create a topic:

Create a folder with the following two files (I will be using the Python runtime):

Deploy the function with gcloud and set the Pub/Sub topic we created earlier as the triggering topic:

By default time is in UTC time, but you can specify a different time zone if you wish.

The above is just an example but there are many options/conditions you can pass to your query to help you discover wasted resources in your project or across your organization.

If you would like to learn more, see the examples in the links below:

Unfortunately the visualization aspect is not my forte, but here is a sample time series chart I created in Data Studio on my sample project:

It only took me 5 minutes to create and I am sure that someone with more experience would be able to something more visually appealing.

NOTE: The table at the top shows the total record count across the 7 days which data was collected while the time series chart graphs using the count of each day.

Add a comment

Related posts:

What does the second amendment mean?

I see a lot of assertions, from both pro-gun and pro-gun control positions, about what the second amendment means. Many pro-gun authors take the position that “Shall not be infringed means shall not…

Top 10 Angular Component Libraries for 2022

Angular is a component-based, front-end development framework. As a result, there are many component libraries specialized for Angular. As developers, it is essential to be aware of them to choose…

Feed The Goat

Be Heard; Unherded. “Feed The Goat” is published by Goat.