Skip to content

Commit 9cf1863

Browse files
committed
adding additional capabilities and identity blocks to Linux VM scale set
1 parent c107df8 commit 9cf1863

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

main.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ resource "azurerm_linux_virtual_machine_scale_set" "linux_vmss" {
271271
write_accelerator_enabled = var.enable_os_disk_write_accelerator
272272
}
273273

274+
dynamic "additional_capabilities" {
275+
for_each = var.enable_ultra_ssd_data_disk_storage_support ? [1] : []
276+
content {
277+
ultra_ssd_enabled = var.enable_ultra_ssd_data_disk_storage_support
278+
}
279+
}
280+
274281
dynamic "data_disk" {
275282
for_each = var.additional_data_disks
276283
content {
@@ -333,6 +340,14 @@ resource "azurerm_linux_virtual_machine_scale_set" "linux_vmss" {
333340
}
334341
}
335342

343+
dynamic "identity" {
344+
for_each = var.managed_identity_type != null ? [1] : []
345+
content {
346+
type = var.managed_identity_type
347+
identity_ids = var.managed_identity_type == "UserAssigned" || var.managed_identity_type == "SystemAssigned, UserAssigned" ? var.managed_identity_ids : null
348+
}
349+
}
350+
336351
dynamic "boot_diagnostics" {
337352
for_each = var.enable_boot_diagnostics ? [1] : []
338353
content {

variables.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@ variable "enable_os_disk_write_accelerator" {
356356
default = false
357357
}
358358

359+
variable "enable_ultra_ssd_data_disk_storage_support" {
360+
description = "Should the capacity to enable Data Disks of the UltraSSD_LRS storage account type be supported on this Virtual Machine"
361+
default = false
362+
}
363+
359364
variable "additional_data_disks" {
360365
description = "Adding additional disks capacity to add each instance (GB)"
361366
type = list(number)
@@ -408,7 +413,15 @@ variable "enable_automatic_instance_repair" {
408413
default = false
409414
}
410415

416+
variable "managed_identity_type" {
417+
description = "The type of Managed Identity which should be assigned to the Linux Virtual Machine Scale Set. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`"
418+
default = null
419+
}
411420

421+
variable "managed_identity_ids" {
422+
description = " A list of User Managed Identity ID's which should be assigned to the Linux Virtual Machine Scale Set."
423+
default = null
424+
}
412425

413426
variable "enable_boot_diagnostics" {
414427
description = "Should the boot diagnostics enabled?"

0 commit comments

Comments
 (0)