[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-hashicorp-azure-image-builder":3,"mdc-fptqgh-key":34,"related-repo-hashicorp-azure-image-builder":1565,"related-org-hashicorp-azure-image-builder":1653},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":29,"sourceUrl":32,"mdContent":33},"azure-image-builder","build Azure managed images with Packer","Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"hashicorp","HashiCorp","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fhashicorp.png",[12,16,19],{"name":13,"slug":14,"type":15},"Azure","azure","tag",{"name":17,"slug":18,"type":15},"Deployment","deployment",{"name":20,"slug":21,"type":15},"Packer","packer",728,"https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fagent-skills","2026-04-06T18:25:06.590174",null,104,[28],"doormat-managed",{"repoUrl":23,"stars":22,"forks":26,"topics":30,"description":31},[28],"A collection of Agent skills and Claude Code plugins for HashiCorp products.","https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fagent-skills\u002Ftree\u002FHEAD\u002Fpacker\u002Fbuilders\u002Fskills\u002Fazure-image-builder","---\nname: azure-image-builder\ndescription: Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.\n---\n\n# Azure Image Builder\n\nBuild Azure managed images and Azure Compute Gallery images using Packer's `azure-arm` builder.\n\n**Reference:** [Azure ARM Builder](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fpacker\u002Fintegrations\u002Fhashicorp\u002Fazure\u002Flatest\u002Fcomponents\u002Fbuilder\u002Farm)\n\n> **Note:** Building Azure images incurs costs (compute, storage, data transfer). Builds typically take 15-45 minutes depending on provisioning and OS.\n\n## Basic Managed Image\n\n```hcl\npacker {\n  required_plugins {\n    azure = {\n      source  = \"github.com\u002Fhashicorp\u002Fazure\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\nvariable \"client_id\" {\n  type      = string\n  sensitive = true\n}\n\nvariable \"client_secret\" {\n  type      = string\n  sensitive = true\n}\n\nvariable \"subscription_id\" {\n  type = string\n}\n\nvariable \"tenant_id\" {\n  type = string\n}\n\nvariable \"resource_group\" {\n  type    = string\n  default = \"packer-images-rg\"\n}\n\nlocals {\n  timestamp = regex_replace(timestamp(), \"[- TZ:]\", \"\")\n}\n\nsource \"azure-arm\" \"ubuntu\" {\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  subscription_id = var.subscription_id\n  tenant_id       = var.tenant_id\n\n  managed_image_resource_group_name = var.resource_group\n  managed_image_name                = \"my-app-${local.timestamp}\"\n\n  os_type         = \"Linux\"\n  image_publisher = \"Canonical\"\n  image_offer     = \"0001-com-ubuntu-server-jammy\"\n  image_sku       = \"22_04-lts-gen2\"\n\n  location = \"East US\"\n  vm_size  = \"Standard_B2s\"\n\n  azure_tags = {\n    Name      = \"my-app\"\n    BuildDate = local.timestamp\n  }\n}\n\nbuild {\n  sources = [\"source.azure-arm.ubuntu\"]\n\n  provisioner \"shell\" {\n    inline = [\n      \"sudo apt-get update\",\n      \"sudo apt-get upgrade -y\",\n    ]\n  }\n}\n```\n\n## Azure Compute Gallery\n\n```hcl\nsource \"azure-arm\" \"ubuntu\" {\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  subscription_id = var.subscription_id\n  tenant_id       = var.tenant_id\n\n  os_type         = \"Linux\"\n  image_publisher = \"Canonical\"\n  image_offer     = \"0001-com-ubuntu-server-jammy\"\n  image_sku       = \"22_04-lts-gen2\"\n\n  location = \"East US\"\n  vm_size  = \"Standard_B2s\"\n\n  shared_image_gallery_destination {\n    resource_group       = \"gallery-rg\"\n    gallery_name         = \"myImageGallery\"\n    image_name           = \"ubuntu-webapp\"\n    image_version        = \"1.0.${formatdate(\"YYYYMMDD\", timestamp())}\"\n    replication_regions  = [\"East US\", \"West US 2\"]\n    storage_account_type = \"Standard_LRS\"\n  }\n}\n```\n\n## Authentication\n\n### Service Principal\n```bash\n# Create service principal\naz ad sp create-for-rbac \\\n  --name \"packer-sp\" \\\n  --role Contributor \\\n  --scopes \u002Fsubscriptions\u002F\u003Csubscription-id>\n\n# Set environment variables\nexport ARM_CLIENT_ID=\"\u003Cclient-id>\"\nexport ARM_CLIENT_SECRET=\"\u003Cclient-secret>\"\nexport ARM_SUBSCRIPTION_ID=\"\u003Csubscription-id>\"\nexport ARM_TENANT_ID=\"\u003Ctenant-id>\"\n```\n\n### Managed Identity\n```hcl\nsource \"azure-arm\" \"ubuntu\" {\n  use_azure_cli_auth = true\n  subscription_id    = var.subscription_id\n  # ... rest of configuration\n}\n```\n\n## Build Commands\n\n```bash\n# Set authentication\nexport ARM_CLIENT_ID=\"your-client-id\"\nexport ARM_CLIENT_SECRET=\"your-client-secret\"\nexport ARM_SUBSCRIPTION_ID=\"your-subscription-id\"\nexport ARM_TENANT_ID=\"your-tenant-id\"\n\n# Initialize plugins\npacker init .\n\n# Validate template\npacker validate .\n\n# Build image\npacker build .\n```\n\n## Common Issues\n\n**Authentication Failed**\n- Verify service principal credentials\n- Ensure Contributor role on resource group\n- Check subscription and tenant IDs\n\n**Compute Gallery Version Exists**\n- Image versions are immutable\n- Use unique version numbers with date\u002Fbuild number\n- Cannot overwrite existing versions\n\n**Timeout During Provisioning**\n- Check network connectivity from build VM\n- Verify NSG rules allow required traffic\n- Increase timeout if needed\n\n## References\n\n- [Azure ARM Builder](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fpacker\u002Fintegrations\u002Fhashicorp\u002Fazure\u002Flatest\u002Fcomponents\u002Fbuilder\u002Farm)\n- [Azure Compute Gallery](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fvirtual-machines\u002Fazure-compute-gallery)\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,62,82,96,103,713,719,894,900,907,1169,1175,1220,1226,1447,1453,1461,1481,1489,1507,1515,1533,1539,1559],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Azure Image Builder",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51,53,60],{"type":45,"value":52},"Build Azure managed images and Azure Compute Gallery images using Packer's ",{"type":40,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"azure-arm",{"type":45,"value":61}," builder.",{"type":40,"tag":48,"props":63,"children":64},{},[65,71,73],{"type":40,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":45,"value":70},"Reference:",{"type":45,"value":72}," ",{"type":40,"tag":74,"props":75,"children":79},"a",{"href":76,"rel":77},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fpacker\u002Fintegrations\u002Fhashicorp\u002Fazure\u002Flatest\u002Fcomponents\u002Fbuilder\u002Farm",[78],"nofollow",[80],{"type":45,"value":81},"Azure ARM Builder",{"type":40,"tag":83,"props":84,"children":85},"blockquote",{},[86],{"type":40,"tag":48,"props":87,"children":88},{},[89,94],{"type":40,"tag":66,"props":90,"children":91},{},[92],{"type":45,"value":93},"Note:",{"type":45,"value":95}," Building Azure images incurs costs (compute, storage, data transfer). Builds typically take 15-45 minutes depending on provisioning and OS.",{"type":40,"tag":97,"props":98,"children":100},"h2",{"id":99},"basic-managed-image",[101],{"type":45,"value":102},"Basic Managed Image",{"type":40,"tag":104,"props":105,"children":110},"pre",{"className":106,"code":107,"language":108,"meta":109,"style":109},"language-hcl shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","packer {\n  required_plugins {\n    azure = {\n      source  = \"github.com\u002Fhashicorp\u002Fazure\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\nvariable \"client_id\" {\n  type      = string\n  sensitive = true\n}\n\nvariable \"client_secret\" {\n  type      = string\n  sensitive = true\n}\n\nvariable \"subscription_id\" {\n  type = string\n}\n\nvariable \"tenant_id\" {\n  type = string\n}\n\nvariable \"resource_group\" {\n  type    = string\n  default = \"packer-images-rg\"\n}\n\nlocals {\n  timestamp = regex_replace(timestamp(), \"[- TZ:]\", \"\")\n}\n\nsource \"azure-arm\" \"ubuntu\" {\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  subscription_id = var.subscription_id\n  tenant_id       = var.tenant_id\n\n  managed_image_resource_group_name = var.resource_group\n  managed_image_name                = \"my-app-${local.timestamp}\"\n\n  os_type         = \"Linux\"\n  image_publisher = \"Canonical\"\n  image_offer     = \"0001-com-ubuntu-server-jammy\"\n  image_sku       = \"22_04-lts-gen2\"\n\n  location = \"East US\"\n  vm_size  = \"Standard_B2s\"\n\n  azure_tags = {\n    Name      = \"my-app\"\n    BuildDate = local.timestamp\n  }\n}\n\nbuild {\n  sources = [\"source.azure-arm.ubuntu\"]\n\n  provisioner \"shell\" {\n    inline = [\n      \"sudo apt-get update\",\n      \"sudo apt-get upgrade -y\",\n    ]\n  }\n}\n","hcl","",[111],{"type":40,"tag":54,"props":112,"children":113},{"__ignoreMap":109},[114,125,134,143,152,161,170,179,188,198,207,216,225,233,241,250,258,266,274,282,291,300,308,316,325,333,341,349,358,367,376,384,392,401,410,418,426,435,444,453,462,471,479,488,497,505,514,523,532,541,549,558,567,575,584,593,602,610,618,626,635,644,652,661,670,679,688,697,705],{"type":40,"tag":115,"props":116,"children":119},"span",{"class":117,"line":118},"line",1,[120],{"type":40,"tag":115,"props":121,"children":122},{},[123],{"type":45,"value":124},"packer {\n",{"type":40,"tag":115,"props":126,"children":128},{"class":117,"line":127},2,[129],{"type":40,"tag":115,"props":130,"children":131},{},[132],{"type":45,"value":133},"  required_plugins {\n",{"type":40,"tag":115,"props":135,"children":137},{"class":117,"line":136},3,[138],{"type":40,"tag":115,"props":139,"children":140},{},[141],{"type":45,"value":142},"    azure = {\n",{"type":40,"tag":115,"props":144,"children":146},{"class":117,"line":145},4,[147],{"type":40,"tag":115,"props":148,"children":149},{},[150],{"type":45,"value":151},"      source  = \"github.com\u002Fhashicorp\u002Fazure\"\n",{"type":40,"tag":115,"props":153,"children":155},{"class":117,"line":154},5,[156],{"type":40,"tag":115,"props":157,"children":158},{},[159],{"type":45,"value":160},"      version = \"~> 2.0\"\n",{"type":40,"tag":115,"props":162,"children":164},{"class":117,"line":163},6,[165],{"type":40,"tag":115,"props":166,"children":167},{},[168],{"type":45,"value":169},"    }\n",{"type":40,"tag":115,"props":171,"children":173},{"class":117,"line":172},7,[174],{"type":40,"tag":115,"props":175,"children":176},{},[177],{"type":45,"value":178},"  }\n",{"type":40,"tag":115,"props":180,"children":182},{"class":117,"line":181},8,[183],{"type":40,"tag":115,"props":184,"children":185},{},[186],{"type":45,"value":187},"}\n",{"type":40,"tag":115,"props":189,"children":191},{"class":117,"line":190},9,[192],{"type":40,"tag":115,"props":193,"children":195},{"emptyLinePlaceholder":194},true,[196],{"type":45,"value":197},"\n",{"type":40,"tag":115,"props":199,"children":201},{"class":117,"line":200},10,[202],{"type":40,"tag":115,"props":203,"children":204},{},[205],{"type":45,"value":206},"variable \"client_id\" {\n",{"type":40,"tag":115,"props":208,"children":210},{"class":117,"line":209},11,[211],{"type":40,"tag":115,"props":212,"children":213},{},[214],{"type":45,"value":215},"  type      = string\n",{"type":40,"tag":115,"props":217,"children":219},{"class":117,"line":218},12,[220],{"type":40,"tag":115,"props":221,"children":222},{},[223],{"type":45,"value":224},"  sensitive = true\n",{"type":40,"tag":115,"props":226,"children":228},{"class":117,"line":227},13,[229],{"type":40,"tag":115,"props":230,"children":231},{},[232],{"type":45,"value":187},{"type":40,"tag":115,"props":234,"children":236},{"class":117,"line":235},14,[237],{"type":40,"tag":115,"props":238,"children":239},{"emptyLinePlaceholder":194},[240],{"type":45,"value":197},{"type":40,"tag":115,"props":242,"children":244},{"class":117,"line":243},15,[245],{"type":40,"tag":115,"props":246,"children":247},{},[248],{"type":45,"value":249},"variable \"client_secret\" {\n",{"type":40,"tag":115,"props":251,"children":253},{"class":117,"line":252},16,[254],{"type":40,"tag":115,"props":255,"children":256},{},[257],{"type":45,"value":215},{"type":40,"tag":115,"props":259,"children":261},{"class":117,"line":260},17,[262],{"type":40,"tag":115,"props":263,"children":264},{},[265],{"type":45,"value":224},{"type":40,"tag":115,"props":267,"children":269},{"class":117,"line":268},18,[270],{"type":40,"tag":115,"props":271,"children":272},{},[273],{"type":45,"value":187},{"type":40,"tag":115,"props":275,"children":277},{"class":117,"line":276},19,[278],{"type":40,"tag":115,"props":279,"children":280},{"emptyLinePlaceholder":194},[281],{"type":45,"value":197},{"type":40,"tag":115,"props":283,"children":285},{"class":117,"line":284},20,[286],{"type":40,"tag":115,"props":287,"children":288},{},[289],{"type":45,"value":290},"variable \"subscription_id\" {\n",{"type":40,"tag":115,"props":292,"children":294},{"class":117,"line":293},21,[295],{"type":40,"tag":115,"props":296,"children":297},{},[298],{"type":45,"value":299},"  type = string\n",{"type":40,"tag":115,"props":301,"children":303},{"class":117,"line":302},22,[304],{"type":40,"tag":115,"props":305,"children":306},{},[307],{"type":45,"value":187},{"type":40,"tag":115,"props":309,"children":311},{"class":117,"line":310},23,[312],{"type":40,"tag":115,"props":313,"children":314},{"emptyLinePlaceholder":194},[315],{"type":45,"value":197},{"type":40,"tag":115,"props":317,"children":319},{"class":117,"line":318},24,[320],{"type":40,"tag":115,"props":321,"children":322},{},[323],{"type":45,"value":324},"variable \"tenant_id\" {\n",{"type":40,"tag":115,"props":326,"children":328},{"class":117,"line":327},25,[329],{"type":40,"tag":115,"props":330,"children":331},{},[332],{"type":45,"value":299},{"type":40,"tag":115,"props":334,"children":336},{"class":117,"line":335},26,[337],{"type":40,"tag":115,"props":338,"children":339},{},[340],{"type":45,"value":187},{"type":40,"tag":115,"props":342,"children":344},{"class":117,"line":343},27,[345],{"type":40,"tag":115,"props":346,"children":347},{"emptyLinePlaceholder":194},[348],{"type":45,"value":197},{"type":40,"tag":115,"props":350,"children":352},{"class":117,"line":351},28,[353],{"type":40,"tag":115,"props":354,"children":355},{},[356],{"type":45,"value":357},"variable \"resource_group\" {\n",{"type":40,"tag":115,"props":359,"children":361},{"class":117,"line":360},29,[362],{"type":40,"tag":115,"props":363,"children":364},{},[365],{"type":45,"value":366},"  type    = string\n",{"type":40,"tag":115,"props":368,"children":370},{"class":117,"line":369},30,[371],{"type":40,"tag":115,"props":372,"children":373},{},[374],{"type":45,"value":375},"  default = \"packer-images-rg\"\n",{"type":40,"tag":115,"props":377,"children":379},{"class":117,"line":378},31,[380],{"type":40,"tag":115,"props":381,"children":382},{},[383],{"type":45,"value":187},{"type":40,"tag":115,"props":385,"children":387},{"class":117,"line":386},32,[388],{"type":40,"tag":115,"props":389,"children":390},{"emptyLinePlaceholder":194},[391],{"type":45,"value":197},{"type":40,"tag":115,"props":393,"children":395},{"class":117,"line":394},33,[396],{"type":40,"tag":115,"props":397,"children":398},{},[399],{"type":45,"value":400},"locals {\n",{"type":40,"tag":115,"props":402,"children":404},{"class":117,"line":403},34,[405],{"type":40,"tag":115,"props":406,"children":407},{},[408],{"type":45,"value":409},"  timestamp = regex_replace(timestamp(), \"[- TZ:]\", \"\")\n",{"type":40,"tag":115,"props":411,"children":413},{"class":117,"line":412},35,[414],{"type":40,"tag":115,"props":415,"children":416},{},[417],{"type":45,"value":187},{"type":40,"tag":115,"props":419,"children":421},{"class":117,"line":420},36,[422],{"type":40,"tag":115,"props":423,"children":424},{"emptyLinePlaceholder":194},[425],{"type":45,"value":197},{"type":40,"tag":115,"props":427,"children":429},{"class":117,"line":428},37,[430],{"type":40,"tag":115,"props":431,"children":432},{},[433],{"type":45,"value":434},"source \"azure-arm\" \"ubuntu\" {\n",{"type":40,"tag":115,"props":436,"children":438},{"class":117,"line":437},38,[439],{"type":40,"tag":115,"props":440,"children":441},{},[442],{"type":45,"value":443},"  client_id       = var.client_id\n",{"type":40,"tag":115,"props":445,"children":447},{"class":117,"line":446},39,[448],{"type":40,"tag":115,"props":449,"children":450},{},[451],{"type":45,"value":452},"  client_secret   = var.client_secret\n",{"type":40,"tag":115,"props":454,"children":456},{"class":117,"line":455},40,[457],{"type":40,"tag":115,"props":458,"children":459},{},[460],{"type":45,"value":461},"  subscription_id = var.subscription_id\n",{"type":40,"tag":115,"props":463,"children":465},{"class":117,"line":464},41,[466],{"type":40,"tag":115,"props":467,"children":468},{},[469],{"type":45,"value":470},"  tenant_id       = var.tenant_id\n",{"type":40,"tag":115,"props":472,"children":474},{"class":117,"line":473},42,[475],{"type":40,"tag":115,"props":476,"children":477},{"emptyLinePlaceholder":194},[478],{"type":45,"value":197},{"type":40,"tag":115,"props":480,"children":482},{"class":117,"line":481},43,[483],{"type":40,"tag":115,"props":484,"children":485},{},[486],{"type":45,"value":487},"  managed_image_resource_group_name = var.resource_group\n",{"type":40,"tag":115,"props":489,"children":491},{"class":117,"line":490},44,[492],{"type":40,"tag":115,"props":493,"children":494},{},[495],{"type":45,"value":496},"  managed_image_name                = \"my-app-${local.timestamp}\"\n",{"type":40,"tag":115,"props":498,"children":500},{"class":117,"line":499},45,[501],{"type":40,"tag":115,"props":502,"children":503},{"emptyLinePlaceholder":194},[504],{"type":45,"value":197},{"type":40,"tag":115,"props":506,"children":508},{"class":117,"line":507},46,[509],{"type":40,"tag":115,"props":510,"children":511},{},[512],{"type":45,"value":513},"  os_type         = \"Linux\"\n",{"type":40,"tag":115,"props":515,"children":517},{"class":117,"line":516},47,[518],{"type":40,"tag":115,"props":519,"children":520},{},[521],{"type":45,"value":522},"  image_publisher = \"Canonical\"\n",{"type":40,"tag":115,"props":524,"children":526},{"class":117,"line":525},48,[527],{"type":40,"tag":115,"props":528,"children":529},{},[530],{"type":45,"value":531},"  image_offer     = \"0001-com-ubuntu-server-jammy\"\n",{"type":40,"tag":115,"props":533,"children":535},{"class":117,"line":534},49,[536],{"type":40,"tag":115,"props":537,"children":538},{},[539],{"type":45,"value":540},"  image_sku       = \"22_04-lts-gen2\"\n",{"type":40,"tag":115,"props":542,"children":544},{"class":117,"line":543},50,[545],{"type":40,"tag":115,"props":546,"children":547},{"emptyLinePlaceholder":194},[548],{"type":45,"value":197},{"type":40,"tag":115,"props":550,"children":552},{"class":117,"line":551},51,[553],{"type":40,"tag":115,"props":554,"children":555},{},[556],{"type":45,"value":557},"  location = \"East US\"\n",{"type":40,"tag":115,"props":559,"children":561},{"class":117,"line":560},52,[562],{"type":40,"tag":115,"props":563,"children":564},{},[565],{"type":45,"value":566},"  vm_size  = \"Standard_B2s\"\n",{"type":40,"tag":115,"props":568,"children":570},{"class":117,"line":569},53,[571],{"type":40,"tag":115,"props":572,"children":573},{"emptyLinePlaceholder":194},[574],{"type":45,"value":197},{"type":40,"tag":115,"props":576,"children":578},{"class":117,"line":577},54,[579],{"type":40,"tag":115,"props":580,"children":581},{},[582],{"type":45,"value":583},"  azure_tags = {\n",{"type":40,"tag":115,"props":585,"children":587},{"class":117,"line":586},55,[588],{"type":40,"tag":115,"props":589,"children":590},{},[591],{"type":45,"value":592},"    Name      = \"my-app\"\n",{"type":40,"tag":115,"props":594,"children":596},{"class":117,"line":595},56,[597],{"type":40,"tag":115,"props":598,"children":599},{},[600],{"type":45,"value":601},"    BuildDate = local.timestamp\n",{"type":40,"tag":115,"props":603,"children":605},{"class":117,"line":604},57,[606],{"type":40,"tag":115,"props":607,"children":608},{},[609],{"type":45,"value":178},{"type":40,"tag":115,"props":611,"children":613},{"class":117,"line":612},58,[614],{"type":40,"tag":115,"props":615,"children":616},{},[617],{"type":45,"value":187},{"type":40,"tag":115,"props":619,"children":621},{"class":117,"line":620},59,[622],{"type":40,"tag":115,"props":623,"children":624},{"emptyLinePlaceholder":194},[625],{"type":45,"value":197},{"type":40,"tag":115,"props":627,"children":629},{"class":117,"line":628},60,[630],{"type":40,"tag":115,"props":631,"children":632},{},[633],{"type":45,"value":634},"build {\n",{"type":40,"tag":115,"props":636,"children":638},{"class":117,"line":637},61,[639],{"type":40,"tag":115,"props":640,"children":641},{},[642],{"type":45,"value":643},"  sources = [\"source.azure-arm.ubuntu\"]\n",{"type":40,"tag":115,"props":645,"children":647},{"class":117,"line":646},62,[648],{"type":40,"tag":115,"props":649,"children":650},{"emptyLinePlaceholder":194},[651],{"type":45,"value":197},{"type":40,"tag":115,"props":653,"children":655},{"class":117,"line":654},63,[656],{"type":40,"tag":115,"props":657,"children":658},{},[659],{"type":45,"value":660},"  provisioner \"shell\" {\n",{"type":40,"tag":115,"props":662,"children":664},{"class":117,"line":663},64,[665],{"type":40,"tag":115,"props":666,"children":667},{},[668],{"type":45,"value":669},"    inline = [\n",{"type":40,"tag":115,"props":671,"children":673},{"class":117,"line":672},65,[674],{"type":40,"tag":115,"props":675,"children":676},{},[677],{"type":45,"value":678},"      \"sudo apt-get update\",\n",{"type":40,"tag":115,"props":680,"children":682},{"class":117,"line":681},66,[683],{"type":40,"tag":115,"props":684,"children":685},{},[686],{"type":45,"value":687},"      \"sudo apt-get upgrade -y\",\n",{"type":40,"tag":115,"props":689,"children":691},{"class":117,"line":690},67,[692],{"type":40,"tag":115,"props":693,"children":694},{},[695],{"type":45,"value":696},"    ]\n",{"type":40,"tag":115,"props":698,"children":700},{"class":117,"line":699},68,[701],{"type":40,"tag":115,"props":702,"children":703},{},[704],{"type":45,"value":178},{"type":40,"tag":115,"props":706,"children":708},{"class":117,"line":707},69,[709],{"type":40,"tag":115,"props":710,"children":711},{},[712],{"type":45,"value":187},{"type":40,"tag":97,"props":714,"children":716},{"id":715},"azure-compute-gallery",[717],{"type":45,"value":718},"Azure Compute Gallery",{"type":40,"tag":104,"props":720,"children":722},{"className":106,"code":721,"language":108,"meta":109,"style":109},"source \"azure-arm\" \"ubuntu\" {\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  subscription_id = var.subscription_id\n  tenant_id       = var.tenant_id\n\n  os_type         = \"Linux\"\n  image_publisher = \"Canonical\"\n  image_offer     = \"0001-com-ubuntu-server-jammy\"\n  image_sku       = \"22_04-lts-gen2\"\n\n  location = \"East US\"\n  vm_size  = \"Standard_B2s\"\n\n  shared_image_gallery_destination {\n    resource_group       = \"gallery-rg\"\n    gallery_name         = \"myImageGallery\"\n    image_name           = \"ubuntu-webapp\"\n    image_version        = \"1.0.${formatdate(\"YYYYMMDD\", timestamp())}\"\n    replication_regions  = [\"East US\", \"West US 2\"]\n    storage_account_type = \"Standard_LRS\"\n  }\n}\n",[723],{"type":40,"tag":54,"props":724,"children":725},{"__ignoreMap":109},[726,733,740,747,754,761,768,775,782,789,796,803,810,817,824,832,840,848,856,864,872,880,887],{"type":40,"tag":115,"props":727,"children":728},{"class":117,"line":118},[729],{"type":40,"tag":115,"props":730,"children":731},{},[732],{"type":45,"value":434},{"type":40,"tag":115,"props":734,"children":735},{"class":117,"line":127},[736],{"type":40,"tag":115,"props":737,"children":738},{},[739],{"type":45,"value":443},{"type":40,"tag":115,"props":741,"children":742},{"class":117,"line":136},[743],{"type":40,"tag":115,"props":744,"children":745},{},[746],{"type":45,"value":452},{"type":40,"tag":115,"props":748,"children":749},{"class":117,"line":145},[750],{"type":40,"tag":115,"props":751,"children":752},{},[753],{"type":45,"value":461},{"type":40,"tag":115,"props":755,"children":756},{"class":117,"line":154},[757],{"type":40,"tag":115,"props":758,"children":759},{},[760],{"type":45,"value":470},{"type":40,"tag":115,"props":762,"children":763},{"class":117,"line":163},[764],{"type":40,"tag":115,"props":765,"children":766},{"emptyLinePlaceholder":194},[767],{"type":45,"value":197},{"type":40,"tag":115,"props":769,"children":770},{"class":117,"line":172},[771],{"type":40,"tag":115,"props":772,"children":773},{},[774],{"type":45,"value":513},{"type":40,"tag":115,"props":776,"children":777},{"class":117,"line":181},[778],{"type":40,"tag":115,"props":779,"children":780},{},[781],{"type":45,"value":522},{"type":40,"tag":115,"props":783,"children":784},{"class":117,"line":190},[785],{"type":40,"tag":115,"props":786,"children":787},{},[788],{"type":45,"value":531},{"type":40,"tag":115,"props":790,"children":791},{"class":117,"line":200},[792],{"type":40,"tag":115,"props":793,"children":794},{},[795],{"type":45,"value":540},{"type":40,"tag":115,"props":797,"children":798},{"class":117,"line":209},[799],{"type":40,"tag":115,"props":800,"children":801},{"emptyLinePlaceholder":194},[802],{"type":45,"value":197},{"type":40,"tag":115,"props":804,"children":805},{"class":117,"line":218},[806],{"type":40,"tag":115,"props":807,"children":808},{},[809],{"type":45,"value":557},{"type":40,"tag":115,"props":811,"children":812},{"class":117,"line":227},[813],{"type":40,"tag":115,"props":814,"children":815},{},[816],{"type":45,"value":566},{"type":40,"tag":115,"props":818,"children":819},{"class":117,"line":235},[820],{"type":40,"tag":115,"props":821,"children":822},{"emptyLinePlaceholder":194},[823],{"type":45,"value":197},{"type":40,"tag":115,"props":825,"children":826},{"class":117,"line":243},[827],{"type":40,"tag":115,"props":828,"children":829},{},[830],{"type":45,"value":831},"  shared_image_gallery_destination {\n",{"type":40,"tag":115,"props":833,"children":834},{"class":117,"line":252},[835],{"type":40,"tag":115,"props":836,"children":837},{},[838],{"type":45,"value":839},"    resource_group       = \"gallery-rg\"\n",{"type":40,"tag":115,"props":841,"children":842},{"class":117,"line":260},[843],{"type":40,"tag":115,"props":844,"children":845},{},[846],{"type":45,"value":847},"    gallery_name         = \"myImageGallery\"\n",{"type":40,"tag":115,"props":849,"children":850},{"class":117,"line":268},[851],{"type":40,"tag":115,"props":852,"children":853},{},[854],{"type":45,"value":855},"    image_name           = \"ubuntu-webapp\"\n",{"type":40,"tag":115,"props":857,"children":858},{"class":117,"line":276},[859],{"type":40,"tag":115,"props":860,"children":861},{},[862],{"type":45,"value":863},"    image_version        = \"1.0.${formatdate(\"YYYYMMDD\", timestamp())}\"\n",{"type":40,"tag":115,"props":865,"children":866},{"class":117,"line":284},[867],{"type":40,"tag":115,"props":868,"children":869},{},[870],{"type":45,"value":871},"    replication_regions  = [\"East US\", \"West US 2\"]\n",{"type":40,"tag":115,"props":873,"children":874},{"class":117,"line":293},[875],{"type":40,"tag":115,"props":876,"children":877},{},[878],{"type":45,"value":879},"    storage_account_type = \"Standard_LRS\"\n",{"type":40,"tag":115,"props":881,"children":882},{"class":117,"line":302},[883],{"type":40,"tag":115,"props":884,"children":885},{},[886],{"type":45,"value":178},{"type":40,"tag":115,"props":888,"children":889},{"class":117,"line":310},[890],{"type":40,"tag":115,"props":891,"children":892},{},[893],{"type":45,"value":187},{"type":40,"tag":97,"props":895,"children":897},{"id":896},"authentication",[898],{"type":45,"value":899},"Authentication",{"type":40,"tag":901,"props":902,"children":904},"h3",{"id":903},"service-principal",[905],{"type":45,"value":906},"Service Principal",{"type":40,"tag":104,"props":908,"children":912},{"className":909,"code":910,"language":911,"meta":109,"style":109},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Create service principal\naz ad sp create-for-rbac \\\n  --name \"packer-sp\" \\\n  --role Contributor \\\n  --scopes \u002Fsubscriptions\u002F\u003Csubscription-id>\n\n# Set environment variables\nexport ARM_CLIENT_ID=\"\u003Cclient-id>\"\nexport ARM_CLIENT_SECRET=\"\u003Cclient-secret>\"\nexport ARM_SUBSCRIPTION_ID=\"\u003Csubscription-id>\"\nexport ARM_TENANT_ID=\"\u003Ctenant-id>\"\n","bash",[913],{"type":40,"tag":54,"props":914,"children":915},{"__ignoreMap":109},[916,925,956,984,1001,1034,1041,1049,1082,1111,1140],{"type":40,"tag":115,"props":917,"children":918},{"class":117,"line":118},[919],{"type":40,"tag":115,"props":920,"children":922},{"style":921},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[923],{"type":45,"value":924},"# Create service principal\n",{"type":40,"tag":115,"props":926,"children":927},{"class":117,"line":127},[928,934,940,945,950],{"type":40,"tag":115,"props":929,"children":931},{"style":930},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[932],{"type":45,"value":933},"az",{"type":40,"tag":115,"props":935,"children":937},{"style":936},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[938],{"type":45,"value":939}," ad",{"type":40,"tag":115,"props":941,"children":942},{"style":936},[943],{"type":45,"value":944}," sp",{"type":40,"tag":115,"props":946,"children":947},{"style":936},[948],{"type":45,"value":949}," create-for-rbac",{"type":40,"tag":115,"props":951,"children":953},{"style":952},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[954],{"type":45,"value":955}," \\\n",{"type":40,"tag":115,"props":957,"children":958},{"class":117,"line":136},[959,964,970,975,980],{"type":40,"tag":115,"props":960,"children":961},{"style":936},[962],{"type":45,"value":963},"  --name",{"type":40,"tag":115,"props":965,"children":967},{"style":966},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[968],{"type":45,"value":969}," \"",{"type":40,"tag":115,"props":971,"children":972},{"style":936},[973],{"type":45,"value":974},"packer-sp",{"type":40,"tag":115,"props":976,"children":977},{"style":966},[978],{"type":45,"value":979},"\"",{"type":40,"tag":115,"props":981,"children":982},{"style":952},[983],{"type":45,"value":955},{"type":40,"tag":115,"props":985,"children":986},{"class":117,"line":145},[987,992,997],{"type":40,"tag":115,"props":988,"children":989},{"style":936},[990],{"type":45,"value":991},"  --role",{"type":40,"tag":115,"props":993,"children":994},{"style":936},[995],{"type":45,"value":996}," Contributor",{"type":40,"tag":115,"props":998,"children":999},{"style":952},[1000],{"type":45,"value":955},{"type":40,"tag":115,"props":1002,"children":1003},{"class":117,"line":154},[1004,1009,1014,1019,1024,1029],{"type":40,"tag":115,"props":1005,"children":1006},{"style":936},[1007],{"type":45,"value":1008},"  --scopes",{"type":40,"tag":115,"props":1010,"children":1011},{"style":936},[1012],{"type":45,"value":1013}," \u002Fsubscriptions\u002F",{"type":40,"tag":115,"props":1015,"children":1016},{"style":966},[1017],{"type":45,"value":1018},"\u003C",{"type":40,"tag":115,"props":1020,"children":1021},{"style":936},[1022],{"type":45,"value":1023},"subscription-i",{"type":40,"tag":115,"props":1025,"children":1026},{"style":952},[1027],{"type":45,"value":1028},"d",{"type":40,"tag":115,"props":1030,"children":1031},{"style":966},[1032],{"type":45,"value":1033},">\n",{"type":40,"tag":115,"props":1035,"children":1036},{"class":117,"line":163},[1037],{"type":40,"tag":115,"props":1038,"children":1039},{"emptyLinePlaceholder":194},[1040],{"type":45,"value":197},{"type":40,"tag":115,"props":1042,"children":1043},{"class":117,"line":172},[1044],{"type":40,"tag":115,"props":1045,"children":1046},{"style":921},[1047],{"type":45,"value":1048},"# Set environment variables\n",{"type":40,"tag":115,"props":1050,"children":1051},{"class":117,"line":181},[1052,1058,1063,1068,1072,1077],{"type":40,"tag":115,"props":1053,"children":1055},{"style":1054},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1056],{"type":45,"value":1057},"export",{"type":40,"tag":115,"props":1059,"children":1060},{"style":952},[1061],{"type":45,"value":1062}," ARM_CLIENT_ID",{"type":40,"tag":115,"props":1064,"children":1065},{"style":966},[1066],{"type":45,"value":1067},"=",{"type":40,"tag":115,"props":1069,"children":1070},{"style":966},[1071],{"type":45,"value":979},{"type":40,"tag":115,"props":1073,"children":1074},{"style":936},[1075],{"type":45,"value":1076},"\u003Cclient-id>",{"type":40,"tag":115,"props":1078,"children":1079},{"style":966},[1080],{"type":45,"value":1081},"\"\n",{"type":40,"tag":115,"props":1083,"children":1084},{"class":117,"line":190},[1085,1089,1094,1098,1102,1107],{"type":40,"tag":115,"props":1086,"children":1087},{"style":1054},[1088],{"type":45,"value":1057},{"type":40,"tag":115,"props":1090,"children":1091},{"style":952},[1092],{"type":45,"value":1093}," ARM_CLIENT_SECRET",{"type":40,"tag":115,"props":1095,"children":1096},{"style":966},[1097],{"type":45,"value":1067},{"type":40,"tag":115,"props":1099,"children":1100},{"style":966},[1101],{"type":45,"value":979},{"type":40,"tag":115,"props":1103,"children":1104},{"style":936},[1105],{"type":45,"value":1106},"\u003Cclient-secret>",{"type":40,"tag":115,"props":1108,"children":1109},{"style":966},[1110],{"type":45,"value":1081},{"type":40,"tag":115,"props":1112,"children":1113},{"class":117,"line":200},[1114,1118,1123,1127,1131,1136],{"type":40,"tag":115,"props":1115,"children":1116},{"style":1054},[1117],{"type":45,"value":1057},{"type":40,"tag":115,"props":1119,"children":1120},{"style":952},[1121],{"type":45,"value":1122}," ARM_SUBSCRIPTION_ID",{"type":40,"tag":115,"props":1124,"children":1125},{"style":966},[1126],{"type":45,"value":1067},{"type":40,"tag":115,"props":1128,"children":1129},{"style":966},[1130],{"type":45,"value":979},{"type":40,"tag":115,"props":1132,"children":1133},{"style":936},[1134],{"type":45,"value":1135},"\u003Csubscription-id>",{"type":40,"tag":115,"props":1137,"children":1138},{"style":966},[1139],{"type":45,"value":1081},{"type":40,"tag":115,"props":1141,"children":1142},{"class":117,"line":209},[1143,1147,1152,1156,1160,1165],{"type":40,"tag":115,"props":1144,"children":1145},{"style":1054},[1146],{"type":45,"value":1057},{"type":40,"tag":115,"props":1148,"children":1149},{"style":952},[1150],{"type":45,"value":1151}," ARM_TENANT_ID",{"type":40,"tag":115,"props":1153,"children":1154},{"style":966},[1155],{"type":45,"value":1067},{"type":40,"tag":115,"props":1157,"children":1158},{"style":966},[1159],{"type":45,"value":979},{"type":40,"tag":115,"props":1161,"children":1162},{"style":936},[1163],{"type":45,"value":1164},"\u003Ctenant-id>",{"type":40,"tag":115,"props":1166,"children":1167},{"style":966},[1168],{"type":45,"value":1081},{"type":40,"tag":901,"props":1170,"children":1172},{"id":1171},"managed-identity",[1173],{"type":45,"value":1174},"Managed Identity",{"type":40,"tag":104,"props":1176,"children":1178},{"className":106,"code":1177,"language":108,"meta":109,"style":109},"source \"azure-arm\" \"ubuntu\" {\n  use_azure_cli_auth = true\n  subscription_id    = var.subscription_id\n  # ... rest of configuration\n}\n",[1179],{"type":40,"tag":54,"props":1180,"children":1181},{"__ignoreMap":109},[1182,1189,1197,1205,1213],{"type":40,"tag":115,"props":1183,"children":1184},{"class":117,"line":118},[1185],{"type":40,"tag":115,"props":1186,"children":1187},{},[1188],{"type":45,"value":434},{"type":40,"tag":115,"props":1190,"children":1191},{"class":117,"line":127},[1192],{"type":40,"tag":115,"props":1193,"children":1194},{},[1195],{"type":45,"value":1196},"  use_azure_cli_auth = true\n",{"type":40,"tag":115,"props":1198,"children":1199},{"class":117,"line":136},[1200],{"type":40,"tag":115,"props":1201,"children":1202},{},[1203],{"type":45,"value":1204},"  subscription_id    = var.subscription_id\n",{"type":40,"tag":115,"props":1206,"children":1207},{"class":117,"line":145},[1208],{"type":40,"tag":115,"props":1209,"children":1210},{},[1211],{"type":45,"value":1212},"  # ... rest of configuration\n",{"type":40,"tag":115,"props":1214,"children":1215},{"class":117,"line":154},[1216],{"type":40,"tag":115,"props":1217,"children":1218},{},[1219],{"type":45,"value":187},{"type":40,"tag":97,"props":1221,"children":1223},{"id":1222},"build-commands",[1224],{"type":45,"value":1225},"Build Commands",{"type":40,"tag":104,"props":1227,"children":1229},{"className":909,"code":1228,"language":911,"meta":109,"style":109},"# Set authentication\nexport ARM_CLIENT_ID=\"your-client-id\"\nexport ARM_CLIENT_SECRET=\"your-client-secret\"\nexport ARM_SUBSCRIPTION_ID=\"your-subscription-id\"\nexport ARM_TENANT_ID=\"your-tenant-id\"\n\n# Initialize plugins\npacker init .\n\n# Validate template\npacker validate .\n\n# Build image\npacker build .\n",[1230],{"type":40,"tag":54,"props":1231,"children":1232},{"__ignoreMap":109},[1233,1241,1269,1297,1325,1353,1360,1368,1385,1392,1400,1416,1423,1431],{"type":40,"tag":115,"props":1234,"children":1235},{"class":117,"line":118},[1236],{"type":40,"tag":115,"props":1237,"children":1238},{"style":921},[1239],{"type":45,"value":1240},"# Set authentication\n",{"type":40,"tag":115,"props":1242,"children":1243},{"class":117,"line":127},[1244,1248,1252,1256,1260,1265],{"type":40,"tag":115,"props":1245,"children":1246},{"style":1054},[1247],{"type":45,"value":1057},{"type":40,"tag":115,"props":1249,"children":1250},{"style":952},[1251],{"type":45,"value":1062},{"type":40,"tag":115,"props":1253,"children":1254},{"style":966},[1255],{"type":45,"value":1067},{"type":40,"tag":115,"props":1257,"children":1258},{"style":966},[1259],{"type":45,"value":979},{"type":40,"tag":115,"props":1261,"children":1262},{"style":936},[1263],{"type":45,"value":1264},"your-client-id",{"type":40,"tag":115,"props":1266,"children":1267},{"style":966},[1268],{"type":45,"value":1081},{"type":40,"tag":115,"props":1270,"children":1271},{"class":117,"line":136},[1272,1276,1280,1284,1288,1293],{"type":40,"tag":115,"props":1273,"children":1274},{"style":1054},[1275],{"type":45,"value":1057},{"type":40,"tag":115,"props":1277,"children":1278},{"style":952},[1279],{"type":45,"value":1093},{"type":40,"tag":115,"props":1281,"children":1282},{"style":966},[1283],{"type":45,"value":1067},{"type":40,"tag":115,"props":1285,"children":1286},{"style":966},[1287],{"type":45,"value":979},{"type":40,"tag":115,"props":1289,"children":1290},{"style":936},[1291],{"type":45,"value":1292},"your-client-secret",{"type":40,"tag":115,"props":1294,"children":1295},{"style":966},[1296],{"type":45,"value":1081},{"type":40,"tag":115,"props":1298,"children":1299},{"class":117,"line":145},[1300,1304,1308,1312,1316,1321],{"type":40,"tag":115,"props":1301,"children":1302},{"style":1054},[1303],{"type":45,"value":1057},{"type":40,"tag":115,"props":1305,"children":1306},{"style":952},[1307],{"type":45,"value":1122},{"type":40,"tag":115,"props":1309,"children":1310},{"style":966},[1311],{"type":45,"value":1067},{"type":40,"tag":115,"props":1313,"children":1314},{"style":966},[1315],{"type":45,"value":979},{"type":40,"tag":115,"props":1317,"children":1318},{"style":936},[1319],{"type":45,"value":1320},"your-subscription-id",{"type":40,"tag":115,"props":1322,"children":1323},{"style":966},[1324],{"type":45,"value":1081},{"type":40,"tag":115,"props":1326,"children":1327},{"class":117,"line":154},[1328,1332,1336,1340,1344,1349],{"type":40,"tag":115,"props":1329,"children":1330},{"style":1054},[1331],{"type":45,"value":1057},{"type":40,"tag":115,"props":1333,"children":1334},{"style":952},[1335],{"type":45,"value":1151},{"type":40,"tag":115,"props":1337,"children":1338},{"style":966},[1339],{"type":45,"value":1067},{"type":40,"tag":115,"props":1341,"children":1342},{"style":966},[1343],{"type":45,"value":979},{"type":40,"tag":115,"props":1345,"children":1346},{"style":936},[1347],{"type":45,"value":1348},"your-tenant-id",{"type":40,"tag":115,"props":1350,"children":1351},{"style":966},[1352],{"type":45,"value":1081},{"type":40,"tag":115,"props":1354,"children":1355},{"class":117,"line":163},[1356],{"type":40,"tag":115,"props":1357,"children":1358},{"emptyLinePlaceholder":194},[1359],{"type":45,"value":197},{"type":40,"tag":115,"props":1361,"children":1362},{"class":117,"line":172},[1363],{"type":40,"tag":115,"props":1364,"children":1365},{"style":921},[1366],{"type":45,"value":1367},"# Initialize plugins\n",{"type":40,"tag":115,"props":1369,"children":1370},{"class":117,"line":181},[1371,1375,1380],{"type":40,"tag":115,"props":1372,"children":1373},{"style":930},[1374],{"type":45,"value":21},{"type":40,"tag":115,"props":1376,"children":1377},{"style":936},[1378],{"type":45,"value":1379}," init",{"type":40,"tag":115,"props":1381,"children":1382},{"style":936},[1383],{"type":45,"value":1384}," .\n",{"type":40,"tag":115,"props":1386,"children":1387},{"class":117,"line":190},[1388],{"type":40,"tag":115,"props":1389,"children":1390},{"emptyLinePlaceholder":194},[1391],{"type":45,"value":197},{"type":40,"tag":115,"props":1393,"children":1394},{"class":117,"line":200},[1395],{"type":40,"tag":115,"props":1396,"children":1397},{"style":921},[1398],{"type":45,"value":1399},"# Validate template\n",{"type":40,"tag":115,"props":1401,"children":1402},{"class":117,"line":209},[1403,1407,1412],{"type":40,"tag":115,"props":1404,"children":1405},{"style":930},[1406],{"type":45,"value":21},{"type":40,"tag":115,"props":1408,"children":1409},{"style":936},[1410],{"type":45,"value":1411}," validate",{"type":40,"tag":115,"props":1413,"children":1414},{"style":936},[1415],{"type":45,"value":1384},{"type":40,"tag":115,"props":1417,"children":1418},{"class":117,"line":218},[1419],{"type":40,"tag":115,"props":1420,"children":1421},{"emptyLinePlaceholder":194},[1422],{"type":45,"value":197},{"type":40,"tag":115,"props":1424,"children":1425},{"class":117,"line":227},[1426],{"type":40,"tag":115,"props":1427,"children":1428},{"style":921},[1429],{"type":45,"value":1430},"# Build image\n",{"type":40,"tag":115,"props":1432,"children":1433},{"class":117,"line":235},[1434,1438,1443],{"type":40,"tag":115,"props":1435,"children":1436},{"style":930},[1437],{"type":45,"value":21},{"type":40,"tag":115,"props":1439,"children":1440},{"style":936},[1441],{"type":45,"value":1442}," build",{"type":40,"tag":115,"props":1444,"children":1445},{"style":936},[1446],{"type":45,"value":1384},{"type":40,"tag":97,"props":1448,"children":1450},{"id":1449},"common-issues",[1451],{"type":45,"value":1452},"Common Issues",{"type":40,"tag":48,"props":1454,"children":1455},{},[1456],{"type":40,"tag":66,"props":1457,"children":1458},{},[1459],{"type":45,"value":1460},"Authentication Failed",{"type":40,"tag":1462,"props":1463,"children":1464},"ul",{},[1465,1471,1476],{"type":40,"tag":1466,"props":1467,"children":1468},"li",{},[1469],{"type":45,"value":1470},"Verify service principal credentials",{"type":40,"tag":1466,"props":1472,"children":1473},{},[1474],{"type":45,"value":1475},"Ensure Contributor role on resource group",{"type":40,"tag":1466,"props":1477,"children":1478},{},[1479],{"type":45,"value":1480},"Check subscription and tenant IDs",{"type":40,"tag":48,"props":1482,"children":1483},{},[1484],{"type":40,"tag":66,"props":1485,"children":1486},{},[1487],{"type":45,"value":1488},"Compute Gallery Version Exists",{"type":40,"tag":1462,"props":1490,"children":1491},{},[1492,1497,1502],{"type":40,"tag":1466,"props":1493,"children":1494},{},[1495],{"type":45,"value":1496},"Image versions are immutable",{"type":40,"tag":1466,"props":1498,"children":1499},{},[1500],{"type":45,"value":1501},"Use unique version numbers with date\u002Fbuild number",{"type":40,"tag":1466,"props":1503,"children":1504},{},[1505],{"type":45,"value":1506},"Cannot overwrite existing versions",{"type":40,"tag":48,"props":1508,"children":1509},{},[1510],{"type":40,"tag":66,"props":1511,"children":1512},{},[1513],{"type":45,"value":1514},"Timeout During Provisioning",{"type":40,"tag":1462,"props":1516,"children":1517},{},[1518,1523,1528],{"type":40,"tag":1466,"props":1519,"children":1520},{},[1521],{"type":45,"value":1522},"Check network connectivity from build VM",{"type":40,"tag":1466,"props":1524,"children":1525},{},[1526],{"type":45,"value":1527},"Verify NSG rules allow required traffic",{"type":40,"tag":1466,"props":1529,"children":1530},{},[1531],{"type":45,"value":1532},"Increase timeout if needed",{"type":40,"tag":97,"props":1534,"children":1536},{"id":1535},"references",[1537],{"type":45,"value":1538},"References",{"type":40,"tag":1462,"props":1540,"children":1541},{},[1542,1550],{"type":40,"tag":1466,"props":1543,"children":1544},{},[1545],{"type":40,"tag":74,"props":1546,"children":1548},{"href":76,"rel":1547},[78],[1549],{"type":45,"value":81},{"type":40,"tag":1466,"props":1551,"children":1552},{},[1553],{"type":40,"tag":74,"props":1554,"children":1557},{"href":1555,"rel":1556},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fvirtual-machines\u002Fazure-compute-gallery",[78],[1558],{"type":45,"value":718},{"type":40,"tag":1560,"props":1561,"children":1562},"style",{},[1563],{"type":45,"value":1564},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1566,"total":260},[1567,1582,1588,1603,1617,1629,1643],{"slug":1568,"name":1568,"fn":1569,"description":1570,"org":1571,"tags":1572,"stars":22,"repoUrl":23,"updatedAt":1581},"aws-ami-builder","build Amazon Machine Images with Packer","Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder. Use when creating custom AMIs for EC2 instances.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1573,1576,1577,1580],{"name":1574,"slug":1575,"type":15},"AWS","aws",{"name":17,"slug":18,"type":15},{"name":1578,"slug":1579,"type":15},"Infrastructure as Code","infrastructure-as-code",{"name":20,"slug":21,"type":15},"2026-04-06T18:25:04.01571",{"slug":4,"name":4,"fn":5,"description":6,"org":1583,"tags":1584,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1585,1586,1587],{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":1589,"name":1589,"fn":1590,"description":1591,"org":1592,"tags":1593,"stars":22,"repoUrl":23,"updatedAt":1602},"azure-verified-modules","develop certified Azure Verified Modules","Azure Verified Modules (AVM) requirements and best practices for developing certified Azure Terraform modules. Use when creating or reviewing Azure modules that need AVM certification.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1594,1595,1598,1599],{"name":13,"slug":14,"type":15},{"name":1596,"slug":1597,"type":15},"Compliance","compliance",{"name":1578,"slug":1579,"type":15},{"name":1600,"slug":1601,"type":15},"Terraform","terraform","2026-04-06T18:25:16.88768",{"slug":1604,"name":1604,"fn":1605,"description":1606,"org":1607,"tags":1608,"stars":22,"repoUrl":23,"updatedAt":1616},"new-terraform-provider","scaffold new Terraform providers","Use this when scaffolding a new Terraform provider.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1609,1612,1615],{"name":1610,"slug":1611,"type":15},"Plugin Development","plugin-development",{"name":1613,"slug":1614,"type":15},"Templates","templates",{"name":1600,"slug":1601,"type":15},"2026-04-06T18:25:11.814973",{"slug":1618,"name":1618,"fn":1619,"description":1620,"org":1621,"tags":1622,"stars":22,"repoUrl":23,"updatedAt":1628},"provider-actions","implement Terraform Provider lifecycle actions","Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before\u002Fafter create, update, destroy).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1623,1626,1627],{"name":1624,"slug":1625,"type":15},"API Development","api-development",{"name":1610,"slug":1611,"type":15},{"name":1600,"slug":1601,"type":15},"2026-04-06T18:25:07.880533",{"slug":1630,"name":1630,"fn":1631,"description":1632,"org":1633,"tags":1634,"stars":22,"repoUrl":23,"updatedAt":1642},"provider-docs","generate and review Terraform provider documentation","Create, update, and review Terraform provider documentation for Terraform Registry using HashiCorp-recommended patterns, tfplugindocs templates, and schema descriptions. Use when adding or changing provider configuration, resources, data sources, ephemeral resources, list resources, functions, or guides; when validating generated docs; and when troubleshooting missing or incorrect Registry documentation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1635,1638,1641],{"name":1636,"slug":1637,"type":15},"Documentation","documentation",{"name":1639,"slug":1640,"type":15},"Technical Writing","technical-writing",{"name":1600,"slug":1601,"type":15},"2026-04-06T18:25:09.261559",{"slug":1644,"name":1644,"fn":1645,"description":1646,"org":1647,"tags":1648,"stars":22,"repoUrl":23,"updatedAt":1652},"provider-resources","implement Terraform Provider resources and data sources","Implement Terraform Provider resources and data sources using the Plugin Framework. Use when developing CRUD operations, schema design, state management, and acceptance testing for provider resources.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1649,1650,1651],{"name":1624,"slug":1625,"type":15},{"name":1610,"slug":1611,"type":15},{"name":1600,"slug":1601,"type":15},"2026-04-06T18:25:10.56237",{"items":1654,"total":268},[1655,1662,1668,1675,1681,1687,1693,1699,1714,1729,1741,1752],{"slug":1568,"name":1568,"fn":1569,"description":1570,"org":1656,"tags":1657,"stars":22,"repoUrl":23,"updatedAt":1581},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1658,1659,1660,1661],{"name":1574,"slug":1575,"type":15},{"name":17,"slug":18,"type":15},{"name":1578,"slug":1579,"type":15},{"name":20,"slug":21,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1663,"tags":1664,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1665,1666,1667],{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"slug":1589,"name":1589,"fn":1590,"description":1591,"org":1669,"tags":1670,"stars":22,"repoUrl":23,"updatedAt":1602},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1671,1672,1673,1674],{"name":13,"slug":14,"type":15},{"name":1596,"slug":1597,"type":15},{"name":1578,"slug":1579,"type":15},{"name":1600,"slug":1601,"type":15},{"slug":1604,"name":1604,"fn":1605,"description":1606,"org":1676,"tags":1677,"stars":22,"repoUrl":23,"updatedAt":1616},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1678,1679,1680],{"name":1610,"slug":1611,"type":15},{"name":1613,"slug":1614,"type":15},{"name":1600,"slug":1601,"type":15},{"slug":1618,"name":1618,"fn":1619,"description":1620,"org":1682,"tags":1683,"stars":22,"repoUrl":23,"updatedAt":1628},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1684,1685,1686],{"name":1624,"slug":1625,"type":15},{"name":1610,"slug":1611,"type":15},{"name":1600,"slug":1601,"type":15},{"slug":1630,"name":1630,"fn":1631,"description":1632,"org":1688,"tags":1689,"stars":22,"repoUrl":23,"updatedAt":1642},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1690,1691,1692],{"name":1636,"slug":1637,"type":15},{"name":1639,"slug":1640,"type":15},{"name":1600,"slug":1601,"type":15},{"slug":1644,"name":1644,"fn":1645,"description":1646,"org":1694,"tags":1695,"stars":22,"repoUrl":23,"updatedAt":1652},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1696,1697,1698],{"name":1624,"slug":1625,"type":15},{"name":1610,"slug":1611,"type":15},{"name":1600,"slug":1601,"type":15},{"slug":1700,"name":1700,"fn":1701,"description":1702,"org":1703,"tags":1704,"stars":22,"repoUrl":23,"updatedAt":1713},"provider-test-patterns","implement Terraform provider acceptance test patterns","Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase\u002FTestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing, or debugging provider acceptance tests, including questions about statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, import state verification, ephemeral resources, or how to structure test files.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1705,1706,1709,1710],{"name":1610,"slug":1611,"type":15},{"name":1707,"slug":1708,"type":15},"QA","qa",{"name":1600,"slug":1601,"type":15},{"name":1711,"slug":1712,"type":15},"Testing","testing","2026-04-06T18:25:14.352781",{"slug":1715,"name":1715,"fn":1716,"description":1717,"org":1718,"tags":1719,"stars":22,"repoUrl":23,"updatedAt":1728},"push-to-registry","push Packer build metadata to HCP registry","Push Packer build metadata to HCP Packer registry for tracking and managing image lifecycle. Use when integrating Packer builds with HCP Packer for version control and governance.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1720,1721,1724,1727],{"name":17,"slug":18,"type":15},{"name":1722,"slug":1723,"type":15},"Governance","governance",{"name":1725,"slug":1726,"type":15},"HCP","hcp",{"name":20,"slug":21,"type":15},"2026-04-06T18:25:02.749563",{"slug":1730,"name":1730,"fn":1731,"description":1732,"org":1733,"tags":1734,"stars":22,"repoUrl":23,"updatedAt":1740},"refactor-module","refactor Terraform configurations into reusable modules","Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1735,1738,1739],{"name":1736,"slug":1737,"type":15},"Architecture","architecture",{"name":1578,"slug":1579,"type":15},{"name":1600,"slug":1601,"type":15},"2026-04-06T18:25:20.953737",{"slug":1742,"name":1742,"fn":1743,"description":1744,"org":1745,"tags":1746,"stars":22,"repoUrl":23,"updatedAt":1751},"run-acceptance-tests","run acceptance tests for Terraform providers","Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1747,1748,1749,1750],{"name":1610,"slug":1611,"type":15},{"name":1707,"slug":1708,"type":15},{"name":1600,"slug":1601,"type":15},{"name":1711,"slug":1712,"type":15},"2026-04-06T18:25:13.098191",{"slug":1753,"name":1753,"fn":1754,"description":1755,"org":1756,"tags":1757,"stars":22,"repoUrl":23,"updatedAt":1764},"terraform-policy","write and test Terraform policy files","Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy). Triggers: policy.hcl, policytest, convert sentinel, tfpolicy, write a policy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1758,1759,1760,1763],{"name":1596,"slug":1597,"type":15},{"name":1578,"slug":1579,"type":15},{"name":1761,"slug":1762,"type":15},"Security","security",{"name":1600,"slug":1601,"type":15},"2026-07-18T05:48:20.299442"]