import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an App Service Slot (within an App Service). * * !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `azure.appservice.LinuxWebAppSlot` and `azure.appservice.WindowsWebAppSlot` resources instead. * * > **Note:** When using Slots - the `appSettings`, `connectionString` and `siteConfig` blocks on the `azure.appservice.AppService` resource will be overwritten when promoting a Slot using the `azure.appservice.ActiveSlot` resource. * * ## Example Usage * * ### NET 4.X) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as random from "@pulumi/random"; * * const server = new random.index.Id("server", { * keepers: { * aziId: 1, * }, * byteLength: 8, * }); * const example = new azure.core.ResourceGroup("example", { * name: "some-resource-group", * location: "West Europe", * }); * const examplePlan = new azure.appservice.Plan("example", { * name: "some-app-service-plan", * location: example.location, * resourceGroupName: example.name, * sku: { * tier: "Standard", * size: "S1", * }, * }); * const exampleAppService = new azure.appservice.AppService("example", { * name: server.hex, * location: example.location, * resourceGroupName: example.name, * appServicePlanId: examplePlan.id, * siteConfig: { * dotnetFrameworkVersion: "v4.0", * }, * appSettings: { * SOME_KEY: "some-value", * }, * connectionStrings: [{ * name: "Database", * type: "SQLServer", * value: "Server=some-server.mydomain.com;Integrated Security=SSPI", * }], * }); * const exampleSlot = new azure.appservice.Slot("example", { * name: server.hex, * appServiceName: exampleAppService.name, * location: example.location, * resourceGroupName: example.name, * appServicePlanId: examplePlan.id, * siteConfig: { * dotnetFrameworkVersion: "v4.0", * }, * appSettings: { * SOME_KEY: "some-value", * }, * connectionStrings: [{ * name: "Database", * type: "SQLServer", * value: "Server=some-server.mydomain.com;Integrated Security=SSPI", * }], * }); * ``` * * ### Java 1.8) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as random from "@pulumi/random"; * * const server = new random.index.Id("server", { * keepers: { * aziId: 1, * }, * byteLength: 8, * }); * const example = new azure.core.ResourceGroup("example", { * name: "some-resource-group", * location: "West Europe", * }); * const examplePlan = new azure.appservice.Plan("example", { * name: "some-app-service-plan", * location: example.location, * resourceGroupName: example.name, * sku: { * tier: "Standard", * size: "S1", * }, * }); * const exampleAppService = new azure.appservice.AppService("example", { * name: server.hex, * location: example.location, * resourceGroupName: example.name, * appServicePlanId: examplePlan.id, * siteConfig: { * javaVersion: "1.8", * javaContainer: "JETTY", * javaContainerVersion: "9.3", * }, * }); * const exampleSlot = new azure.appservice.Slot("example", { * name: server.hex, * appServiceName: exampleAppService.name, * location: example.location, * resourceGroupName: example.name, * appServicePlanId: examplePlan.id, * siteConfig: { * javaVersion: "1.8", * javaContainer: "JETTY", * javaContainerVersion: "9.3", * }, * }); * ``` * * ## Import * * App Service Slots can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appservice/slot:Slot instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/website1/slots/instance1 * ``` */ export declare class Slot extends pulumi.CustomResource { /** * Get an existing Slot resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SlotState, opts?: pulumi.CustomResourceOptions): Slot; /** * Returns true if the given object is an instance of Slot. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Slot; /** * The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created. */ readonly appServiceName: pulumi.Output; /** * The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created. */ readonly appServicePlanId: pulumi.Output; /** * A key-value pair of App Settings. */ readonly appSettings: pulumi.Output<{ [key: string]: string; }>; /** * A `authSettings` block as defined below. */ readonly authSettings: pulumi.Output; /** * Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance? */ readonly clientAffinityEnabled: pulumi.Output; /** * An `connectionString` block as defined below. */ readonly connectionStrings: pulumi.Output; /** * The Default Hostname associated with the App Service Slot - such as `mysite.azurewebsites.net` */ readonly defaultSiteHostname: pulumi.Output; /** * Is the App Service Slot Enabled? Defaults to `true`. */ readonly enabled: pulumi.Output; /** * Can the App Service Slot only be accessed via HTTPS? Defaults to `false`. */ readonly httpsOnly: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * 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](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information. */ readonly keyVaultReferenceIdentityId: pulumi.Output; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * A `logs` block as defined below. */ readonly logs: pulumi.Output; /** * Specifies the name of the App Service Slot component. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * A `siteConfig` object as defined below. */ readonly siteConfig: pulumi.Output; /** * A `siteCredential` block as defined below, which contains the site-level credentials used to publish to this App Service slot. */ readonly siteCredentials: pulumi.Output; /** * One or more `storageAccount` blocks as defined below. */ readonly storageAccounts: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a Slot resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SlotArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Slot resources. */ export interface SlotState { /** * The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created. */ appServiceName?: pulumi.Input; /** * The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created. */ appServicePlanId?: pulumi.Input; /** * A key-value pair of App Settings. */ appSettings?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `authSettings` block as defined below. */ authSettings?: pulumi.Input; /** * Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance? */ clientAffinityEnabled?: pulumi.Input; /** * An `connectionString` block as defined below. */ connectionStrings?: pulumi.Input[]>; /** * The Default Hostname associated with the App Service Slot - such as `mysite.azurewebsites.net` */ defaultSiteHostname?: pulumi.Input; /** * Is the App Service Slot Enabled? Defaults to `true`. */ enabled?: pulumi.Input; /** * Can the App Service Slot only be accessed via HTTPS? Defaults to `false`. */ httpsOnly?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * 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](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information. */ keyVaultReferenceIdentityId?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * A `logs` block as defined below. */ logs?: pulumi.Input; /** * Specifies the name of the App Service Slot component. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * A `siteConfig` object as defined below. */ siteConfig?: pulumi.Input; /** * A `siteCredential` block as defined below, which contains the site-level credentials used to publish to this App Service slot. */ siteCredentials?: pulumi.Input[]>; /** * One or more `storageAccount` blocks as defined below. */ storageAccounts?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a Slot resource. */ export interface SlotArgs { /** * The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created. */ appServiceName: pulumi.Input; /** * The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created. */ appServicePlanId: pulumi.Input; /** * A key-value pair of App Settings. */ appSettings?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `authSettings` block as defined below. */ authSettings?: pulumi.Input; /** * Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance? */ clientAffinityEnabled?: pulumi.Input; /** * An `connectionString` block as defined below. */ connectionStrings?: pulumi.Input[]>; /** * Is the App Service Slot Enabled? Defaults to `true`. */ enabled?: pulumi.Input; /** * Can the App Service Slot only be accessed via HTTPS? Defaults to `false`. */ httpsOnly?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * 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](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information. */ keyVaultReferenceIdentityId?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * A `logs` block as defined below. */ logs?: pulumi.Input; /** * Specifies the name of the App Service Slot component. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * A `siteConfig` object as defined below. */ siteConfig?: pulumi.Input; /** * One or more `storageAccount` blocks as defined below. */ storageAccounts?: pulumi.Input[]>; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }