Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for enable_automatic_updates and patch_mode in azurerm_linux_virtual_machine #13257

Closed
doherty100 opened this issue Sep 7, 2021 · 3 comments · Fixed by #13866
Closed

Comments

@doherty100
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Microsoft has added support for Linux distros to the Automatic VM guest patching preview however v2.75.0 of the azurerm provider throws the following error:

│ Error: Unsupported argument
│ 
│   on 070-vm-jumpbox-linux.tf line 9, in resource "azurerm_linux_virtual_machine" "vm_jumpbox_linux":
│    9:   enable_automatic_updates = true
│ 
│ An argument named "enable_automatic_updates" is not expected here.
│
│ Error: Unsupported argument
│ 
│   on 070-vm-jumpbox-linux.tf line 10, in resource "azurerm_linux_virtual_machine" "vm_jumpbox_linux":
│   10:   patch_mode               = "AutomaticByPlatform"
│ 
│ An argument named "patch_mode" is not expected here.

New or Affected Resource(s)

  • azurerm_linux_virtual_machine

Potential Terraform Configuration

resource "azurerm_linux_virtual_machine" "vm_jumpbox_linux" {
  name  = var.vm_jumpbox_linux_name
  resource_group_name  = var.resource_group_name
  location = var.location
  size = var.vm_jumpbox_linux_size
  admin_username  = data.azurerm_key_vault_secret.adminuser.value
  network_interface_ids = [azurerm_network_interface.vm_jumbox_linux_nic_01.id]
  enable_automatic_updates = true
  patch_mode  = "AutomaticByPlatform"
  tags  = var.tags

  admin_ssh_key {
    username  = data.azurerm_key_vault_secret.adminuser.value
    public_key = var.ssh_public_key
  }

  os_disk {
    caching              = "ReadWrite"
    storage_account_type = var.vm_jumpbox_linux_storage_account_type
  }

  source_image_reference {
    publisher = var.vm_jumpbox_linux_image_publisher
    offer = var.vm_jumpbox_linux_image_offer
    sku  = var.vm_jumpbox_linux_image_sku
    version = var.vm_jumpbox_linux_image_version
  }
}

References

@atombrella
Copy link
Contributor

I opened a PR #13866 enable_automatic_updates = true is not yet addressed in that PR. I think it should be set in a different section.

atombrella added a commit to atombrella/terraform-provider-azurerm that referenced this issue Oct 28, 2021
atombrella added a commit to atombrella/terraform-provider-azurerm that referenced this issue Oct 31, 2021
@katbyte katbyte added this to the v2.84.0 milestone Nov 2, 2021
@github-actions
Copy link

github-actions bot commented Nov 5, 2021

This functionality has been released in v2.84.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants