App

class App : KotlinCustomResource

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"

Properties

Link copied to clipboard

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

The ID of the Custom Domain Verification for this Container App.

Link copied to clipboard
val dapr: Output<AppDapr>?

A dapr block as detailed below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val identity: Output<AppIdentity>?

An identity block as detailed below.

Link copied to clipboard
val ingress: Output<AppIngress>?

An ingress block as detailed below.

Link copied to clipboard

The FQDN of the Latest Revision of the Container App.

Link copied to clipboard

The name of the latest Container Revision.

Link copied to clipboard
val location: Output<String>

The location this Container App is deployed in. This is the same as the Environment in which it is deployed.

Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard

A list of the Public IP Addresses which the Container App uses for outbound network access.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val registries: Output<List<AppRegistry>>?

A registry block as detailed below.

Link copied to clipboard

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>

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<AppSecret>>?

One or more secret block as detailed below.

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

A mapping of tags to assign to the Container App.

Link copied to clipboard
val template: Output<AppTemplate>

A template block as detailed below.

Link copied to clipboard
val urn: Output<String>