WorkflowArgs

data class WorkflowArgs(val appName: Output<String>? = null, val builderVersion: Output<String>? = null, val dockerfileGenerationMode: Output<Either<String, DockerfileGenerationMode>>? = null, val dockerfileOutputDirectory: Output<String>? = null, val generationLanguage: Output<Either<String, GenerationLanguage>>? = null, val githubWorkflowProfile: Output<GitHubWorkflowProfileArgs>? = null, val imageName: Output<String>? = null, val imageTag: Output<String>? = null, val languageVersion: Output<String>? = null, val location: Output<String>? = null, val manifestGenerationMode: Output<Either<String, ManifestGenerationMode>>? = null, val manifestOutputDirectory: Output<String>? = null, val manifestType: Output<Either<String, GenerationManifestType>>? = null, val namespace: Output<String>? = null, val port: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val workflowName: Output<String>? = null) : ConvertibleToJava<WorkflowArgs>

Resource representation of a workflow Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2022-10-11-preview. Other available API versions: 2022-10-11-preview, 2024-05-01-preview, 2024-08-01-preview, 2025-03-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native devhub [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create Workflow

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workflow = new AzureNative.DevHub.Workflow("workflow", new()
{
GithubWorkflowProfile = new AzureNative.DevHub.Inputs.GitHubWorkflowProfileArgs
{
Acr = new AzureNative.DevHub.Inputs.ACRArgs
{
AcrRegistryName = "registry1",
AcrRepositoryName = "repo1",
AcrResourceGroup = "resourceGroup1",
AcrSubscriptionId = "subscriptionId1",
},
AksResourceId = "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
BranchName = "branch1",
DeploymentProperties = new AzureNative.DevHub.Inputs.DeploymentPropertiesArgs
{
KubeManifestLocations = new[]
{
"/src/manifests/",
},
ManifestType = AzureNative.DevHub.ManifestType.Kube,
Overrides =
{
{ "key1", "value1" },
},
},
DockerBuildContext = "repo1/src/",
Dockerfile = "repo1/images/Dockerfile",
Namespace = "namespace1",
OidcCredentials = new AzureNative.DevHub.Inputs.GitHubWorkflowProfileOidcCredentialsArgs
{
AzureClientId = "12345678-3456-7890-5678-012345678901",
AzureTenantId = "66666666-3456-7890-5678-012345678901",
},
RepositoryName = "repo1",
RepositoryOwner = "owner1",
},
Location = "location1",
ResourceGroupName = "resourceGroup1",
Tags =
{
{ "appname", "testApp" },
},
WorkflowName = "workflow1",
});
});
package main
import (
devhub "github.com/pulumi/pulumi-azure-native-sdk/devhub/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devhub.NewWorkflow(ctx, "workflow", &devhub.WorkflowArgs{
GithubWorkflowProfile: &devhub.GitHubWorkflowProfileArgs{
Acr: &devhub.ACRArgs{
AcrRegistryName: pulumi.String("registry1"),
AcrRepositoryName: pulumi.String("repo1"),
AcrResourceGroup: pulumi.String("resourceGroup1"),
AcrSubscriptionId: pulumi.String("subscriptionId1"),
},
AksResourceId: pulumi.String("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"),
BranchName: pulumi.String("branch1"),
DeploymentProperties: &devhub.DeploymentPropertiesArgs{
KubeManifestLocations: pulumi.StringArray{
pulumi.String("/src/manifests/"),
},
ManifestType: pulumi.String(devhub.ManifestTypeKube),
Overrides: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
},
DockerBuildContext: pulumi.String("repo1/src/"),
Dockerfile: pulumi.String("repo1/images/Dockerfile"),
Namespace: pulumi.String("namespace1"),
OidcCredentials: &devhub.GitHubWorkflowProfileOidcCredentialsArgs{
AzureClientId: pulumi.String("12345678-3456-7890-5678-012345678901"),
AzureTenantId: pulumi.String("66666666-3456-7890-5678-012345678901"),
},
RepositoryName: pulumi.String("repo1"),
RepositoryOwner: pulumi.String("owner1"),
},
Location: pulumi.String("location1"),
ResourceGroupName: pulumi.String("resourceGroup1"),
Tags: pulumi.StringMap{
"appname": pulumi.String("testApp"),
},
WorkflowName: pulumi.String("workflow1"),
})
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.azurenative.devhub.Workflow;
import com.pulumi.azurenative.devhub.WorkflowArgs;
import com.pulumi.azurenative.devhub.inputs.GitHubWorkflowProfileArgs;
import com.pulumi.azurenative.devhub.inputs.ACRArgs;
import com.pulumi.azurenative.devhub.inputs.DeploymentPropertiesArgs;
import com.pulumi.azurenative.devhub.inputs.GitHubWorkflowProfileOidcCredentialsArgs;
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 workflow = new Workflow("workflow", WorkflowArgs.builder()
.githubWorkflowProfile(GitHubWorkflowProfileArgs.builder()
.acr(ACRArgs.builder()
.acrRegistryName("registry1")
.acrRepositoryName("repo1")
.acrResourceGroup("resourceGroup1")
.acrSubscriptionId("subscriptionId1")
.build())
.aksResourceId("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1")
.branchName("branch1")
.deploymentProperties(DeploymentPropertiesArgs.builder()
.kubeManifestLocations("/src/manifests/")
.manifestType("kube")
.overrides(Map.of("key1", "value1"))
.build())
.dockerBuildContext("repo1/src/")
.dockerfile("repo1/images/Dockerfile")
.namespace("namespace1")
.oidcCredentials(GitHubWorkflowProfileOidcCredentialsArgs.builder()
.azureClientId("12345678-3456-7890-5678-012345678901")
.azureTenantId("66666666-3456-7890-5678-012345678901")
.build())
.repositoryName("repo1")
.repositoryOwner("owner1")
.build())
.location("location1")
.resourceGroupName("resourceGroup1")
.tags(Map.of("appname", "testApp"))
.workflowName("workflow1")
.build());
}
}

