azurerm_container_registry_task

Manages a Container Registry Task.

Example Usage

provider "azurerm" {
  features {}
}
resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "West Europe"
}
resource "azurerm_container_registry" "example" {
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku                 = "Basic"
}
resource "azurerm_container_registry_task" "example" {
  name                  = "example-task"
  container_registry_id = azurerm_container_registry.example.id
  platform {
    os = "Linux"
  }
  docker_step {
    dockerfile_path      = "Dockerfile"
    context_path         = "https://github.com/<username>/<repository>#<branch>:<folder>"
    context_access_token = "<github personal access token>"
    image_names          = ["helloworld:{{.Run.ID}}"]
  }
}

Arguments Reference

The following arguments are supported:



A agent_setting block supports the following:


A authentication block supports the following:


A base_image_trigger block supports the following:


A custom block supports the following:


A docker_step block supports the following:


A encoded_step block supports the following:


A file_step block supports the following:


An identity block supports the following:


A platform block supports the following:


A registry_credential block supports the following:


A source block supports the following:


A source_trigger block supports the following:


A timer_trigger block supports the following:

Attributes Reference

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


An identity block exports the following:

Timeouts

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

Import

Container Registry Tasks can be imported using the resource id, e.g.

terraform import azurerm_container_registry_task.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.ContainerRegistry/registries/registry1/tasks/task1