IaC in Azure

Infrastructure as Code
in Azure



Infrastructure as Code 

    Usually in the Windows world, IaC was done via ARM templates, Azure Bicep, or Terraform. Now look at .NET Aspire's way:


    ARM

       So the old way was Azure Resource Manager (ARM) templates written in JSON.


     Bicep

         Azure Bicep which is human-friendly abstraction layer with type safety and

Intellisense on top of ARM templates. 


     .NET Aspire

        .NET Aspire changes the entire paradigm of IaC by making it Application-Driven 

Infrastructure. Instead of writing YAML or Bicep templates by hand in a separate 

folder, you define your app's dependencies directly in C# code, and .NET Aspire 

automatically creates the IaC and deployment artifacts for you. Steps:

1) you write an AppHost project. 2) .NET Aspire reads the AppHost and creates a

manifest.json file. 3) Azure Developer CLI ingests the manifest file and creates 

Azure Bicep files automatically. 4) Any customizations with inline your C# code 

using the WithBicepInfrastructure extensions. 


     Terraform 

        Totally different way is HashiCorp's Terraform. Uses plugins called "providers". 

uses HashiCorp Configuration Language (HCL) (ASCII, JSON Compatible, proprietary 

tags) to define the desired end-state of your infrastructure. Terraform reads the 

desired end-state and looks at the current state and proposes a plan of attack. 

Terraform then applies the proposed changes after approval. 


Comments

Popular posts from this blog

GHL Email Campaigns

Free AI Tools

Await