Add template for minimal image and update tutorial (#7461)

This commit is contained in:
Vasilii Polikarpov
2023-05-11 19:58:03 +02:00
committed by GitHub
parent 8ff6083faf
commit e62bcae84b
13 changed files with 576 additions and 130 deletions

View File

@@ -5,6 +5,7 @@ enum ImageType {
Windows2022 = 2
Ubuntu2004 = 3
Ubuntu2204 = 4
UbuntuMinimal = 5
}
Function Get-PackerTemplatePath {
@@ -28,6 +29,9 @@ Function Get-PackerTemplatePath {
([ImageType]::Ubuntu2204) {
$relativeTemplatePath = Join-Path "linux" "ubuntu2204.pkr.hcl"
}
([ImageType]::UbuntuMinimal) {
$relativeTemplatePath = Join-Path "linux" "ubuntuminimal.pkr.hcl"
}
default { throw "Unknown type of image" }
}
@@ -63,7 +67,7 @@ Function GenerateResourcesAndImage {
.PARAMETER ImageGenerationRepositoryRoot
The root path of the image generation repository source.
.PARAMETER ImageType
The type of the image being generated. Valid options are: {"Windows2019", "Windows2022", "Ubuntu2004", "Ubuntu2204"}.
The type of the image being generated. Valid options are: {"Windows2019", "Windows2022", "Ubuntu2004", "Ubuntu2204", "UbuntuMinimal"}.
.PARAMETER AzureLocation
The location of the resources being created in Azure. For example "East US".
.PARAMETER Force
@@ -77,9 +81,10 @@ Function GenerateResourcesAndImage {
.PARAMETER RestrictToAgentIpAddress
If set, access to the VM used by packer to generate the image is restricted to the public IP address this script is run from.
This parameter cannot be used in combination with the virtual_network_name packer parameter.
.PARAMETER AllowBlobPublicAccess
The Azure storage account will be created with this option.
.PARAMETER EnableHttpsTrafficOnly
The Azure storage account will be created with this option.
.PARAMETER OnError
Specify how packer handles an error during image creation.
.EXAMPLE