RegistryTaskArgs

data class RegistryTaskArgs(val agentPoolName: Output<String>? = null, val agentSetting: Output<RegistryTaskAgentSettingArgs>? = null, val baseImageTrigger: Output<RegistryTaskBaseImageTriggerArgs>? = null, val containerRegistryId: Output<String>? = null, val dockerStep: Output<RegistryTaskDockerStepArgs>? = null, val enabled: Output<Boolean>? = null, val encodedStep: Output<RegistryTaskEncodedStepArgs>? = null, val fileStep: Output<RegistryTaskFileStepArgs>? = null, val identity: Output<RegistryTaskIdentityArgs>? = null, val isSystemTask: Output<Boolean>? = null, val logTemplate: Output<String>? = null, val name: Output<String>? = null, val platform: Output<RegistryTaskPlatformArgs>? = null, val registryCredential: Output<RegistryTaskRegistryCredentialArgs>? = null, val sourceTriggers: Output<List<RegistryTaskSourceTriggerArgs>>? = null, val tags: Output<Map<String, String>>? = null, val timeoutInSeconds: Output<Int>? = null, val timerTriggers: Output<List<RegistryTaskTimerTriggerArgs>>? = null) : ConvertibleToJava<RegistryTaskArgs>

Manages a Container Registry Task.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "West Europe",
});
const exampleRegistry = new azure.containerservice.Registry("example", {
name: "example",
resourceGroupName: example.name,
location: example.location,
sku: "Basic",
});
const exampleRegistryTask = new azure.containerservice.RegistryTask("example", {
name: "example-task",
containerRegistryId: exampleRegistry.id,
platform: {
os: "Linux",
},
dockerStep: {
dockerfilePath: "Dockerfile",
contextPath: "https://github.com/<username>/<repository>#<branch>:<folder>",
contextAccessToken: "<github personal access token>",
imageNames: ["helloworld:{{&#46;Run&#46;ID}}"],
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="West Europe")
example_registry = azure.containerservice.Registry("example",
name="example",
resource_group_name=example.name,
location=example.location,
sku="Basic")
example_registry_task = azure.containerservice.RegistryTask("example",
name="example-task",
container_registry_id=example_registry.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:{{&#46;Run&#46;ID}}"],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "West Europe",
});
var exampleRegistry = new Azure.ContainerService.Registry("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "Basic",
});
var exampleRegistryTask = new Azure.ContainerService.RegistryTask("example", new()
{
Name = "example-task",
ContainerRegistryId = exampleRegistry.Id,
Platform = new Azure.ContainerService.Inputs.RegistryTaskPlatformArgs
{
Os = "Linux",
},
DockerStep = new Azure.ContainerService.Inputs.RegistryTaskDockerStepArgs
{
DockerfilePath = "Dockerfile",
ContextPath = "https://github.com/<username>/<repository>#<branch>:<folder>",
ContextAccessToken = "<github personal access token>",
ImageNames = new[]
{
"helloworld:{{.Run.ID}}",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleRegistry, err := containerservice.NewRegistry(ctx, "example", &containerservice.RegistryArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("Basic"),
})
if err != nil {
return err
}
_, err = containerservice.NewRegistryTask(ctx, "example", &containerservice.RegistryTaskArgs{
Name: pulumi.String("example-task"),
ContainerRegistryId: exampleRegistry.ID(),
Platform: &containerservice.RegistryTaskPlatformArgs{
Os: pulumi.String("Linux"),
},
DockerStep: &containerservice.RegistryTaskDockerStepArgs{
DockerfilePath: pulumi.String("Dockerfile"),
ContextPath: pulumi.String("https://github.com/<username>/<repository>#<branch>:<folder>"),
ContextAccessToken: pulumi.String("<github personal access token>"),
ImageNames: pulumi.StringArray{
pulumi.String("helloworld:{{.Run.ID}}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.Registry;
import com.pulumi.azure.containerservice.RegistryArgs;
import com.pulumi.azure.containerservice.RegistryTask;
import com.pulumi.azure.containerservice.RegistryTaskArgs;
import com.pulumi.azure.containerservice.inputs.RegistryTaskPlatformArgs;
import com.pulumi.azure.containerservice.inputs.RegistryTaskDockerStepArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-rg")
.location("West Europe")
.build());
var exampleRegistry = new Registry("exampleRegistry", RegistryArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.sku("Basic")
.build());
var exampleRegistryTask = new RegistryTask("exampleRegistryTask", RegistryTaskArgs.builder()
.name("example-task")
.containerRegistryId(exampleRegistry.id())
.platform(RegistryTaskPlatformArgs.builder()
.os("Linux")
.build())
.dockerStep(RegistryTaskDockerStepArgs.builder()
.dockerfilePath("Dockerfile")
.contextPath("https://github.com/<username>/<repository>#<branch>:<folder>")
.contextAccessToken("<github personal access token>")
.imageNames("helloworld:{{.Run.ID}}")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: West Europe
exampleRegistry:
type: azure:containerservice:Registry
name: example
properties:
name: example
resourceGroupName: ${example.name}
location: ${example.location}
sku: Basic
exampleRegistryTask:
type: azure:containerservice:RegistryTask
name: example
properties:
name: example-task
containerRegistryId: ${exampleRegistry.id}
platform:
os: Linux
dockerStep:
dockerfilePath: Dockerfile
contextPath: https://github.com/<username>/<repository>#<branch>:<folder>
contextAccessToken: <github personal access token>
imageNames:
- helloworld:{{.Run.ID}}

Import

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

$ pulumi import azure:containerservice/registryTask:RegistryTask example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.ContainerRegistry/registries/registry1/tasks/task1

Constructors

Link copied to clipboard
constructor(agentPoolName: Output<String>? = null, agentSetting: Output<RegistryTaskAgentSettingArgs>? = null, baseImageTrigger: Output<RegistryTaskBaseImageTriggerArgs>? = null, containerRegistryId: Output<String>? = null, dockerStep: Output<RegistryTaskDockerStepArgs>? = null, enabled: Output<Boolean>? = null, encodedStep: Output<RegistryTaskEncodedStepArgs>? = null, fileStep: Output<RegistryTaskFileStepArgs>? = null, identity: Output<RegistryTaskIdentityArgs>? = null, isSystemTask: Output<Boolean>? = null, logTemplate: Output<String>? = null, name: Output<String>? = null, platform: Output<RegistryTaskPlatformArgs>? = null, registryCredential: Output<RegistryTaskRegistryCredentialArgs>? = null, sourceTriggers: Output<List<RegistryTaskSourceTriggerArgs>>? = null, tags: Output<Map<String, String>>? = null, timeoutInSeconds: Output<Int>? = null, timerTriggers: Output<List<RegistryTaskTimerTriggerArgs>>? = null)

Properties

Link copied to clipboard
val agentPoolName: Output<String>? = null

The name of the dedicated Container Registry Agent Pool for this Container Registry Task.

Link copied to clipboard

A agent_setting block as defined below.

Link copied to clipboard

A base_image_trigger block as defined below.

Link copied to clipboard
val containerRegistryId: Output<String>? = null

The ID of the Container Registry that this Container Registry Task resides in. Changing this forces a new Container Registry Task to be created.

Link copied to clipboard

A docker_step block as defined below.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Should this Container Registry Task be enabled? Defaults to true.

Link copied to clipboard

A encoded_step block as defined below.

Link copied to clipboard
val fileStep: Output<RegistryTaskFileStepArgs>? = null

A file_step block as defined below.

Link copied to clipboard
val identity: Output<RegistryTaskIdentityArgs>? = null

An identity block as defined below.

Link copied to clipboard
val isSystemTask: Output<Boolean>? = null

Whether this Container Registry Task is a system task. Changing this forces a new Container Registry Task to be created. Defaults to false.

Link copied to clipboard
val logTemplate: Output<String>? = null
Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Container Registry Task. Changing this forces a new Container Registry Task to be created.

Link copied to clipboard
val platform: Output<RegistryTaskPlatformArgs>? = null

A platform block as defined below.

Link copied to clipboard
Link copied to clipboard

One or more source_trigger blocks as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null
Link copied to clipboard
val timeoutInSeconds: Output<Int>? = null
Link copied to clipboard

One or more timer_trigger blocks as defined below.

Functions

Link copied to clipboard
open override fun toJava(): RegistryTaskArgs