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…
Blog posts August 2024
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, …
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…
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…
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:
…
Terraform workspace with example
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…
Configure multi node master and worker Kubernetes cluster on K3d docker
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…
Install k3d Kubernetes on docker on ubuntu linux server
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.
K3d is a easy and simple tool that…
Terraform convert single string to list or set
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() …
Terraform variable type list with for_each for loop examples
In this article I have explored all the examples on how to use list of strings with for_each for loop in Terraform resource and output block.
In this first block of example I have defined variable named marvel, it's type is list and value has string names of superheroes inside [ ] squa…
Terraform variable multiple validation advanced blocks example
In my previous article on configuring a Terraform module for an Azure Function App with a private endpoint and a storage account, I shown a section within the application_stack
block where I needed to implement function apps stacks. Here in this article I focusing on advanced variable validation for…
Terraform module Azure function app with private endpoint and storage account
In this article I posting terraform configuration script to deploy and configure complete function app with private endpoint and related resources in Microsoft Azure. This is complete configuration script for function app with private endpoint. With this configuration code it creates all below l…
Terraform Azure function app with private endpoint and storage account
In this article I am creating Azure Function App linked to Private Endpoint and Storage Account using Terraform. This terraform configuration file will deploy all these resources within couple of minute.
In this automation Resource Group, User Assigned Identity, Virtual Network, Subnet, Private D…
Terraform Azure provider passing multiple alias environment and credentials in child module
While working with Terraform modules I wanted to pass on multiple provider aliases with specific credentials and azure subscription details to child module. Ideas was to create resources with assigned privileged users. Non privileged users should not be able to create services in Azure.
In this…
Terraform Azure provider alias passing credentials and configuration in module resources
In this article I will be configuring alias in AzureRM provider and passing it to child module. Which will allow me to configure/deploy resources with given settings and credentials. In this demo in my Parent module, I will use specific client_id, client_secret, subscription_id, tenant_id to authen…
PowerShell create resources on Azure using Rest API with user account
Using client id (Service Principal) and client secret to connect Azure Rest API is fairly easy and simple. As I have shown in my earlier articles. I am using another way of using your organization Username of Password to connect to azure Rest API instead of client id and client secret. You generate …
Azure Rest API connect with Powershell and create resources
I had a task to explore and deploy resources in Microsoft Azure using Rest API. Very good and detailed documentation is provided by Microsoft for Azure Rest API here https://learn.microsoft.com/en-us/rest/api/azure/.
In this example I will use PowerShell to automate Azure Rest API and cre…
Terraform filter map and list object with if condition in for_each loop examples
In terraform there is no actual if else condition block. But still you can use if condition to filter map or list of objects to get the required keys or values. In below example I have scenario where I wanted to create Resource Group in Azure to defined locations only. Incase no data is provided or…
Terraform variable precedence and priority
This is a informational article on how the variable precedence works in Terraform. This is how the priority is defined for variable when you use it in different ways. In the following diagram, it shows the information of variable priority matrix. Lower the number it has higher the priority and it w…
Terraform passing different credentials to different subscriptions with provider alias
While planning and designing Terraform configuration files for Azure deployment, I wanted to deploy resources to different environment in different subscriptions. In the designing code idea was to use different multiple credentials while deploying environments and referencing them with alias.
Blog Search
Page Views
11980349
Archive
- September 2024 (11)
- August 2024 (22)
- July 2024 (11)
- June 2024 (1)
- May 2024 (3)
- April 2024 (5)
- November 2023 (1)
- September 2023 (6)
- July 2023 (15)
- June 2023 (5)
Comments
-
NeoModJuly 30, 2024 11:14PM
-
RogerJuly 22, 2024 10:13PM
-
DonJune 28, 2024 11:29PM
-
visamanxJune 25, 2024 01:30AM
-
AdamJune 14, 2024 01:37AM