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.47k stars 4.55k forks source link

Support for creating devbox resources #23367

Closed webstean closed 1 week ago

webstean commented 9 months ago

Is there an existing issue for this?

Community Note

Description

Support for creating:-

devbox devcenteres devbox projects devbox definitions devbox environment devbox catalogs

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

azurerm_devbox

Potential Terraform Configuration

resource "azurerm_resource_group" "example" {

  name     = "devbox-example"
  location = "australiaeast"
  tags = { environment = "dev" }
}

resource "azurerm_devbox_devcenter" "example" {
  name                = "devcenter-example"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  identity {
    type = "SystemAssigned"
  }
  tags = { environment = "dev" }
}

resource "azurerm_devbox_project" "example" {
  name                = "devproject-example"
  description         = "devproject example"   
  resource_group_name = azurerm_resource_group.example.name
  devcenter_id        = azurerm_devbox_devcenter.id
  dev_box_limits_enabled = true
  dev_box_per_developer = 2
  tags = { environment = "dev" }
}

resource "azurerm_devbox_definition" "example" {
  name                = "devproject-example"
  resource_group_name = azurerm_resource_group.example.name

  image {
    image               = "Windows 11 Enterprise + Developer Optimizations 22H2"
    version             = "latest"
    publisher           = "microsoft/visualstudio"
  }
  compute = "8 vCPU, 32GB RAM"
  storage = 256 GB SSD"
  hibernation_enable = true
}

resource "azurerm_devbox_environment" "example" {
  name                = "development-example"
  tags = { environment = "dev" }
}

resource "azurerm_devbox_catalog" "example" {
  name                = "catalog-example"

  repository_url = "https://github.com/example/example"
  source_control_type = "GitHub"
  branch              = "main"
  folder_path           = "devbox"
  secret_url            = "https://demp-devcenter--keyvault.vault.azure.net/secrets/secrets/pat"
}

References

No response

rcskosir commented 9 months ago

@webstean Thank you for taking the time to open this feature request!

damienaicheh commented 8 months ago

Hi @rcskosir I saw that the Dev Center was added to the provider with the #22592 issue which is really great, do you have an idea about when this related feature will be completed? Thanks!

webstean commented 8 months ago

Added with #22592 devbox devcenteres devbox projects

To be done:- devbox definitions devbox environment devbox catalogs

would be a great start :-)

damienaicheh commented 7 months ago

Hi @rcskosir do you have an ETA for this issue please?

dan-dimitrov commented 3 months ago

Bump. Our customer is on terraform and we need to deploy DevBox for their developer access. This includes devcentres, projects, definitions, environments and catalogs.

dan-dimitrov commented 1 week ago

@stephybun it appears that only environment type is supported. We're still missing support for the following it appears...

stephybun commented 1 week ago

I believe these will all be available in the next release:

Available now: dev center: https://github.com/hashicorp/terraform-provider-azurerm/pull/23538 projects: https://github.com/hashicorp/terraform-provider-azurerm/pull/23538 catalogs: https://github.com/hashicorp/terraform-provider-azurerm/pull/24833

Available in next minor release: definitions: https://github.com/hashicorp/terraform-provider-azurerm/pull/26307 environment: https://github.com/hashicorp/terraform-provider-azurerm/pull/26291

dan-dimitrov commented 1 week ago

Thank you for confirming @stephybun :)