Skip to content

azurermContainerRegistryAgentPool

Manages an Azure Container Registry Agent Pool.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europ",
    name: "example",
  }
);
const azurermContainerRegistryExample =
  new azurerm.containerRegistry.ContainerRegistry(this, "example_1", {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
    sku: "Premium",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryExample.overrideLogicalId("example");
const azurermContainerRegistryAgentPoolExample =
  new azurerm.containerRegistryAgentPool.ContainerRegistryAgentPool(
    this,
    "example_2",
    {
      container_registry_name: azurermContainerRegistryExample.name,
      location: azurermResourceGroupExample.location,
      name: "example",
      resource_group_name: azurermResourceGroupExample.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryAgentPoolExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • containerRegistryName - (Required) Name of Azure Container Registry to create an Agent Pool for. Changing this forces a new Azure Container Registry Agent Pool to be created.

  • location - (Required) The Azure Region where the Azure Container Registry Agent Pool should exist. Changing this forces a new Azure Container Registry Agent Pool to be created.

  • name - (Required) The name which should be used for this Azure Container Registry Agent Pool. Changing this forces a new Azure Container Registry Agent Pool to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Azure Container Registry Agent Pool should exist. Changing this forces a new Azure Container Registry Agent Pool to be created.


  • instanceCount - (Optional) VMSS instance count. Defaults to 1.

  • tier - (Optional) Sets the VM your agent pool will run on. Valid values are: s1 (2 vCPUs, 3 GiB RAM), s2 (4 vCPUs, 8 GiB RAM), s3 (8 vCPUs, 16 GiB RAM) or i6 (64 vCPUs, 216 GiB RAM, Isolated). Defaults to s1. Changing this forces a new Azure Container Registry Agent Pool to be created.

  • virtualNetworkSubnetId - (Optional) The ID of the Virtual Network Subnet Resource where the agent machines will be running. Changing this forces a new Azure Container Registry Agent Pool to be created.

  • tags - (Optional) A mapping of tags which should be assigned to the Azure Container Registry Agent Pool.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Azure Container Registry Agent Pool.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Azure Container Registry Agent Pool.
  • read - (Defaults to 5 minutes) Used when retrieving the Azure Container Registry Agent Pool.
  • update - (Defaults to 30 minutes) Used when updating the Azure Container Registry Agent Pool.
  • delete - (Defaults to 30 minutes) Used when deleting the Azure Container Registry Agent Pool.

Import

Azure Container Registry Agent Pool can be imported using the resourceId, e.g.

terraform import azurerm_container_registry_agent_pool.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.ContainerRegistry/registries/registry1/agentPools/agentpool1