TExcelTAD
Home › Azure & Google Cloud for AWS Users › Bicep, ARM and Google's IaC Options

Bicep, ARM and Google's IaC Options

Each cloud has its own infrastructure-as-code tooling. On AWS that's CloudFormation and the CDK. Azure has ARM templates (JSON) and Bicep, a friendlier language that compiles to ARM. Google Cloud retired its own template engine and now builds on Terraform: Infrastructure Manager runs Terraform configurations as a managed service.

On AWS this is… CloudFormation templates, stacks, change sets and the CDK, from CloudFormation and CDK.

Side by side

AWS Azure Google Cloud
Native template language CloudFormation (JSON/YAML) ARM templates (JSON) and Bicep (compiles to ARM) none of its own now; Terraform HCL
Managed execution CloudFormation stacks ARM deployments at a scope; deployment stacks for lifecycle Infrastructure Manager (managed Terraform runs, state stored for you)
Preview changes change sets what-if (az deployment group what-if) terraform plan / Infra Manager previews
State managed by CloudFormation no state file: ARM compares the template with the live resources Terraform state (Infra Manager stores it)
Programming-language IaC CDK — (Bicep is the recommended authoring language; Pulumi and CDKTF are third-party) — (Terraform CDK, Pulumi, Config Connector for Kubernetes-style YAML)
Legacy — — Deployment Manager: reached end of support on 31 March 2026; migrate to Infrastructure Manager or Terraform
Kubernetes-style control AWS Controllers for Kubernetes (ACK) Azure Service Operator Config Connector

Two things are distinctive about ARM:

  • No state file. An ARM deployment is declarative against the real resources: deploy the same template twice and nothing changes. In the default incremental mode, resources not in the template are left alone. (Complete mode deletes resources in the resource group that aren't in the template; deployment stacks are the safer modern way to manage deletion.)
  • Every resource has an API version. Microsoft.Storage/storageAccounts@2023-05-01 pins the schema the template is written against, which is why old templates keep working.

Bicep

A Bicep file for a private storage account with a container, with parameters and an output:

bicep
@description('Short environment name, used in resource names')
@allowed(['dev', 'prod'])
param env string

param location string = resourceGroup().location

var storageName = 'stshop${env}${uniqueString(resourceGroup().id)}'

resource st 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: take(storageName, 24)
  location: location
  sku: { name: env == 'prod' ? 'Standard_ZRS' : 'Standard_LRS' }
  kind: 'StorageV2'
  tags: { env: env, app: 'shop', 'managed-by': 'bicep' }
  properties: {
    minimumTlsVersion: 'TLS1_2'
    allowBlobPublicAccess: false
    allowSharedKeyAccess: false
    supportsHttpsTrafficOnly: true
  }
}

resource blob 'Microsoft.Storage/storageAccounts/blobServices@2023-05-01' = {
  parent: st
  name: 'default'
}

resource invoices 'Microsoft.Storage/storageAccounts/blobServices/containers@2023-05-01' = {
  parent: blob
  name: 'invoices'
}

output storageAccountId string = st.id

Things to notice: uniqueString(resourceGroup().id) makes a stable, unique suffix for globally unique names; parent: builds the child resource ID; and the types are exactly the resource types from the mental model lesson.

Deploying it (sample session):

bash
az deployment group what-if -g rg-shop-dev-data --template-file storage.bicep --parameters env=dev
az deployment group create  -g rg-shop-dev-data --template-file storage.bicep --parameters env=dev
az bicep build --file storage.bicep          # emits storage.json, the ARM template

Sample what-if output (trimmed):

text
Resource changes: 3 to create.

  + Microsoft.Storage/storageAccounts/stshopdevq2w7k3m5x1abc [2023-05-01]
      kind:                              "StorageV2"
      location:                          "westeurope"
      properties.allowBlobPublicAccess:  false
      properties.minimumTlsVersion:      "TLS1_2"
      sku.name:                          "Standard_LRS"
  + Microsoft.Storage/storageAccounts/stshopdevq2w7k3m5x1abc/blobServices/default [2023-05-01]
  + Microsoft.Storage/storageAccounts/stshopdevq2w7k3m5x1abc/blobServices/default/containers/invoices [2023-05-01]

