ActiveSlot
Promotes an App Service Slot to Production within an App Service.
Note: When using Slots - the
app_settings,connection_stringandsite_configblocks on theazure.appservice.AppServiceresource will be overwritten when promoting a Slot using theazure.appservice.ActiveSlotresource.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
using Random = Pulumi.Random;
class MyStack : Stack
{
public MyStack()
{
var server = new Random.RandomId("server", new Random.RandomIdArgs
{
});
// ...
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
});
// ...
var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
{
});
// ...
var exampleAppService = new Azure.AppService.AppService("exampleAppService", new Azure.AppService.AppServiceArgs
{
});
// ...
var exampleSlot = new Azure.AppService.Slot("exampleSlot", new Azure.AppService.SlotArgs
{
});
// ...
var exampleActiveSlot = new Azure.AppService.ActiveSlot("exampleActiveSlot", new Azure.AppService.ActiveSlotArgs
{
ResourceGroupName = exampleResourceGroup.Name,
AppServiceName = exampleAppService.Name,
AppServiceSlotName = exampleSlot.Name,
});
}
}
Coming soon!
import pulumi
import pulumi_azure as azure
import pulumi_random as random
server = random.RandomId("server")
# ...
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup")
# ...
example_plan = azure.appservice.Plan("examplePlan")
# ...
example_app_service = azure.appservice.AppService("exampleAppService")
# ...
example_slot = azure.appservice.Slot("exampleSlot")
# ...
example_active_slot = azure.appservice.ActiveSlot("exampleActiveSlot",
resource_group_name=example_resource_group.name,
app_service_name=example_app_service.name,
app_service_slot_name=example_slot.name)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";
const server = new random.RandomId("server", {});
// ...
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {});
// ...
const examplePlan = new azure.appservice.Plan("examplePlan", {});
// ...
const exampleAppService = new azure.appservice.AppService("exampleAppService", {});
// ...
const exampleSlot = new azure.appservice.Slot("exampleSlot", {});
// ...
const exampleActiveSlot = new azure.appservice.ActiveSlot("exampleActiveSlot", {
resourceGroupName: exampleResourceGroup.name,
appServiceName: exampleAppService.name,
appServiceSlotName: exampleSlot.name,
});Create a ActiveSlot Resource
new ActiveSlot(name: string, args: ActiveSlotArgs, opts?: CustomResourceOptions);def ActiveSlot(resource_name, opts=None, app_service_name=None, app_service_slot_name=None, resource_group_name=None, __props__=None);func NewActiveSlot(ctx *Context, name string, args ActiveSlotArgs, opts ...ResourceOption) (*ActiveSlot, error)public ActiveSlot(string name, ActiveSlotArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ActiveSlotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ActiveSlotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActiveSlotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ActiveSlot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ActiveSlot resource accepts the following input properties:
- App
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- App
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- Resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- App
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- App
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- Resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- app
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- app
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- app_
service_ strname The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- app_
service_ strslot_ name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- resource_
group_ strname The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ActiveSlot resource produces the following output properties:
Look up an Existing ActiveSlot Resource
Get an existing ActiveSlot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ActiveSlotState, opts?: CustomResourceOptions): ActiveSlotstatic get(resource_name, id, opts=None, app_service_name=None, app_service_slot_name=None, resource_group_name=None, __props__=None);func GetActiveSlot(ctx *Context, name string, id IDInput, state *ActiveSlotState, opts ...ResourceOption) (*ActiveSlot, error)public static ActiveSlot Get(string name, Input<string> id, ActiveSlotState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- App
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- App
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- Resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- App
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- App
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- Resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- app
Service stringName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- app
Service stringSlot Name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- resource
Group stringName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
- app_
service_ strname The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
- app_
service_ strslot_ name The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
- resource_
group_ strname The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.