Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The registries/agentPools resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Usage Examples
Bicep Samples
A basic example of deploying Azure Container Registry Agent Pool.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource registry 'Microsoft.ContainerRegistry/registries@2021-08-01-preview' = {
name: resourceName
location: location
sku: {
name: 'Premium'
tier: 'Premium'
}
properties: {
adminUserEnabled: false
anonymousPullEnabled: false
dataEndpointEnabled: false
encryption: {
status: 'disabled'
}
networkRuleBypassOptions: 'AzureServices'
policies: {
exportPolicy: {
status: 'enabled'
}
quarantinePolicy: {
status: 'disabled'
}
retentionPolicy: {
status: 'disabled'
}
trustPolicy: {
status: 'disabled'
}
}
publicNetworkAccess: 'Enabled'
zoneRedundancy: 'Disabled'
}
}
resource agentPool 'Microsoft.ContainerRegistry/registries/agentPools@2019-06-01-preview' = {
name: resourceName
location: location
parent: registry
properties: {
count: 1
os: 'Linux'
tier: 'S1'
}
}
Resource format
To create a Microsoft.ContainerRegistry/registries/agentPools resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.ContainerRegistry/registries/agentPools@2025-03-01-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
count: int
os: 'string'
tier: 'string'
virtualNetworkSubnetResourceId: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.ContainerRegistry/registries/agentPools
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 20 Pattern = ^[a-zA-Z0-9-]*$ (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: registries |
| properties | The properties associated with the agent pool | AgentPoolProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
AgentPoolProperties
| Name | Description | Value |
|---|---|---|
| count | The count of agent machine | int |
| os | The OS of agent machine | 'Linux' 'Windows' |
| tier | The Tier of agent machine | string |
| virtualNetworkSubnetResourceId | The Virtual Network Subnet Resource Id of the agent machine | string |
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The registries/agentPools resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands For a list of changed properties in each API version, see change log.
Usage Examples
Resource format
To create a Microsoft.ContainerRegistry/registries/agentPools resource, add the following JSON to your template.
{
"type": "Microsoft.ContainerRegistry/registries/agentPools",
"apiVersion": "2025-03-01-preview",
"name": "string",
"location": "string",
"properties": {
"count": "int",
"os": "string",
"tier": "string",
"virtualNetworkSubnetResourceId": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.ContainerRegistry/registries/agentPools
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-03-01-preview' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 20 Pattern = ^[a-zA-Z0-9-]*$ (required) |
| properties | The properties associated with the agent pool | AgentPoolProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.ContainerRegistry/registries/agentPools' |
AgentPoolProperties
| Name | Description | Value |
|---|---|---|
| count | The count of agent machine | int |
| os | The OS of agent machine | 'Linux' 'Windows' |
| tier | The Tier of agent machine | string |
| virtualNetworkSubnetResourceId | The Virtual Network Subnet Resource Id of the agent machine | string |
TrackedResourceTags
| Name | Description | Value |
|---|
Terraform (AzAPI provider) resource definition
The registries/agentPools resource type can be deployed with operations that target:
- Resource groups For a list of changed properties in each API version, see change log.
Usage Examples
Terraform Samples
A basic example of deploying Azure Container Registry Agent Pool.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "registry" {
type = "Microsoft.ContainerRegistry/registries@2021-08-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
adminUserEnabled = false
anonymousPullEnabled = false
dataEndpointEnabled = false
encryption = {
status = "disabled"
}
networkRuleBypassOptions = "AzureServices"
policies = {
exportPolicy = {
status = "enabled"
}
quarantinePolicy = {
status = "disabled"
}
retentionPolicy = {
status = "disabled"
}
trustPolicy = {
status = "disabled"
}
}
publicNetworkAccess = "Enabled"
zoneRedundancy = "Disabled"
}
sku = {
name = "Premium"
tier = "Premium"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "agentPool" {
type = "Microsoft.ContainerRegistry/registries/agentPools@2019-06-01-preview"
parent_id = azapi_resource.registry.id
name = var.resource_name
location = var.location
body = {
properties = {
count = 1
os = "Linux"
tier = "S1"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Resource format
To create a Microsoft.ContainerRegistry/registries/agentPools resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ContainerRegistry/registries/agentPools@2025-03-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
count = int
os = "string"
tier = "string"
virtualNetworkSubnetResourceId = "string"
}
}
}
Property Values
Microsoft.ContainerRegistry/registries/agentPools
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 20 Pattern = ^[a-zA-Z0-9-]*$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: registries |
| properties | The properties associated with the agent pool | AgentPoolProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.ContainerRegistry/registries/agentPools@2025-03-01-preview" |
AgentPoolProperties
| Name | Description | Value |
|---|---|---|
| count | The count of agent machine | int |
| os | The OS of agent machine | 'Linux' 'Windows' |
| tier | The Tier of agent machine | string |
| virtualNetworkSubnetResourceId | The Virtual Network Subnet Resource Id of the agent machine | string |
TrackedResourceTags
| Name | Description | Value |
|---|