The same storage account in an ARM template (what az bicep build produces, simplified):

json
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "env": { "type": "string", "allowedValues": ["dev", "prod"] },
    "location": { "type": "string", "defaultValue": "[resourceGroup().location]" }
  },
  "resources": [{
    "type": "Microsoft.Storage/storageAccounts",
    "apiVersion": "2023-05-01",
    "name": "[take(format('stshop{0}{1}', parameters('env'), uniqueString(resourceGroup().id)), 24)]",
    "location": "[parameters('location')]",
    "sku": { "name": "[if(equals(parameters('env'), 'prod'), 'Standard_ZRS', 'Standard_LRS')]" },
    "kind": "StorageV2",
    "properties": { "minimumTlsVersion": "TLS1_2", "allowBlobPublicAccess": false }
  }]
}

Bicep is shorter, has type checking and IntelliSense from the resource schemas, and is what Microsoft recommends for new work. You will still read ARM JSON: exported templates, the portal's "Export template", and older repositories use it.

Model: what an incremental deployment does

ARM compares template and reality without a state file. A model of incremental vs complete mode on one resource group:

python · try it yourself
live = {"stshopdev01": {"sku": "Standard_LRS"}, "kv-shop-dev": {"sku": "standard"},
        "vm-old-test": {"size": "Standard_B2s"}}
template = {"stshopdev01": {"sku": "Standard_ZRS"}, "kv-shop-dev": {"sku": "standard"},
            "log-shop-dev": {"retentionInDays": 30}}

def deploy(mode):
    plan = []
    for name, props in template.items():
        if name not in live:
            plan.append(("+ create", name))
        elif live[name] != props:
            plan.append(("~ modify", name))
        else:
            plan.append(("= no change", name))
    for name in live:
        if name not in template:
            plan.append(("- delete" if mode == "complete" else "* ignore (not in template)", name))
    return plan

for mode in ["incremental", "complete"]:
    print(mode)
    for action, name in deploy(mode):
        print(f"   {action:<28}{name}")
incremental
   ~ modify                    stshopdev01
   = no change                 kv-shop-dev
   + create                    log-shop-dev
   * ignore (not in template)  vm-old-test
complete
   ~ modify                    stshopdev01
   = no change                 kv-shop-dev
   + create                    log-shop-dev
   - delete                    vm-old-test

That is also how what-if labels its changes: + create, ~ modify, - delete, = no change, * ignore.

Google Cloud: Infrastructure Manager

Infrastructure Manager takes a Terraform configuration (from a local directory, a Git repository or Cloud Storage), runs terraform plan/apply inside Cloud Build with a service account you choose, and stores the state for you. Sample session:

bash
gcloud infra-manager deployments apply projects/shop-prod-4821/locations/europe-west1/deployments/shop-network \
    --service-account=projects/shop-prod-4821/serviceAccounts/infra@shop-prod-4821.iam.gserviceaccount.com \
    --local-source=./network \
    --input-values=project_id=shop-prod-4821,region=europe-west1
gcloud infra-manager deployments describe projects/shop-prod-4821/locations/europe-west1/deployments/shop-network

Many teams skip it and run Terraform themselves from CI with a GCS state backend; the next lesson covers both providers.

Test yourself

What does Bicep compile to?

  1. Terraform HCL
  2. ARM template JSON
  3. CloudFormation YAML
  4. Python

In ARM's default incremental mode, what happens to a resource that exists in the resource group but not in the template?

  1. It is deleted
  2. It is left unchanged
  3. Deployment fails
  4. It is moved

What should a Google Cloud team still using Deployment Manager do?

  1. Nothing, it is current
  2. Migrate: it reached end of support in March 2026; use Infrastructure Manager or Terraform
  3. Switch to ARM
  4. Move to CloudFormation