AppFlexConsumptionArgs

data class AppFlexConsumptionArgs(val alwaysReadies: Output<List<AppFlexConsumptionAlwaysReadyArgs>>? = null, val appSettings: Output<Map<String, String>>? = null, val authSettings: Output<AppFlexConsumptionAuthSettingsArgs>? = null, val authSettingsV2: Output<AppFlexConsumptionAuthSettingsV2Args>? = null, val clientCertificateEnabled: Output<Boolean>? = null, val clientCertificateExclusionPaths: Output<String>? = null, val clientCertificateMode: Output<String>? = null, val connectionStrings: Output<List<AppFlexConsumptionConnectionStringArgs>>? = null, val enabled: Output<Boolean>? = null, val identity: Output<AppFlexConsumptionIdentityArgs>? = null, val instanceMemoryInMb: Output<Int>? = null, val location: Output<String>? = null, val maximumInstanceCount: Output<Int>? = null, val name: Output<String>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val runtimeName: Output<String>? = null, val runtimeVersion: Output<String>? = null, val servicePlanId: Output<String>? = null, val siteConfig: Output<AppFlexConsumptionSiteConfigArgs>? = null, val stickySettings: Output<AppFlexConsumptionStickySettingsArgs>? = null, val storageAccessKey: Output<String>? = null, val storageAuthenticationType: Output<String>? = null, val storageContainerEndpoint: Output<String>? = null, val storageContainerType: Output<String>? = null, val storageUserAssignedIdentityId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val virtualNetworkSubnetId: Output<String>? = null, val webdeployPublishBasicAuthenticationEnabled: Output<Boolean>? = null, val zipDeployFile: Output<String>? = null) : ConvertibleToJava<AppFlexConsumptionArgs>

