AppServiceArgs

data class AppServiceArgs(val appServicePlanId: Output<String>? = null, val appSettings: Output<Map<String, String>>? = null, val authSettings: Output<AppServiceAuthSettingsArgs>? = null, val backup: Output<AppServiceBackupArgs>? = null, val clientAffinityEnabled: Output<Boolean>? = null, val clientCertEnabled: Output<Boolean>? = null, val clientCertMode: Output<String>? = null, val connectionStrings: Output<List<AppServiceConnectionStringArgs>>? = null, val enabled: Output<Boolean>? = null, val httpsOnly: Output<Boolean>? = null, val identity: Output<AppServiceIdentityArgs>? = null, val keyVaultReferenceIdentityId: Output<String>? = null, val location: Output<String>? = null, val logs: Output<AppServiceLogsArgs>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val siteConfig: Output<AppServiceSiteConfigArgs>? = null, val sourceControl: Output<AppServiceSourceControlArgs>? = null, val storageAccounts: Output<List<AppServiceStorageAccountArgs>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AppServiceArgs>

Manages an App Service (within an App Service Plan). !>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.LinuxWebApp resources instead.

Note: When using Slots - the app_settings, connection_string and site_config blocks on the azure.appservice.AppService resource will be overwritten when promoting a Slot using the azure.appservice.ActiveSlot resource.

Example Usage

This example provisions a Windows App Service.

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.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.AppService;
import com.pulumi.azure.appservice.AppServiceArgs;
import com.pulumi.azure.appservice.inputs.AppServiceSiteConfigArgs;
import com.pulumi.azure.appservice.inputs.AppServiceConnectionStringArgs;
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 examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(PlanSkuArgs.builder()
.tier("Standard")
.size("S1")
.build())
.build());
var exampleAppService = new AppService("exampleAppService", AppServiceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.siteConfig(AppServiceSiteConfigArgs.builder()
.dotnetFrameworkVersion("v4.0")
.scmType("LocalGit")
.build())
.appSettings(Map.of("SOME_KEY", "some-value"))
.connectionStrings(AppServiceConnectionStringArgs.builder()
.name("Database")
.type("SQLServer")
.value("Server=some-server.mydomain.com;Integrated Security=SSPI")
.build())
.build());
}
}

Import

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

$ pulumi import azure:appservice/appService:AppService instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/instance1

Constructors

Link copied to clipboard
fun AppServiceArgs(appServicePlanId: Output<String>? = null, appSettings: Output<Map<String, String>>? = null, authSettings: Output<AppServiceAuthSettingsArgs>? = null, backup: Output<AppServiceBackupArgs>? = null, clientAffinityEnabled: Output<Boolean>? = null, clientCertEnabled: Output<Boolean>? = null, clientCertMode: Output<String>? = null, connectionStrings: Output<List<AppServiceConnectionStringArgs>>? = null, enabled: Output<Boolean>? = null, httpsOnly: Output<Boolean>? = null, identity: Output<AppServiceIdentityArgs>? = null, keyVaultReferenceIdentityId: Output<String>? = null, location: Output<String>? = null, logs: Output<AppServiceLogsArgs>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, siteConfig: Output<AppServiceSiteConfigArgs>? = null, sourceControl: Output<AppServiceSourceControlArgs>? = null, storageAccounts: Output<List<AppServiceStorageAccountArgs>>? = null, tags: Output<Map<String, String>>? = null)

Functions

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

Properties

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

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

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

A key-value pair of App Settings.

Link copied to clipboard

A auth_settings block as defined below.

Link copied to clipboard
val backup: Output<AppServiceBackupArgs>? = null

A backup block as defined below.

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

Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?

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

Does the App Service require client certificates for incoming requests? Defaults to false.

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

Mode of client certificates for this App Service. Possible values are Required, Optional and OptionalInteractiveUser. If this parameter is set, client_cert_enabled must be set to true, otherwise this parameter is ignored.

Link copied to clipboard

One or more connection_string blocks as defined below.

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

Is the App Service Enabled? Defaults to true.

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

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

Link copied to clipboard
val identity: Output<AppServiceIdentityArgs>? = 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. For more information see - Access vaults with a user-assigned identity

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 logs: Output<AppServiceLogsArgs>? = null

A logs block as defined below.

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

Specifies the name of the App Service. Changing this forces a new resource to be created.

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

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

Link copied to clipboard

A site_config block as defined below.

Link copied to clipboard

A Source Control block as defined below

Link copied to clipboard

One or more storage_account blocks as defined below.

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

A mapping of tags to assign to the resource.