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 Pipeline Setup — Part5

  • Reading time:5 mins read

In this part, we explore the benefits and steps involved in setting up a Terraform pipeline for Azure. The pipeline ensures consistent Infrastructure as Code (IaC) deployments and automates provisioning and updates. Integration with version control systems like Git allows for tracking changes and collaboration. The pipeline also enhances security through secrets management for sensitive information. The pipeline is structured with multiple jobs, including Terraform Plan, Review, and Deploy, to manage infrastructure changes efficiently and securely.

Continue ReadingInfra Automation by Terraform Pipeline Setup — Part5