Skip to content

Commit e358b3e

Browse files
authored
Merge pull request #596 from kozhemyak/feature/update-storage-types
Add StandardSSD_LRS support for managed_image_storage_account_type
2 parents 9352fd0 + f3e36f4 commit e358b3e

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.web-docs/components/builder/arm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Providing `temp_resource_group_name` or `location` in combination with
290290
learn more about managed images.
291291

292292
- `managed_image_storage_account_type` (string) - Specify the storage account
293-
type for a managed image. Valid values are Standard_LRS and Premium_LRS.
293+
type for a managed image. Valid values are Standard_LRS, StandardSSD_LRS, and Premium_LRS.
294294
The default is Standard_LRS.
295295

296296
- `managed_image_os_disk_snapshot_name` (string) - If

builder/azure/arm/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ type Config struct {
366366
// learn more about managed images.
367367
ManagedImageName string `mapstructure:"managed_image_name"`
368368
// Specify the storage account
369-
// type for a managed image. Valid values are Standard_LRS and Premium_LRS.
369+
// type for a managed image. Valid values are Standard_LRS, StandardSSD_LRS, and Premium_LRS.
370370
// The default is Standard_LRS.
371371
ManagedImageStorageAccountType string `mapstructure:"managed_image_storage_account_type" required:"false"`
372372
managedImageStorageAccountType virtualmachines.StorageAccountTypes
@@ -1580,6 +1580,8 @@ func assertRequiredParametersSet(c *Config, errs *packersdk.MultiError) {
15801580
switch c.ManagedImageStorageAccountType {
15811581
case "", string(virtualmachines.StorageAccountTypesStandardLRS):
15821582
c.managedImageStorageAccountType = virtualmachines.StorageAccountTypesStandardLRS
1583+
case string(virtualmachines.StorageAccountTypesStandardSSDLRS):
1584+
c.managedImageStorageAccountType = virtualmachines.StorageAccountTypesStandardSSDLRS
15831585
case string(virtualmachines.StorageAccountTypesPremiumLRS):
15841586
c.managedImageStorageAccountType = virtualmachines.StorageAccountTypesPremiumLRS
15851587
default:

builder/azure/arm/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ func TestConfigShouldAcceptManagedImageStorageAccountTypes(t *testing.T) {
17471747
"os_type": constants.Target_Linux,
17481748
}
17491749

1750-
storage_account_types := []string{"Premium_LRS", "Standard_LRS"}
1750+
storage_account_types := []string{"Premium_LRS", "StandardSSD_LRS", "Standard_LRS"}
17511751

17521752
for _, x := range storage_account_types {
17531753
config["managed_image_storage_account_type"] = x

docs-partials/builder/azure/arm/Config-not-required.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
learn more about managed images.
153153

154154
- `managed_image_storage_account_type` (string) - Specify the storage account
155-
type for a managed image. Valid values are Standard_LRS and Premium_LRS.
155+
type for a managed image. Valid values are Standard_LRS, StandardSSD_LRS, and Premium_LRS.
156156
The default is Standard_LRS.
157157

158158
- `managed_image_os_disk_snapshot_name` (string) - If

0 commit comments

Comments
 (0)