### Initialize and Apply Terraform Example Source: https://github.com/azure/azure-verified-modules/blob/main/docs/content/contributing/terraform/contribution-flow.md Locally test module examples by navigating to the example directory, initializing Terraform, and applying the configuration. Use 'az login' for authentication. ```bash cd examples/default az login terraform init terraform plan terraform apply ``` -------------------------------- ### Install PowerShell Source: https://github.com/azure/azure-verified-modules/blob/main/docs/static/includes/experimental/sdd/spec-kit/bicep-quickstart.md Install PowerShell on Windows using winget. ```powershell winget install --id Microsoft.Powershell --source winget ``` -------------------------------- ### Bicep Parameter File Example Source: https://github.com/azure/azure-verified-modules/blob/main/docs/static/includes/experimental/sdd/spec-kit/bicep-quickstart.md Example of a Bicep parameter file (`.bicepparam`) used to customize deployment settings for a legacy VM workload. ```bicep using './main.bicep' // Required parameters param vmSize = 'Standard_D2s_v3' param vmAdminUsername = 'vmadmin' param availabilityZone = 1 param fileShareQuotaGiB = 1024 param logAnalyticsRetentionDays = 30 // Optional: Override resource names // param vmName = 'vm-custom-name' // param vnetName = 'vnet-custom-name' ``` -------------------------------- ### Provide Parameter Input Examples with metadata.example Source: https://github.com/azure/azure-verified-modules/blob/main/docs/content/specs-defs/includes/bicep/shared/non-functional/BCPNFR4.md Use the `@metadata()` decorator with the `example` property to provide sample input values for parameters. This is intended for automatic inclusion in module README files. ```bicep @metadata({ example: 'uksouth' }) @description('Optional. Location for all resources.') param location string = resourceGroup().location @metadata({ example: ''' { keyName: 'myKey' keyVaultResourceId: '/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/my-rg/providers/Microsoft.KeyVault/vaults/myvault' keyVersion: '6d143c1a0a6a453daffec4001e357de0' userAssignedIdentityResourceId '/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity' } ''' }) @description('Optional. The customer managed key definition.') param customerManagedKey customerManagedKeyType ``` -------------------------------- ### Install Git with Winget Source: https://github.com/azure/azure-verified-modules/blob/main/docs/content/contributing/website.md Installs the Git version control system using the Windows Package Manager (winget). ```bash winget install --id 'Git.Git' ``` -------------------------------- ### Install or Upgrade Azure CLI Source: https://github.com/azure/azure-verified-modules/blob/main/docs/static/includes/experimental/sdd/spec-kit/bicep-quickstart.md Instructions for installing or upgrading the Azure CLI on Windows using winget. ```powershell winget install -e --id Microsoft.AzureCLI ``` -------------------------------- ### Diagnostic Settings Input Example Source: https://github.com/azure/azure-verified-modules/blob/main/docs/content/specs-defs/specs/terraform/interfaces.md Example of how to configure diagnostic settings, enabling both logs and metrics. Note that some resources may not support both types. ```terraform diagnostic_settings = { logs = [ { category = "AuditLogs" enabled = true format = "JSON" retention_policy = { enabled = true days = 30 } }, { category = "DiagLogs" enabled = true format = "JSON" } ] metrics = [ { category = "AllMetrics" enabled = true retention_policy = { enabled = true days = 30 } } ] storage_account_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/my-storage-account" workspace_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace" } ``` -------------------------------- ### Bicep Input Example with Values for Tags Source: https://github.com/azure/azure-verified-modules/blob/main/docs/content/specs-defs/specs/bicep/interfaces.md Provides an example of how to input tag values using a parameter in Bicep. This demonstrates setting specific tags for resources. ```bicep { "tags_param": { "environment": "development", "costCenter": "12345" } } ```