Skip to content

Commit f27bce4

Browse files
Add Windows2025 to GenerateResourcesAndImage.ps1 (#11404)
1 parent d0ef4c9 commit f27bce4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/create-image-and-azure-resources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Finally, run the `GenerateResourcesAndImage` function, setting the mandatory arg
9898
- `SubscriptionId` - your Azure Subscription ID;
9999
- `ResourceGroupName` - the name of the resource group that will be created within your subscription (e.g., "imagegen-test");
100100
- `AzureLocation` - the location where resources will be created (e.g., "East US");
101-
- `ImageType` - the type of image to build (we suggest choosing "UbuntuMinimal" here; other valid options are "Windows2019", "Windows2022", "Ubuntu2004", "Ubuntu2204").
101+
- `ImageType` - the type of image to build (we suggest choosing "UbuntuMinimal" here; other valid options are "Windows2019", "Windows2022", "Windows2025", "Ubuntu2004", "Ubuntu2204", "Ubuntu2404").
102102

103103
This function automatically creates all required Azure resources and initiates the Packer image generation for the selected image type.
104104

helpers/GenerateResourcesAndImage.ps1

+9-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ $ErrorActionPreference = 'Stop'
33
enum ImageType {
44
Windows2019 = 1
55
Windows2022 = 2
6-
Ubuntu2004 = 3
7-
Ubuntu2204 = 4
8-
Ubuntu2404 = 5
9-
UbuntuMinimal = 6
6+
Windows2025 = 3
7+
Ubuntu2004 = 4
8+
Ubuntu2204 = 5
9+
Ubuntu2404 = 6
10+
UbuntuMinimal = 7
1011
}
1112

1213
Function Get-PackerTemplatePath {
@@ -25,6 +26,9 @@ Function Get-PackerTemplatePath {
2526
([ImageType]::Windows2022) {
2627
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "windows-2022.pkr.hcl"
2728
}
29+
([ImageType]::Windows2025) {
30+
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "windows-2025.pkr.hcl"
31+
}
2832
([ImageType]::Ubuntu2004) {
2933
$relativeTemplatePath = Join-Path (Join-Path "ubuntu" "templates") "ubuntu-20.04.pkr.hcl"
3034
}
@@ -81,7 +85,7 @@ Function GenerateResourcesAndImage {
8185
.PARAMETER ResourceGroupName
8286
The name of the resource group to create the Azure resources in.
8387
.PARAMETER ImageType
84-
The type of image to generate. Valid values are: Windows2019, Windows2022, Ubuntu2004, Ubuntu2204, UbuntuMinimal.
88+
The type of image to generate. Valid values are: Windows2019, Windows2022, Windows2025, Ubuntu2004, Ubuntu2204, Ubuntu2404, UbuntuMinimal.
8589
.PARAMETER ManagedImageName
8690
The name of the managed image to create. The default is "Runner-Image-{{ImageType}}".
8791
.PARAMETER AzureLocation

0 commit comments

Comments
 (0)