Manages a Function App Running on a Flex Consumption Plan.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "examplelinuxfunctionappsa",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleContainer = new azure.storage.Container("example", {
name: "example-flexcontainer",
storageAccountId: exampleAccount.id,
containerAccessType: "private",
});
const exampleServicePlan = new azure.appservice.ServicePlan("example", {
name: "example-app-service-plan",
resourceGroupName: example.name,
location: example.location,
skuName: "FC1",
osType: "Linux",
});
const exampleAppFlexConsumption = new azure.appservice.AppFlexConsumption("example", {
name: "example-linux-function-app",
resourceGroupName: example.name,
location: example.location,
servicePlanId: exampleServicePlan.id,
storageContainerType: "blobContainer",
storageContainerEndpoint: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}`,
storageAuthenticationType: "StorageAccountConnectionString",
storageAccessKey: exampleAccount.primaryAccessKey,
runtimeName: "node",
runtimeVersion: "20",
maximumInstanceCount: 50,
instanceMemoryInMb: 2048,
siteConfig: {},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_account = azure.storage.Account("example",
name="examplelinuxfunctionappsa",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS")
example_container = azure.storage.Container("example",
name="example-flexcontainer",
storage_account_id=example_account.id,
container_access_type="private")
example_service_plan = azure.appservice.ServicePlan("example",
name="example-app-service-plan",
resource_group_name=example.name,
location=example.location,
sku_name="FC1",
os_type="Linux")
example_app_flex_consumption = azure.appservice.AppFlexConsumption("example",
name="example-linux-function-app",
resource_group_name=example.name,
location=example.location,
service_plan_id=example_service_plan.id,
storage_container_type="blobContainer",
storage_container_endpoint=pulumi.Output.all(
primary_blob_endpoint=example_account.primary_blob_endpoint,
name=example_container.name
).apply(lambda resolved_outputs: f"{resolved_outputs['primary_blob_endpoint']}{resolved_outputs['name']}")
,
storage_authentication_type="StorageAccountConnectionString",
storage_access_key=example_account.primary_access_key,
runtime_name="node",
runtime_version="20",
maximum_instance_count=50,
instance_memory_in_mb=2048,
site_config={})
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-resources",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "examplelinuxfunctionappsa",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleContainer = new Azure.Storage.Container("example", new()
{
Name = "example-flexcontainer",
StorageAccountId = exampleAccount.Id,
ContainerAccessType = "private",
});
var exampleServicePlan = new Azure.AppService.ServicePlan("example", new()
{
Name = "example-app-service-plan",
ResourceGroupName = example.Name,
Location = example.Location,
SkuName = "FC1",
OsType = "Linux",
});
var exampleAppFlexConsumption = new Azure.AppService.AppFlexConsumption("example", new()
{
Name = "example-linux-function-app",
ResourceGroupName = example.Name,
Location = example.Location,
ServicePlanId = exampleServicePlan.Id,
StorageContainerType = "blobContainer",
StorageContainerEndpoint = Output.Tuple(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).Apply(values =>
{
var primaryBlobEndpoint = values.Item1;
var name = values.Item2;
return $"{primaryBlobEndpoint}{name}";
}),
StorageAuthenticationType = "StorageAccountConnectionString",
StorageAccessKey = exampleAccount.PrimaryAccessKey,
RuntimeName = "node",
RuntimeVersion = "20",
MaximumInstanceCount = 50,
InstanceMemoryInMb = 2048,
SiteConfig = null,
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"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-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplelinuxfunctionappsa"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
Name: pulumi.String("example-flexcontainer"),
StorageAccountId: exampleAccount.ID(),
ContainerAccessType: pulumi.String("private"),
})
if err != nil {
return err
}
exampleServicePlan, err := appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{
Name: pulumi.String("example-app-service-plan"),
ResourceGroupName: example.Name,
Location: example.Location,
SkuName: pulumi.String("FC1"),
OsType: pulumi.String("Linux"),
})
if err != nil {
return err
}
_, err = appservice.NewAppFlexConsumption(ctx, "example", &appservice.AppFlexConsumptionArgs{
Name: pulumi.String("example-linux-function-app"),
ResourceGroupName: example.Name,
Location: example.Location,
ServicePlanId: exampleServicePlan.ID(),
StorageContainerType: pulumi.String("blobContainer"),
StorageContainerEndpoint: pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) {
primaryBlobEndpoint := _args[0].(string)
name := _args[1].(string)
return fmt.Sprintf("%v%v", primaryBlobEndpoint, name), nil
}).(pulumi.StringOutput),
StorageAuthenticationType: pulumi.String("StorageAccountConnectionString"),
StorageAccessKey: exampleAccount.PrimaryAccessKey,
RuntimeName: pulumi.String("node"),
RuntimeVersion: pulumi.String("20"),
MaximumInstanceCount: pulumi.Int(50),
InstanceMemoryInMb: pulumi.Int(2048),
SiteConfig: &appservice.AppFlexConsumptionSiteConfigArgs{},
})
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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.appservice.AppFlexConsumption;
import com.pulumi.azure.appservice.AppFlexConsumptionArgs;
import com.pulumi.azure.appservice.inputs.AppFlexConsumptionSiteConfigArgs;
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-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplelinuxfunctionappsa")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.name("example-flexcontainer")
.storageAccountId(exampleAccount.id())
.containerAccessType("private")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.name("example-app-service-plan")
.resourceGroupName(example.name())
.location(example.location())
.skuName("FC1")
.osType("Linux")
.build());
var exampleAppFlexConsumption = new AppFlexConsumption("exampleAppFlexConsumption", AppFlexConsumptionArgs.builder()
.name("example-linux-function-app")
.resourceGroupName(example.name())
.location(example.location())
.servicePlanId(exampleServicePlan.id())
.storageContainerType("blobContainer")
.storageContainerEndpoint(Output.tuple(exampleAccount.primaryBlobEndpoint(), exampleContainer.name()).applyValue(values -> {
var primaryBlobEndpoint = values.t1;
var name = values.t2;
return String.format("%s%s", primaryBlobEndpoint,name);
}))
.storageAuthenticationType("StorageAccountConnectionString")
.storageAccessKey(exampleAccount.primaryAccessKey())
.runtimeName("node")
.runtimeVersion("20")
.maximumInstanceCount(50)
.instanceMemoryInMb(2048)
.siteConfig(AppFlexConsumptionSiteConfigArgs.builder()
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplelinuxfunctionappsa
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
exampleContainer:
type: azure:storage:Container
name: example
properties:
name: example-flexcontainer
storageAccountId: ${exampleAccount.id}
containerAccessType: private
exampleServicePlan:
type: azure:appservice:ServicePlan
name: example
properties:
name: example-app-service-plan
resourceGroupName: ${example.name}
location: ${example.location}
skuName: FC1
osType: Linux
exampleAppFlexConsumption:
type: azure:appservice:AppFlexConsumption
name: example
properties:
name: example-linux-function-app
resourceGroupName: ${example.name}
location: ${example.location}
servicePlanId: ${exampleServicePlan.id}
storageContainerType: blobContainer
storageContainerEndpoint: ${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}
storageAuthenticationType: StorageAccountConnectionString
storageAccessKey: ${exampleAccount.primaryAccessKey}
runtimeName: node
runtimeVersion: '20'
maximumInstanceCount: 50
instanceMemoryInMb: 2048
siteConfig: {}

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.Web: 2023-12-01, 2023-01-01

Import

The Function Apps can be imported using the resource id, e.g.

$ pulumi import azure:appservice/appFlexConsumption:AppFlexConsumption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1

Constructors

Link copied to clipboard
constructor(alwaysReadies: Output<List<AppFlexConsumptionAlwaysReadyArgs>>? = null, appSettings: Output<Map<String, String>>? = null, authSettings: Output<AppFlexConsumptionAuthSettingsArgs>? = null, authSettingsV2: Output<AppFlexConsumptionAuthSettingsV2Args>? = null, clientCertificateEnabled: Output<Boolean>? = null, clientCertificateExclusionPaths: Output<String>? = null, clientCertificateMode: Output<String>? = null, connectionStrings: Output<List<AppFlexConsumptionConnectionStringArgs>>? = null, enabled: Output<Boolean>? = null, identity: Output<AppFlexConsumptionIdentityArgs>? = null, instanceMemoryInMb: Output<Int>? = null, location: Output<String>? = null, maximumInstanceCount: Output<Int>? = null, name: Output<String>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, runtimeName: Output<String>? = null, runtimeVersion: Output<String>? = null, servicePlanId: Output<String>? = null, siteConfig: Output<AppFlexConsumptionSiteConfigArgs>? = null, stickySettings: Output<AppFlexConsumptionStickySettingsArgs>? = null, storageAccessKey: Output<String>? = null, storageAuthenticationType: Output<String>? = null, storageContainerEndpoint: Output<String>? = null, storageContainerType: Output<String>? = null, storageUserAssignedIdentityId: Output<String>? = null, tags: Output<Map<String, String>>? = null, virtualNetworkSubnetId: Output<String>? = null, webdeployPublishBasicAuthenticationEnabled: Output<Boolean>? = null, zipDeployFile: Output<String>? = null)

Properties

Link copied to clipboard

One or more always_ready blocks as defined below.

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

A map of key-value pairs for [App

Link copied to clipboard

A auth_settings block as defined below.

Link copied to clipboard

An auth_settings_v2 block as defined below.

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

Should the function app use Client Certificates.

Link copied to clipboard

Paths to exclude when using client certificates, separated by ;

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

The mode of the Function App's client certificates requirement for incoming requests. Possible values are Required, Optional, and OptionalInteractiveUser. Defaults to Optional.

Link copied to clipboard

One or more connection_string blocks as defined below.

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

Is the Function App enabled? Defaults to true.

Link copied to clipboard

A identity block as defined below.

Link copied to clipboard
val instanceMemoryInMb: Output<Int>? = null

The memory size of the instances on which your app runs. The currently supported values are 2048 or 4096.

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

The Azure Region where the Function App should exist. Changing this forces a new Function App to be created.

Link copied to clipboard
val maximumInstanceCount: Output<Int>? = null

The number of workers this function app can scale out to.

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

The name which should be used for this Function App. Changing this forces a new Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about Function App naming rule and Host ID Collisions

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

Should public network access be enabled for the Function App. Defaults to true.

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

The name of the Resource Group where the Function App should exist. Changing this forces a new Linux Function App to be created.

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

The Runtime of the Linux Function App. Possible values are node, dotnet-isolated, powershell, python, java and custom.

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

The Runtime version of the Linux Function App. The values are diff from different runtime version. The supported values are 8.0, 9.0 for dotnet-isolated, 20 for node, 3.10, 3.11 for python, 11, 17 for java, 7.4 for powershell.

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

The ID of the App Service Plan within which to create this Function App. Changing this forces a new Linux Function App to be created.

Link copied to clipboard

A site_config block as defined below.

Link copied to clipboard

A sticky_settings block as defined below.

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

The access key which will be used to access the backend storage account for the Function App.

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

The authentication type which will be used to access the backend storage account for the Function App. Possible values are StorageAccountConnectionString, SystemAssignedIdentity, and UserAssignedIdentity.

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

The backend storage container endpoint which will be used by this Function App.

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

The storage container type used for the Function App. The current supported type is blobContainer.

Link copied to clipboard

The user assigned Managed Identity to access the storage account. Conflicts with storage_access_key.

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

A mapping of tags which should be assigned to the Linux Function App.

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

Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to true.

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

The local path and filename of the Zip packaged application to deploy to this Linux Function App.

Functions

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