Skip to content

Commit

Permalink
Test dev box definition deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Abby Artagame committed Nov 20, 2024
1 parent 3d25c46 commit e40187b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ resource "azurerm_shared_image_gallery" "azureGallery" {
description = "Test Gallery"
}

resource "azurerm_dev_center_gallery" "devCenterGallery" {
dev_center_id = azurerm_dev_center.devCenter.id
shared_gallery_id = azurerm_shared_image_gallery.azureGallery.id
name = var.galleryName
}

resource "azurerm_shared_image" "customImageDefinition" {
name = var.imageDefinitionName
gallery_name = azurerm_shared_image_gallery.azureGallery.name
Expand All @@ -89,12 +95,6 @@ resource "azurerm_shared_image" "customImageDefinition" {
depends_on = [azurerm_shared_image_gallery.azureGallery]
}

resource "azurerm_dev_center_gallery" "dcGallery" {
dev_center_id = azurerm_dev_center.devCenter.id
shared_gallery_id = azurerm_shared_image_gallery.azureGallery.id
name = var.galleryName
}

resource "azapi_resource" "imageTemplate" {
type = "Microsoft.VirtualMachineImages/imageTemplates@2024-02-01"
name = var.imageTemplateName
Expand Down Expand Up @@ -196,7 +196,7 @@ resource "azurerm_dev_center_dev_box_definition" "devBoxDefinition" {
name = azapi_resource.imageTemplate.name
location = data.azurerm_resource_group.rg.location
dev_center_id = azurerm_dev_center.devCenter.id
image_reference_id = "${azurerm_dev_center_gallery.dcGallery.id}/images/${var.imageTemplateName}"
image_reference_id = "${azurerm_dev_center_gallery.devCenterGallery.id}/images/${azapi_resource.imageTemplate.name}"
sku_name = "general_i_8c32gb256ssd_v2"
depends_on = [null_resource.build_image_template]
}
Expand Down

0 comments on commit e40187b

Please sign in to comment.