hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.65k forks source link

Support for Integrity Monitoring option azure windows virtual machine #22738

Open JohanVanneuville opened 1 year ago

JohanVanneuville commented 1 year ago

Is there an existing issue for this?

Community Note

Description

Please include to add integrity_monitoring = "true" to "azurerm_windows_virtual_machine"

New or Affected Resource(s)/Data Source(s)

azurerm 3.67.0

Potential Terraform Configuration

resource "azurerm_windows_virtual_machine" "vm" {
  name                  = "${var.vm_name}${count.index}"
  location              = data.azurerm_resource_group.rg-sessionhosts.location
  resource_group_name   = data.azurerm_resource_group.rg-sessionhosts.name
  size                  = var.vm_size
  network_interface_ids = ["${element(azurerm_network_interface.nic.*.id, count.index)}"]
  count                 = var.vm_count
  license_type          = "None"
  vtpm_enabled = "true"
  secure_boot_enabled = "true"
  integrity_monitoring = "true"

References

No response

MarioGruda commented 9 months ago

See this comment: https://github.com/hashicorp/terraform-provider-azurerm/issues/21561#issuecomment-1678546541

there is currently no properties from Swagger to toggle this. From the Azure document, this is done by installing a VM extension https://learn.microsoft.com/azure/virtual-machines/boot-integrity-monitoring-overview?tabs=template, you can refer to azurerm_virtual_machine_extension for how to use this resource.