AppArgs

data class AppArgs(val containerAppEnvironmentId: Output<String>? = null, val dapr: Output<AppDaprArgs>? = null, val identity: Output<AppIdentityArgs>? = null, val ingress: Output<AppIngressArgs>? = null, val name: Output<String>? = null, val registries: Output<List<AppRegistryArgs>>? = null, val resourceGroupName: Output<String>? = null, val revisionMode: Output<String>? = null, val secrets: Output<List<AppSecretArgs>>? = null, val tags: Output<Map<String, String>>? = null, val template: Output<AppTemplateArgs>? = null) : ConvertibleToJava<AppArgs>

Manages a Container App.

Example Usage

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.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.containerapp.Environment;
import com.pulumi.azure.containerapp.EnvironmentArgs;
import com.pulumi.azure.containerapp.App;
import com.pulumi.azure.containerapp.AppArgs;
import com.pulumi.azure.containerapp.inputs.AppTemplateArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
.build());
var exampleApp = new App("exampleApp", AppArgs.builder()
.containerAppEnvironmentId(exampleEnvironment.id())
.resourceGroupName(exampleResourceGroup.name())
.revisionMode("Single")
.template(AppTemplateArgs.builder()
.containers(AppTemplateContainerArgs.builder()
.name("examplecontainerapp")
.image("mcr.microsoft.com/azuredocs/containerapps-helloworld:latest")
.cpu(0.25)
.memory("0.5Gi")
.build())
.build())
.build());
}
}

Import

A Container App can be imported using the resource id, e.g.

$ pulumi import azure:containerapp/app:App example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/containerApps/myContainerApp"

Constructors

Link copied to clipboard
fun AppArgs(containerAppEnvironmentId: Output<String>? = null, dapr: Output<AppDaprArgs>? = null, identity: Output<AppIdentityArgs>? = null, ingress: Output<AppIngressArgs>? = null, name: Output<String>? = null, registries: Output<List<AppRegistryArgs>>? = null, resourceGroupName: Output<String>? = null, revisionMode: Output<String>? = null, secrets: Output<List<AppSecretArgs>>? = null, tags: Output<Map<String, String>>? = null, template: Output<AppTemplateArgs>? = null)

Functions

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

Properties

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

The ID of the Container App Environment within which this Container App should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val dapr: Output<AppDaprArgs>? = null

A dapr block as detailed below.

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

An identity block as detailed below.

Link copied to clipboard
val ingress: Output<AppIngressArgs>? = null

An ingress block as detailed below.

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

The name for this Container App. Changing this forces a new resource to be created.

Link copied to clipboard
val registries: Output<List<AppRegistryArgs>>? = null

A registry block as detailed below.

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

The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.

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

The revisions operational mode for the Container App. Possible values include Single and Multiple. In Single mode, a single revision is in operation at any given time. In Multiple mode, more than one revision can be active at a time and can be configured with load distribution via the traffic_weight block in the ingress configuration.

Link copied to clipboard
val secrets: Output<List<AppSecretArgs>>? = null

One or more secret block as detailed below.

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

A mapping of tags to assign to the Container App.

Link copied to clipboard
val template: Output<AppTemplateArgs>? = null

A template block as detailed below.