Create Workflow With Artifact Generation

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workflow = new AzureNative.DevHub.Workflow("workflow", new()
{
AppName = "my-app",
DockerfileGenerationMode = AzureNative.DevHub.DockerfileGenerationMode.Enabled,
DockerfileOutputDirectory = "./",
GenerationLanguage = AzureNative.DevHub.GenerationLanguage.Javascript,
GithubWorkflowProfile = new AzureNative.DevHub.Inputs.GitHubWorkflowProfileArgs
{
Acr = new AzureNative.DevHub.Inputs.ACRArgs
{
AcrRegistryName = "registry1",
AcrRepositoryName = "repo1",
AcrResourceGroup = "resourceGroup1",
AcrSubscriptionId = "subscriptionId1",
},
AksResourceId = "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
BranchName = "branch1",
DeploymentProperties = new AzureNative.DevHub.Inputs.DeploymentPropertiesArgs
{
KubeManifestLocations = new[]
{
"/src/manifests/",
},
ManifestType = AzureNative.DevHub.ManifestType.Kube,
Overrides =
{
{ "key1", "value1" },
},
},
DockerBuildContext = "repo1/src/",
Dockerfile = "repo1/images/Dockerfile",
OidcCredentials = new AzureNative.DevHub.Inputs.GitHubWorkflowProfileOidcCredentialsArgs
{
AzureClientId = "12345678-3456-7890-5678-012345678901",
AzureTenantId = "66666666-3456-7890-5678-012345678901",
},
RepositoryName = "repo1",
RepositoryOwner = "owner1",
},
ImageName = "myimage",
ImageTag = "latest",
LanguageVersion = "14",
Location = "location1",
ManifestGenerationMode = AzureNative.DevHub.ManifestGenerationMode.Enabled,
ManifestOutputDirectory = "./",
ManifestType = AzureNative.DevHub.GenerationManifestType.Kube,
Namespace = "my-namespace",
Port = "80",
ResourceGroupName = "resourceGroup1",
Tags =
{
{ "appname", "testApp" },
},
WorkflowName = "workflow1",
});
});
package main
import (
devhub "github.com/pulumi/pulumi-azure-native-sdk/devhub/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devhub.NewWorkflow(ctx, "workflow", &devhub.WorkflowArgs{
AppName: pulumi.String("my-app"),
DockerfileGenerationMode: pulumi.String(devhub.DockerfileGenerationModeEnabled),
DockerfileOutputDirectory: pulumi.String("./"),
GenerationLanguage: pulumi.String(devhub.GenerationLanguageJavascript),
GithubWorkflowProfile: &devhub.GitHubWorkflowProfileArgs{
Acr: &devhub.ACRArgs{
AcrRegistryName: pulumi.String("registry1"),
AcrRepositoryName: pulumi.String("repo1"),
AcrResourceGroup: pulumi.String("resourceGroup1"),
AcrSubscriptionId: pulumi.String("subscriptionId1"),
},
AksResourceId: pulumi.String("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"),
BranchName: pulumi.String("branch1"),
DeploymentProperties: &devhub.DeploymentPropertiesArgs{
KubeManifestLocations: pulumi.StringArray{
pulumi.String("/src/manifests/"),
},
ManifestType: pulumi.String(devhub.ManifestTypeKube),
Overrides: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
},
DockerBuildContext: pulumi.String("repo1/src/"),
Dockerfile: pulumi.String("repo1/images/Dockerfile"),
OidcCredentials: &devhub.GitHubWorkflowProfileOidcCredentialsArgs{
AzureClientId: pulumi.String("12345678-3456-7890-5678-012345678901"),
AzureTenantId: pulumi.String("66666666-3456-7890-5678-012345678901"),
},
RepositoryName: pulumi.String("repo1"),
RepositoryOwner: pulumi.String("owner1"),
},
ImageName: pulumi.String("myimage"),
ImageTag: pulumi.String("latest"),
LanguageVersion: pulumi.String("14"),
Location: pulumi.String("location1"),
ManifestGenerationMode: pulumi.String(devhub.ManifestGenerationModeEnabled),
ManifestOutputDirectory: pulumi.String("./"),
ManifestType: pulumi.String(devhub.GenerationManifestTypeKube),
Namespace: pulumi.String("my-namespace"),
Port: pulumi.String("80"),
ResourceGroupName: pulumi.String("resourceGroup1"),
Tags: pulumi.StringMap{
"appname": pulumi.String("testApp"),
},
WorkflowName: pulumi.String("workflow1"),
})
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.azurenative.devhub.Workflow;
import com.pulumi.azurenative.devhub.WorkflowArgs;
import com.pulumi.azurenative.devhub.inputs.GitHubWorkflowProfileArgs;
import com.pulumi.azurenative.devhub.inputs.ACRArgs;
import com.pulumi.azurenative.devhub.inputs.DeploymentPropertiesArgs;
import com.pulumi.azurenative.devhub.inputs.GitHubWorkflowProfileOidcCredentialsArgs;
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 workflow = new Workflow("workflow", WorkflowArgs.builder()
.appName("my-app")
.dockerfileGenerationMode("enabled")
.dockerfileOutputDirectory("./")
.generationLanguage("javascript")
.githubWorkflowProfile(GitHubWorkflowProfileArgs.builder()
.acr(ACRArgs.builder()
.acrRegistryName("registry1")
.acrRepositoryName("repo1")
.acrResourceGroup("resourceGroup1")
.acrSubscriptionId("subscriptionId1")
.build())
.aksResourceId("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1")
.branchName("branch1")
.deploymentProperties(DeploymentPropertiesArgs.builder()
.kubeManifestLocations("/src/manifests/")
.manifestType("kube")
.overrides(Map.of("key1", "value1"))
.build())
.dockerBuildContext("repo1/src/")
.dockerfile("repo1/images/Dockerfile")
.oidcCredentials(GitHubWorkflowProfileOidcCredentialsArgs.builder()
.azureClientId("12345678-3456-7890-5678-012345678901")
.azureTenantId("66666666-3456-7890-5678-012345678901")
.build())
.repositoryName("repo1")
.repositoryOwner("owner1")
.build())
.imageName("myimage")
.imageTag("latest")
.languageVersion("14")
.location("location1")
.manifestGenerationMode("enabled")
.manifestOutputDirectory("./")
.manifestType("kube")
.namespace("my-namespace")
.port("80")
.resourceGroupName("resourceGroup1")
.tags(Map.of("appname", "testApp"))
.workflowName("workflow1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:devhub:Workflow workflow1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows/{workflowName}

Constructors

Link copied to clipboard
constructor(appName: Output<String>? = null, builderVersion: Output<String>? = null, dockerfileGenerationMode: Output<Either<String, DockerfileGenerationMode>>? = null, dockerfileOutputDirectory: Output<String>? = null, generationLanguage: Output<Either<String, GenerationLanguage>>? = null, githubWorkflowProfile: Output<GitHubWorkflowProfileArgs>? = null, imageName: Output<String>? = null, imageTag: Output<String>? = null, languageVersion: Output<String>? = null, location: Output<String>? = null, manifestGenerationMode: Output<Either<String, ManifestGenerationMode>>? = null, manifestOutputDirectory: Output<String>? = null, manifestType: Output<Either<String, GenerationManifestType>>? = null, namespace: Output<String>? = null, port: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, workflowName: Output<String>? = null)

Properties

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

The name of the app.

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

The version of the language image used for building the code in the generated dockerfile.

Link copied to clipboard

The mode of generation to be used for generating Dockerfiles.

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

The directory to output the generated Dockerfile to.

Link copied to clipboard
val generationLanguage: Output<Either<String, GenerationLanguage>>? = null

The programming language used.

Link copied to clipboard

Profile of a github workflow.

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

The name of the image to be generated.

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

The tag to apply to the generated image.

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

The version of the language image used for execution in the generated dockerfile.

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

The geo-location where the resource lives

Link copied to clipboard

The mode of generation to be used for generating Manifest.

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

The directory to output the generated manifests to.

Link copied to clipboard
val manifestType: Output<Either<String, GenerationManifestType>>? = null

Determines the type of manifests to be generated.

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

The namespace to deploy the application to.

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

The port the application is exposed on.

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

The name of the resource group. The name is case insensitive.

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

Resource tags.

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

The name of the workflow resource.

Functions

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