Microsoft.DevCenter デベロッパーセンター/ギャラリー

Bicep リソース定義

devcenters/galleries リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • リソース グループの - リソース グループのデプロイ コマンド 参照

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

使用例

Azure クイック スタートのサンプル

次 Azure クイック スタート テンプレート、このリソースの種類をデプロイするための Bicep サンプルが含まれています。

Bicep ファイル Description
Dev Box サービス の構成 このテンプレートでは、Dev Box クイック スタート ガイド (/azure/dev-box/quickstart-create-dev-box) に従って、すべての Dev Box 管理リソースが作成されます。 作成されたすべてのリソースを表示することも、DevPortal.microsoft.com に直接移動して最初の Dev Box を作成することもできます。

リソースの形式

Microsoft.DevCenter/devcenters/galleries リソースを作成するには、次の Bicep をテンプレートに追加します。

resource symbolicname 'Microsoft.DevCenter/devcenters/galleries@2026-01-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    galleryResourceId: 'string'
  }
}

プロパティ値

Microsoft.DevCenter/devcenters/galleries

Name Description Value
name リソース名 string

Constraints:
最小長 = 3
最大長 = 63
パターン = ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ (必須)
親 Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。

詳細については、「親リソースの外部 子リソース」を参照してください。
種類のリソースのシンボリック名: devcenters
properties ギャラリーのプロパティ。 GalleryProperties

GalleryProperties

Name Description Value
galleryResourceId バッキング Azure コンピューティング ギャラリーのリソース ID。 string (必須)

ARM テンプレート リソース定義

devcenters/galleries リソースの種類は、次をターゲットとする操作と共にデプロイできます。

使用例

Azure クイック スタート テンプレート

このリソースの種類 デプロイする Azure クイック スタート テンプレート 次に示します。

Template Description
Dev Box サービス の構成

Azure
にデプロイする
このテンプレートでは、Dev Box クイック スタート ガイド (/azure/dev-box/quickstart-create-dev-box) に従って、すべての Dev Box 管理リソースが作成されます。 作成されたすべてのリソースを表示することも、DevPortal.microsoft.com に直接移動して最初の Dev Box を作成することもできます。

リソースの形式

Microsoft.DevCenter/devcenters/galleries リソースを作成するには、次の JSON をテンプレートに追加します。

{
  "type": "Microsoft.DevCenter/devcenters/galleries",
  "apiVersion": "2026-01-01-preview",
  "name": "string",
  "properties": {
    "galleryResourceId": "string"
  }
}

プロパティ値

Microsoft.DevCenter/devcenters/galleries

Name Description Value
apiVersion API のバージョン 『2026-01-01-プレビュー』
name リソース名 string

Constraints:
最小長 = 3
最大長 = 63
パターン = ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ (必須)
properties ギャラリーのプロパティ。 GalleryProperties
型 リソースの種類 'Microsoft.DevCenter/devcenters/galleries'

GalleryProperties

Name Description Value
galleryResourceId バッキング Azure コンピューティング ギャラリーのリソース ID。 string (必須)

Terraform (AzAPI プロバイダー) リソース定義

devcenters/galleries リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。

使用例

Terraformサンプル

デベロッパー センター ギャラリーのデプロイの基本的な例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

data "azapi_client_config" "current" {}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westus"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "gallery" {
  type      = "Microsoft.Compute/galleries@2022-03-03"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}sig"
  location  = var.location
  body = {
    properties = {
      description = ""
    }
  }
}

resource "azapi_resource" "userAssignedIdentity" {
  type      = "Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}uai"
  location  = var.location
}

resource "azapi_resource" "devCenter" {
  type      = "Microsoft.DevCenter/devCenters@2025-02-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}dc"
  location  = var.location
  identity {
    type         = "UserAssigned"
    identity_ids = [azapi_resource.userAssignedIdentity.id]
  }
  body = {
    properties = {}
  }
}

# Assign Reader role on the gallery to the Dev Center's user-assigned identity
locals {
  reader_role_id = "acdd72a7-3385-48ef-bd42-f606fba81ae7"
}

resource "azapi_resource" "roleAssignment" {
  type      = "Microsoft.Authorization/roleAssignments@2022-04-01"
  name      = uuidv5("url", "${azapi_resource.gallery.id}/roleAssignments/${azapi_resource.userAssignedIdentity.output.properties.principalId}")
  parent_id = azapi_resource.gallery.id
  body = {
    properties = {
      roleDefinitionId = "/subscriptions/${data.azapi_client_config.current.subscription_id}/providers/Microsoft.Authorization/roleDefinitions/${local.reader_role_id}"
      principalId      = azapi_resource.userAssignedIdentity.output.properties.principalId
      principalType    = "ServicePrincipal"
    }
  }
  depends_on = [azapi_resource.userAssignedIdentity, azapi_resource.gallery]
}

resource "azapi_resource" "gallery_1" {
  type      = "Microsoft.DevCenter/devCenters/galleries@2025-02-01"
  parent_id = azapi_resource.devCenter.id
  name      = "${var.resource_name}dcg"
  body = {
    properties = {
      galleryResourceId = azapi_resource.gallery.id
    }
  }
  depends_on = [azapi_resource.roleAssignment]
}

リソースの形式

Microsoft.DevCenter/devcenters/galleries リソースを作成するには、次の Terraform をテンプレートに追加します。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DevCenter/devcenters/galleries@2026-01-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      galleryResourceId = "string"
    }
  }
}

プロパティ値

Microsoft.DevCenter/devcenters/galleries

Name Description Value
name リソース名 string

Constraints:
最小長 = 3
最大長 = 63
パターン = ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: devcenters
properties ギャラリーのプロパティ。 GalleryProperties
型 リソースの種類 "Microsoft.DevCenter/devcenters/galleries@2026-01-01-preview"

GalleryProperties

Name Description Value
galleryResourceId バッキング Azure コンピューティング ギャラリーのリソース ID。 string (必須)