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…
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.
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…
This documentation describes in what way to organize GitHub Actions to authenticate with Microsoft AzureEntra 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…
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…
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…
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…
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…
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…
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.
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…
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.
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…
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…
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.
In the Hashicorp Terraform there is a feature called Terraform workspace that permits you to achieve multiple, isolated infrastructure environments within a single Terraform configuration. A workspace is fundamentally a way to isolate your infrastructure configurations into different environments, s…
After configuring basic K3s (Kubernetes on Docker) setup on my lab with default commands. I found it created single node k8s cluster. I wanted a multi node Kubernetes cluster to be setup with multiple masters and workers.
As my K3d server and cluster is already installed and configured using wit…
I was testing few features on Kubernetes for the same I was needed a new Kubernetes cluster to be setup in my lab environment for some POC purpose. Here I am installing a new Kubernetes cluster on ubuntu server. I am using k3d, also called Kubernetes on docker.
Below are the few examples of Terraform on to converting single string to array of list or set. This code I was wanted in my one of my Azure automation task. In this example I have defined a variable justice_leage with same default value..
For conversion, In the first scenario I can use split() …