Infra Automation by Terraform -AKS Provisioning & RBAC for AD Group — Part9

  • Reading time:4 mins read

Azure Kubernetes Service (AKS) simplifies the deployment and management of containerized applications with Kubernetes. Integrating Azure Role-Based Access Control (RBAC) with AKS enhances security by controlling user access within the Kubernetes environment. By provisioning a service principal and adding it to an Azure Active Directory (AD) group, administrators can efficiently manage permissions. This setup ensures that only authorized users and applications can access and modify resources. The process includes creating the necessary resources in Azure, including the AD group and service principal, and configuring the AKS cluster with Azure RBAC for enhanced security.

Continue ReadingInfra Automation by Terraform -AKS Provisioning & RBAC for AD Group — Part9

Infra Automation by Terraform Accessing Modules from a different Repo — Part8

  • Reading time:9 mins read

Accessing Terraform modules from a separate repository enhances the modularity, reusability, and centralized maintenance of infrastructure code. By linking modules to a primary Terraform directory via HTTPS or SSH, you can ensure that modules are maintained and updated in one location, reducing redundancy and ensuring consistency. It also provides a secure access control mechanism for managing critical infrastructure components. Using this approach promotes scalability and maintainability across various projects. The process can be automated through CI/CD pipelines to ensure a smooth infrastructure deployment.

Continue ReadingInfra Automation by Terraform Accessing Modules from a different Repo — Part8

Infra Automation by Terraform Dynamic Block for List(Objects) Usecase — Part7

  • Reading time:3 mins read

In Terraform, dynamic blocks help automate the generation of multiple instances of a block for a variable list of configurations. In this example, a dynamic block is used to define Azure Security Group rules dynamically based on a list of virtual network rules. The rules are defined in a list of objects, and Terraform creates individual security rules for each item. This approach simplifies the management of infrastructure and ensures consistency. The variables are defined in a variables.tf file, and the configurations are applied using terraform plan and apply.

Continue ReadingInfra Automation by Terraform Dynamic Block for List(Objects) Usecase — Part7

Infra Automation by Terraform Dynamic Block for Map(Objects) Usecase— Part6

  • Reading time:3 mins read

This discussion demonstrates the use of dynamic blocks in Terraform to create Azure Front Door routing rules. It defines a map of routing rules in the terraform.tfvars file, where each rule includes attributes like accepted protocols, patterns to match, and frontend endpoints. The dynamic block is used to iterate over these routing rules and generate configuration blocks for each rule dynamically. In the case of forwarding rules, another nested dynamic block is used to configure forwarding settings. Finally, the Terraform commands terraform init, terraform plan, and terraform apply are executed to initialize, preview, and apply the configuration to Azure.

Continue ReadingInfra Automation by Terraform Dynamic Block for Map(Objects) Usecase— Part6

Infra Automation by Terraform for Azure Cloud VM— Part 4

  • Reading time:4 mins read

This Terraform setup automates the provisioning of an Azure Virtual Machine (VM) with managed disks. It uses variables.tf to define key parameters like resource group name, VM size, and admin credentials. In main.tf, resources such as a resource group, virtual network, subnet, network security group, and a Windows VM are created. The VM is configured with a custom OS disk size and a specified Windows image. The terraform.tfvars file provides variable values for easy configuration, and the terraform plan and terraform apply commands are used to deploy the infrastructure.

Continue ReadingInfra Automation by Terraform for Azure Cloud VM— Part 4

Infra Automation by Terraform for Azure Cloud — Part 3

  • Reading time:6 mins read

In Part 3 of this Terraform Azure Automation series, we focus on authenticating Terraform with Azure to manage infrastructure. First, use the Azure CLI to log in and set your subscription ID. Then, create a Service Principal in Azure Active Directory with Contributor permissions. Set the required environment variables for Terraform to use, including the client ID, secret, subscription ID, and tenant ID. Next, create a terraform-azure directory and configure the Azure provider in a main.tf file. After initializing the Terraform directory, run terraform plan to preview the changes, followed by terraform apply to implement the changes to your Azure infrastructure

Continue ReadingInfra Automation by Terraform for Azure Cloud — Part 3

Terraform Setup in the Azure Cloud VM — Part2

  • Reading time:3 mins read

This tutorial outlines the steps to set up Terraform on an Azure Ubuntu VM. First, update your system and install necessary packages (gnupg, software-properties-common, curl) to authenticate HashiCorp’s repository. Install the HashiCorp GPG key, verify its fingerprint, and add the official repository. Then, use sudo apt-get install terraform to install Terraform. Finally, verify the installation by running terraform -help in the terminal to ensure Terraform is ready for cloud automation in Azure.

Continue ReadingTerraform Setup in the Azure Cloud VM — Part2

Importance of Terraform in Realtime Usecases — Part1

  • Reading time:4 mins read

Terraform is an open-source infrastructure as code (IaC) tool developed by HashiCorp. It is designed to help users define and provision infrastructure in a declarative and version-controlled manner. Infrastructure as Code (IaC): Terraform allows you to define your infrastructure in code, which means you can version-control your infrastructure configurations. This helps in tracking changes, collaborating with team members, and rolling back to previous configurations if needed. It brings the principles of software development, such as versioning and collaboration, to infrastructure management. Multi-Cloud Support: Terraform supports multiple cloud providers, including AWS, Azure, Google Cloud Platform, and others. This multi-cloud support enables organizations to adopt a multi-cloud strategy or migrate between cloud providers with relative ease. It provides a consistent workflow, making it easier to manage infrastructure across different cloud environments. Declarative Syntax:…

Continue ReadingImportance of Terraform in Realtime Usecases — Part1

Securing Sensitive Data in Terraform

  • Reading time:28 mins read

Securing Sensitive Data in Terraform Table of Content Introduction Securing Sensitive Data with Terraform 2.1 Securely managing Terraform variables 2.2 Encrypting Sensitive Data at Rest 2.3 Encrypting Sensitive Data in Transit 2.4 The use of sensitive argument in Terraform to prevent logging of sensitive data …

Continue ReadingSecuring Sensitive Data in Terraform