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 hibernation support to azurerm_dev_center_dev_box_definition #26703

Open
1 task done
webstean opened this issue Jul 19, 2024 · 1 comment
Open
1 task done

Add hibernation support to azurerm_dev_center_dev_box_definition #26703

webstean opened this issue Jul 19, 2024 · 1 comment

Comments

@webstean
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Description

Please add the hibernation support as per azapi:-

resource "azapi_resource" "devbox-defintion-vspro" {
  for_each = azurerm_dev_center.devbox

  type = "Microsoft.DevCenter/devcenters/devboxdefinitions@2023-04-01"
  // eg. Win11-8vcpu
  name      = azurerm_shared_image.vspro[each.key].name
  location  = each.value.location
  parent_id = each.value.id ## devcenter
  tags      = each.value.tags
  body = jsonencode({
    properties = {
      hibernateSupport = "Enabled"
      imageReference = {
        id = format("%s/galleries/default/images/%s_%s_%s", each.value.id, data.azurerm_platform_image.vspro[each.key].publisher, data.azurerm_platform_image.vspro[each.key].offer, data.azurerm_platform_image.vspro[each.key].sku)
      }
      osStorageType = "ssd_512gb"
      ## size of compute
      sku = {
        ## only need with scale out/in
        ## capacity = int

        family = "general_i_v2"
        name   = "general_i_8c32gb512ssd_v2"
        ##        size = "string"
        ##        tier = "Basic" |  "Free" | "Premium" | "Standard"
        ##        tier = "Premium"
      }
    }
  })
  schema_validation_enabled = true
}

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

azurerm_dev_center_dev_box_definition

Potential Terraform Configuration

resource "azurerm_dev_center_dev_box_definition" "example" {
  name               = "example-dcet"
  location           = azurerm_resource_group.example.location
  dev_center_id      = azurerm_dev_center.example.id
  hibernation        = enabled
  image_reference_id = "${azurerm_dev_center.example.id}/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2"
  sku_name           = "general_i_8c32gb256ssd_v2"
}


### References

_No response_
@neil-yechenwei
Copy link
Contributor

Thanks for raising this issue. The MS Official Doc indicates that this feature is still in preview status. Generally, Terraform doesn't support the preview feature. Once this feature is released as stable feature, then we can take another look. Thanks.

There might be potential regression issues to have AzureRM support Azure preview features, because preview features do not guarantee its backward and forward feature compatibility. E.g. If AzureRM supports it now but this feature will have new versions in the future which however would include breaking changes to the current preview versions, it would be uneasy for AzureRM to catch up with that new version because it's on purpose to bring as few breaking changes as possible to Terraform AzureRM.

Per the perspective of having people experience this feature in TF, Terraform AzAPI provider could be an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants