FunctionAppArgs

data class FunctionAppArgs(val appServicePlanId: Output<String>? = null, val appSettings: Output<Map<String, String>>? = null, val authSettings: Output<FunctionAppAuthSettingsArgs>? = null, val clientCertMode: Output<String>? = null, val connectionStrings: Output<List<FunctionAppConnectionStringArgs>>? = null, val dailyMemoryTimeQuota: Output<Int>? = null, val enableBuiltinLogging: Output<Boolean>? = null, val enabled: Output<Boolean>? = null, val httpsOnly: Output<Boolean>? = null, val identity: Output<FunctionAppIdentityArgs>? = null, val keyVaultReferenceIdentityId: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val osType: Output<String>? = null, val resourceGroupName: Output<String>? = null, val siteConfig: Output<FunctionAppSiteConfigArgs>? = null, val sourceControl: Output<FunctionAppSourceControlArgs>? = null, val storageAccountAccessKey: Output<String>? = null, val storageAccountName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val version: Output<String>? = null) : ConvertibleToJava<FunctionAppArgs>

Manages a Function App. !>NOTE: This resource has been deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use azure.appservice.LinuxFunctionApp resources instead.

Note: To connect an Azure Function App and a subnet within the same region azure.appservice.VirtualNetworkSwiftConnection can be used. For an example, check the azure.appservice.VirtualNetworkSwiftConnection documentation.

Example Usage

With App Service Plan)

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.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.FunctionApp;
import com.pulumi.azure.appservice.FunctionAppArgs;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(PlanSkuArgs.builder()
.tier("Standard")
.size("S1")
.build())
.build());
var exampleFunctionApp = new FunctionApp("exampleFunctionApp", FunctionAppArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.storageAccountName(exampleAccount.name())
.storageAccountAccessKey(exampleAccount.primaryAccessKey())
.build());
}
}

In A Consumption Plan)

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.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.FunctionApp;
import com.pulumi.azure.appservice.FunctionAppArgs;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.kind("FunctionApp")
.sku(PlanSkuArgs.builder()
.tier("Dynamic")
.size("Y1")
.build())
.build());
var exampleFunctionApp = new FunctionApp("exampleFunctionApp", FunctionAppArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.storageAccountName(exampleAccount.name())
.storageAccountAccessKey(exampleAccount.primaryAccessKey())
.build());
}
}

Linux)

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.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.FunctionApp;
import com.pulumi.azure.appservice.FunctionAppArgs;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.kind("Linux")
.reserved(true)
.sku(PlanSkuArgs.builder()
.tier("Dynamic")
.size("Y1")
.build())
.build());
var exampleFunctionApp = new FunctionApp("exampleFunctionApp", FunctionAppArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.storageAccountName(exampleAccount.name())
.storageAccountAccessKey(exampleAccount.primaryAccessKey())
.osType("linux")
.version("~3")
.build());
}
}

Python In A Consumption Plan)

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.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.FunctionApp;
import com.pulumi.azure.appservice.FunctionAppArgs;
import com.pulumi.azure.appservice.inputs.FunctionAppSiteConfigArgs;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.kind("Linux")
.reserved(true)
.sku(PlanSkuArgs.builder()
.tier("Dynamic")
.size("Y1")
.build())
.build());
var exampleFunctionApp = new FunctionApp("exampleFunctionApp", FunctionAppArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.storageAccountName(exampleAccount.name())
.storageAccountAccessKey(exampleAccount.primaryAccessKey())
.osType("linux")
.version("~4")
.appSettings(Map.of("FUNCTIONSWORKERRUNTIME", "python"))
.siteConfig(FunctionAppSiteConfigArgs.builder()
.linuxFxVersion("python|3.9")
.build())
.build());
}
}

Import

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

$ pulumi import azure:appservice/functionApp:FunctionApp functionapp1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/functionapp1

Constructors

Link copied to clipboard
fun FunctionAppArgs(appServicePlanId: Output<String>? = null, appSettings: Output<Map<String, String>>? = null, authSettings: Output<FunctionAppAuthSettingsArgs>? = null, clientCertMode: Output<String>? = null, connectionStrings: Output<List<FunctionAppConnectionStringArgs>>? = null, dailyMemoryTimeQuota: Output<Int>? = null, enableBuiltinLogging: Output<Boolean>? = null, enabled: Output<Boolean>? = null, httpsOnly: Output<Boolean>? = null, identity: Output<FunctionAppIdentityArgs>? = null, keyVaultReferenceIdentityId: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, osType: Output<String>? = null, resourceGroupName: Output<String>? = null, siteConfig: Output<FunctionAppSiteConfigArgs>? = null, sourceControl: Output<FunctionAppSourceControlArgs>? = null, storageAccountAccessKey: Output<String>? = null, storageAccountName: Output<String>? = null, tags: Output<Map<String, String>>? = null, version: Output<String>? = null)

Functions

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

Properties

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

The ID of the App Service Plan within which to create this Function App.

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

A map of key-value pairs for App Settings and custom values.

Link copied to clipboard

A auth_settings block as defined below.

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

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

Link copied to clipboard

An connection_string block as defined below.

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

The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan.

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

Should the built-in logging of this Function App be enabled? Defaults to true.

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

Is the Function App enabled? Defaults to true.

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

Can the Function App only be accessed via HTTPS? Defaults to false.

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

An identity block as defined below.

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

The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. See Access vaults with a user-assigned identity for more information.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Specifies the name of the Function App. Changing this forces a new resource to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about Function App naming rule.

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

A string indicating the Operating System type for this function app. Possible values are linux and ``(empty string). Changing this forces a new resource to be created. Defaults to "".

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

The name of the resource group in which to create the Function App. Changing this forces a new resource to be created.

Link copied to clipboard

A site_config object as defined below.

Link copied to clipboard

A source_control block, as defined below.

Link copied to clipboard
val storageAccountAccessKey: 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 storageAccountName: Output<String>? = null

The backend storage account name which will be used by this Function App (such as the dashboard, logs). Changing this forces a new resource to be created.

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

A mapping of tags to assign to the resource.

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

The runtime version associated with the Function App. Defaults to ~1.