packer-cn/builder/azure/examples/ubuntu-chroot.json

42 lines
1.1 KiB
JSON
Raw Normal View History

{
"variables": {
"client_id": "{{env `ARM_CLIENT_ID`}}",
"client_secret": "{{env `ARM_CLIENT_SECRET`}}",
"subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
"resource_group": "{{env `ARM_IMAGE_RESOURCEGROUP_ID`}}",
"gallery_name": "{{env `ARM_GALLERY_NAME`}}"
},
"builders": [{
"type": "azure-chroot",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"subscription_id": "{{user `subscription_id`}}",
"source": "Canonical:UbuntuServer:20.04-LTS:latest",
"shared_image_destination": {
"resource_group": "{{user `resource_group`}}",
"gallery_name": "{{user `gallery_name`}}",
"image_name": "MyUbuntuOSImage",
"image_version": "1.0.0",
"exclude_from_latest": false,
"target_regions": [
{
"name": "eastus",
"replicas": "1",
"storage_account_type": "standard_zrs"
}
]
}
}],
"provisioners": [{
"inline": [
"apt update",
"apt upgrade -y"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
}]
}