Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts

Deploy CPU quota usage alerts for subscription using Terraform azapi provider

This is another way of deploying resources/services on Azure using azapi provider using HashiCorp Terraform.

AzAPI is a lightweight, flexible provider that leverages the Azure ARM REST APIs, empowering you to manage any Azure resource type with any desired API version. This enables access to the…

Read more

Configure CPU quota usage alerts for subscription using Azure Bicep templates

This article is a continuation of my previous post, where I deployed CPU quota usage alerts for a subscription using Azure ARM templates. In this post, I'll demonstrate how to deploy Action Groups and Subscription Quota Alerts for CPU usage using Bicep.

Compared to ARM templates, I find Bicep to …

Read more

Create CPU quota usage alerts for subscription using Azure ARM templates

This article is about Implementing of CPU Quota Usage Alert for Azure Subscription. As part of my recent assignment, I successfully created a CPU quota usage alert for an Azure subscription using Azure Resource Manager (ARM) templates. The deployment enables real-time monitoring of CPU quota usage, …

Read more

Resolved Terraform Error: POST https api.github.com user repos 401 Requires authentication

I was receiving Error: POST https://api.github.com/user/repos: 401 Requires authentication [] while applying and deploying repository on github.com with Terraform. This error occurs because terraform is not able to authenticate to GitHub.com API and not able to perform the action.

Read more

GitHub repository integration with Terraform Cloud to Deploy and Manage Azure

Streamline your infrastructure as code (IaC) workflows by integrating your GitHub repository with HashiCorp Terraform Cloud (HCP). This powerful combination enables automatic execution of Terraform plans and applies based on changes made to your infrastructure code, ensuring that every update to you…

Read more

Azure OIDC OpenID Connect password less with GitHub Actions

This documentation describes in what way to organize GitHub Actions to authenticate with Microsoft Azure Entra ID using OpenID Connect (OIDC) for secure and automated deployments to Azure. This guide covers key ideas like credentials, federated identity, and customer-managed keys for data encryptio…

Read more

Part 4.2 GitHub Actions manage Microsoft Azure Cloud with az CLI

In this article, I will guide through the procedure of securely keeping Azure credentials in GitHub Actions Repository Secrets and using them to authenticate with Azure CLI commands. This enables the execution of GitHub Actions workflows, automating various tasks and deployments in Azure. By storing…

Read more

Part 4.1 GitHub Actions deploy azure resources with PowerShell

After successfully configuring and setting up Azure and Terraform in GitHub Actions, I embarked on a Proof of Concept (POC) to automate PowerShell scripts (Azure az module) using GitHub Actions. I meticulously automated all the job steps using PowerShell, with a primary focus on utilizing credential…

Read more

Part 4 GitHub Actions deploy azure resources with Terraform backend

In this section, I'm leveraging the azurerm backend to keep the Terraform state (tfstate) file in an Azure Storage Account. This will make sure that the Terraform state is centralized and consistent across different environments and team members. Every time I push changes to my Terraform configurat…

Read more

Part 3 Automating and Planning Azure Resources with Terraform and GitHub Actions

GitHub Actions is a CI/CD tool that automates tasks and workflows within your repository. It lets you to create custom workflows, trigger actions, and keep sensitive information securely. Common use cases include automating testing, deployment, and code quality checks. You can also use GitHub Actio…

Read more

Configure SNMP Service on HPE ILO Redfish Rest API using PowerShell

In our team, a colleague was tasked with configuring SNMP settings on multiple HPE ILO portals. To streamline this process and avoid manual labor, they sought my expertise in automation. I leveraged the HPE ILO Redfish REST API with PowerShell to automate the task, utilizing the comprehensive API do…

Read more

Reboot remote Linux server from PHP PowerShell web server for privileged users

This HTML tool enables users to restart Linux servers remotely from their web browser, providing a convenient and efficient way to manage server operations. Built using HTML, PHP, and PowerShell, this project is designed to be hosted on a Windows XAMPP server only. 

For added security and author…

Read more

HTML JavaScript generate GUID

Here is a small HTML project I created to generate a new GUID each time the "Generate New GUID" button is clicked. Additionally, this project includes a feature that allows you to easily copy the generated GUID to your clipboard by clicking on a copy icon next to the GUID. The project uses basic HTM…

Read more

Part 2 Terraform modules using a github.com repository as a source

In this article, I will guide you through the process of configuring a Terraform module hosted on GitHub.com as a source for the use inside Terraform module projects. In my previous blog (Part 1), I demonstrated how to set up a GitHub.com repository and branch using HashiCorp Terraform code.

To S…

Read more

Create GitHub repository and branches using Terraform

In this blog post, I will walk you through using HashiCorp Terraform to create and configure repositories and branches on an existing GitHub account. Before we begin, it's important to note that you should already have an active GitHub account.

To allow Terraform to interact with your GitHub acco…

Read more

Generate GUID using PowerShell GUI tool

This PowerShell script provides a graphical user interface (GUI) for generating new GUIDs. Each time the "Generate" button is clicked, a new GUID is created using the [guid]::NewGuid() command. The interface is built using Windows Forms, offering a user-friendly way to quickly generate and view uniq…

Read more

Terraform using for loop in attribute value without for_each

In this Terraform example, I explored two approaches to working with map variables. Firstly, I used a for loop to iterate over the key-value pairs in the address_prefixes map, extracting the prefix values and enclosing the loop within square brackets [] to generate list from map.

Alternatively, …

Read more

Terraform for_each for loop list of object without count example

While working with Terraform, I needed to deploy resources without relying on the count meta-argument. My variable was a list of objects, but using count resulted in index numbers being appended to the resource names. To avoid this, I opted to use the for_each argument to iterate over the list of ob…

Read more

Terraform map of object for loop with if condition example

This article I will show the example of Terraform looping map of object variable type and using if condition to filter the map key value. In this demo I provided a map of object inside users variable. Following inside the locals variable, I am using logic for loop over map of objects and if cond…

Read more

HashiCorp HCP Terraform Cloud backend configuration

HCP Terraform Cloud is a managed service presented by HashiCorp that permits users to run Terraform in a cloud-based environment. It provides a protected, scalable, and collaborative platform for infrastructure organizational automation.

HCP Terraform Cloud proposes numerous benefits, including:

Read more

20 blog posts

Blog Search

Page Views

12085303

Follow me on Blogarama