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

Add license_type for azurerm_linux_virtual_machine #10744

Closed
brownz11 opened this issue Feb 25, 2021 · 2 comments · Fixed by #10776
Closed

Add license_type for azurerm_linux_virtual_machine #10744

brownz11 opened this issue Feb 25, 2021 · 2 comments · Fixed by #10776

Comments

@brownz11
Copy link

brownz11 commented Feb 25, 2021

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

Linux Virtual Machines on Azure have the option to bring your own license, this is useful for people who already have SUSE or RHEL subscriptions that they'd like to use with the Azure Hybrid License Benefit. Unfortunately this feature is not exposed in the current AzureRM providers for Linux, Windows VMs already have this feature exposed.

For Linux a value for the "licence_type" could be added, the possible options would be: None, RHEL_BYOS, SUSE_BYOS

The feature is exposed in ARM by properties.licenseType

New or Affected Resource(s)

  • azurerm_linux_virtual_machine

Potential Terraform Configuration

 #An example of a VM confiq with the new option:

resource "azurerm_linux_virtual_machine" "example" {
  name                = "example-machine"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  size                = "Standard_F2"
  admin_username      = "adminuser"
  license_type    = "RHEL_BYOS"

  network_interface_ids = [
    azurerm_network_interface.example.id,
  ]

  admin_ssh_key {
    username   = "adminuser"
    public_key = file("~/.ssh/id_rsa.pub")
  }

  os_disk {
    caching              = "ReadWrite"
    storage_account_type = "Standard_LRS"
  }

  source_image_reference {
    publisher = "RedHat"
    offer     = "rhel-byos"
    sku       = "rhel-lvm83"
    version   = "latest"
  }
  
  plan { 
    name = "rhel-lvm83"
    product = "rhel-byos"
    publisher = "redhat"
  }
}

References

  • #0000
@brownz11 brownz11 changed the title Add License_type for azurerm_linux_virtual_machine Add license_type for azurerm_linux_virtual_machine Feb 25, 2021
@tombuildsstuff tombuildsstuff added this to the v2.50.0 milestone Mar 4, 2021
@ghost
Copy link

ghost commented Mar 5, 2021

This has been released in version 2.50.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.50.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 4, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants