1. Packages
  2. Azure Classic
  3. API Docs
  4. appservice
  5. SourceControlSlot

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.appservice.SourceControlSlot

Explore with Pulumi AI

Manages an App Service Source Control Slot.

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 exampleServicePlan = new azure.appservice.ServicePlan("example", {
    name: "example-plan",
    resourceGroupName: example.name,
    location: example.location,
    osType: "Linux",
    skuName: "P1v2",
});
const exampleLinuxWebApp = new azure.appservice.LinuxWebApp("example", {
    name: "example-web-app",
    resourceGroupName: example.name,
    location: exampleServicePlan.location,
    servicePlanId: exampleServicePlan.id,
    siteConfig: {},
});
const exampleLinuxWebAppSlot = new azure.appservice.LinuxWebAppSlot("example", {
    name: "example-slot",
    appServiceId: exampleLinuxWebApp.id,
    siteConfig: {},
});
const exampleSourceControlSlot = new azure.appservice.SourceControlSlot("example", {
    slotId: exampleLinuxWebAppSlot.id,
    repoUrl: "https://github.com/Azure-Samples/python-docs-hello-world",
    branch: "master",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_service_plan = azure.appservice.ServicePlan("example",
    name="example-plan",
    resource_group_name=example.name,
    location=example.location,
    os_type="Linux",
    sku_name="P1v2")
example_linux_web_app = azure.appservice.LinuxWebApp("example",
    name="example-web-app",
    resource_group_name=example.name,
    location=example_service_plan.location,
    service_plan_id=example_service_plan.id,
    site_config={})
example_linux_web_app_slot = azure.appservice.LinuxWebAppSlot("example",
    name="example-slot",
    app_service_id=example_linux_web_app.id,
    site_config={})
example_source_control_slot = azure.appservice.SourceControlSlot("example",
    slot_id=example_linux_web_app_slot.id,
    repo_url="https://github.com/Azure-Samples/python-docs-hello-world",
    branch="master")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"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
		}
		exampleServicePlan, err := appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{
			Name:              pulumi.String("example-plan"),
			ResourceGroupName: example.Name,
			Location:          example.Location,
			OsType:            pulumi.String("Linux"),
			SkuName:           pulumi.String("P1v2"),
		})
		if err != nil {
			return err
		}
		exampleLinuxWebApp, err := appservice.NewLinuxWebApp(ctx, "example", &appservice.LinuxWebAppArgs{
			Name:              pulumi.String("example-web-app"),
			ResourceGroupName: example.Name,
			Location:          exampleServicePlan.Location,
			ServicePlanId:     exampleServicePlan.ID(),
			SiteConfig:        &appservice.LinuxWebAppSiteConfigArgs{},
		})
		if err != nil {
			return err
		}
		exampleLinuxWebAppSlot, err := appservice.NewLinuxWebAppSlot(ctx, "example", &appservice.LinuxWebAppSlotArgs{
			Name:         pulumi.String("example-slot"),
			AppServiceId: exampleLinuxWebApp.ID(),
			SiteConfig:   &appservice.LinuxWebAppSlotSiteConfigArgs{},
		})
		if err != nil {
			return err
		}
		_, err = appservice.NewSourceControlSlot(ctx, "example", &appservice.SourceControlSlotArgs{
			SlotId:  exampleLinuxWebAppSlot.ID(),
			RepoUrl: pulumi.String("https://github.com/Azure-Samples/python-docs-hello-world"),
			Branch:  pulumi.String("master"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 exampleServicePlan = new Azure.AppService.ServicePlan("example", new()
    {
        Name = "example-plan",
        ResourceGroupName = example.Name,
        Location = example.Location,
        OsType = "Linux",
        SkuName = "P1v2",
    });

    var exampleLinuxWebApp = new Azure.AppService.LinuxWebApp("example", new()
    {
        Name = "example-web-app",
        ResourceGroupName = example.Name,
        Location = exampleServicePlan.Location,
        ServicePlanId = exampleServicePlan.Id,
        SiteConfig = null,
    });

    var exampleLinuxWebAppSlot = new Azure.AppService.LinuxWebAppSlot("example", new()
    {
        Name = "example-slot",
        AppServiceId = exampleLinuxWebApp.Id,
        SiteConfig = null,
    });

    var exampleSourceControlSlot = new Azure.AppService.SourceControlSlot("example", new()
    {
        SlotId = exampleLinuxWebAppSlot.Id,
        RepoUrl = "https://github.com/Azure-Samples/python-docs-hello-world",
        Branch = "master",
    });

});
Copy
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.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.appservice.LinuxWebApp;
import com.pulumi.azure.appservice.LinuxWebAppArgs;
import com.pulumi.azure.appservice.inputs.LinuxWebAppSiteConfigArgs;
import com.pulumi.azure.appservice.LinuxWebAppSlot;
import com.pulumi.azure.appservice.LinuxWebAppSlotArgs;
import com.pulumi.azure.appservice.inputs.LinuxWebAppSlotSiteConfigArgs;
import com.pulumi.azure.appservice.SourceControlSlot;
import com.pulumi.azure.appservice.SourceControlSlotArgs;
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 exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
            .name("example-plan")
            .resourceGroupName(example.name())
            .location(example.location())
            .osType("Linux")
            .skuName("P1v2")
            .build());

        var exampleLinuxWebApp = new LinuxWebApp("exampleLinuxWebApp", LinuxWebAppArgs.builder()
            .name("example-web-app")
            .resourceGroupName(example.name())
            .location(exampleServicePlan.location())
            .servicePlanId(exampleServicePlan.id())
            .siteConfig()
            .build());

        var exampleLinuxWebAppSlot = new LinuxWebAppSlot("exampleLinuxWebAppSlot", LinuxWebAppSlotArgs.builder()
            .name("example-slot")
            .appServiceId(exampleLinuxWebApp.id())
            .siteConfig()
            .build());

        var exampleSourceControlSlot = new SourceControlSlot("exampleSourceControlSlot", SourceControlSlotArgs.builder()
            .slotId(exampleLinuxWebAppSlot.id())
            .repoUrl("https://github.com/Azure-Samples/python-docs-hello-world")
            .branch("master")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleServicePlan:
    type: azure:appservice:ServicePlan
    name: example
    properties:
      name: example-plan
      resourceGroupName: ${example.name}
      location: ${example.location}
      osType: Linux
      skuName: P1v2
  exampleLinuxWebApp:
    type: azure:appservice:LinuxWebApp
    name: example
    properties:
      name: example-web-app
      resourceGroupName: ${example.name}
      location: ${exampleServicePlan.location}
      servicePlanId: ${exampleServicePlan.id}
      siteConfig: {}
  exampleLinuxWebAppSlot:
    type: azure:appservice:LinuxWebAppSlot
    name: example
    properties:
      name: example-slot
      appServiceId: ${exampleLinuxWebApp.id}
      siteConfig: {}
  exampleSourceControlSlot:
    type: azure:appservice:SourceControlSlot
    name: example
    properties:
      slotId: ${exampleLinuxWebAppSlot.id}
      repoUrl: https://github.com/Azure-Samples/python-docs-hello-world
      branch: master
Copy

Create SourceControlSlot Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SourceControlSlot(name: string, args: SourceControlSlotArgs, opts?: CustomResourceOptions);
@overload
def SourceControlSlot(resource_name: str,
                      args: SourceControlSlotArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def SourceControlSlot(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      slot_id: Optional[str] = None,
                      branch: Optional[str] = None,
                      github_action_configuration: Optional[SourceControlSlotGithubActionConfigurationArgs] = None,
                      repo_url: Optional[str] = None,
                      rollback_enabled: Optional[bool] = None,
                      use_local_git: Optional[bool] = None,
                      use_manual_integration: Optional[bool] = None,
                      use_mercurial: Optional[bool] = None)
func NewSourceControlSlot(ctx *Context, name string, args SourceControlSlotArgs, opts ...ResourceOption) (*SourceControlSlot, error)
public SourceControlSlot(string name, SourceControlSlotArgs args, CustomResourceOptions? opts = null)
public SourceControlSlot(String name, SourceControlSlotArgs args)
public SourceControlSlot(String name, SourceControlSlotArgs args, CustomResourceOptions options)
type: azure:appservice:SourceControlSlot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SourceControlSlotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SourceControlSlotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SourceControlSlotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SourceControlSlotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SourceControlSlotArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var sourceControlSlotResource = new Azure.AppService.SourceControlSlot("sourceControlSlotResource", new()
{
    SlotId = "string",
    Branch = "string",
    GithubActionConfiguration = new Azure.AppService.Inputs.SourceControlSlotGithubActionConfigurationArgs
    {
        CodeConfiguration = new Azure.AppService.Inputs.SourceControlSlotGithubActionConfigurationCodeConfigurationArgs
        {
            RuntimeStack = "string",
            RuntimeVersion = "string",
        },
        ContainerConfiguration = new Azure.AppService.Inputs.SourceControlSlotGithubActionConfigurationContainerConfigurationArgs
        {
            ImageName = "string",
            RegistryUrl = "string",
            RegistryPassword = "string",
            RegistryUsername = "string",
        },
        GenerateWorkflowFile = false,
        LinuxAction = false,
    },
    RepoUrl = "string",
    RollbackEnabled = false,
    UseLocalGit = false,
    UseManualIntegration = false,
    UseMercurial = false,
});
Copy
example, err := appservice.NewSourceControlSlot(ctx, "sourceControlSlotResource", &appservice.SourceControlSlotArgs{
	SlotId: pulumi.String("string"),
	Branch: pulumi.String("string"),
	GithubActionConfiguration: &appservice.SourceControlSlotGithubActionConfigurationArgs{
		CodeConfiguration: &appservice.SourceControlSlotGithubActionConfigurationCodeConfigurationArgs{
			RuntimeStack:   pulumi.String("string"),
			RuntimeVersion: pulumi.String("string"),
		},
		ContainerConfiguration: &appservice.SourceControlSlotGithubActionConfigurationContainerConfigurationArgs{
			ImageName:        pulumi.String("string"),
			RegistryUrl:      pulumi.String("string"),
			RegistryPassword: pulumi.String("string"),
			RegistryUsername: pulumi.String("string"),
		},
		GenerateWorkflowFile: pulumi.Bool(false),
		LinuxAction:          pulumi.Bool(false),
	},
	RepoUrl:              pulumi.String("string"),
	RollbackEnabled:      pulumi.Bool(false),
	UseLocalGit:          pulumi.Bool(false),
	UseManualIntegration: pulumi.Bool(false),
	UseMercurial:         pulumi.Bool(false),
})
Copy
var sourceControlSlotResource = new SourceControlSlot("sourceControlSlotResource", SourceControlSlotArgs.builder()
    .slotId("string")
    .branch("string")
    .githubActionConfiguration(SourceControlSlotGithubActionConfigurationArgs.builder()
        .codeConfiguration(SourceControlSlotGithubActionConfigurationCodeConfigurationArgs.builder()
            .runtimeStack("string")
            .runtimeVersion("string")
            .build())
        .containerConfiguration(SourceControlSlotGithubActionConfigurationContainerConfigurationArgs.builder()
            .imageName("string")
            .registryUrl("string")
            .registryPassword("string")
            .registryUsername("string")
            .build())
        .generateWorkflowFile(false)
        .linuxAction(false)
        .build())
    .repoUrl("string")
    .rollbackEnabled(false)
    .useLocalGit(false)
    .useManualIntegration(false)
    .useMercurial(false)
    .build());
Copy
source_control_slot_resource = azure.appservice.SourceControlSlot("sourceControlSlotResource",
    slot_id="string",
    branch="string",
    github_action_configuration={
        "code_configuration": {
            "runtime_stack": "string",
            "runtime_version": "string",
        },
        "container_configuration": {
            "image_name": "string",
            "registry_url": "string",
            "registry_password": "string",
            "registry_username": "string",
        },
        "generate_workflow_file": False,
        "linux_action": False,
    },
    repo_url="string",
    rollback_enabled=False,
    use_local_git=False,
    use_manual_integration=False,
    use_mercurial=False)
Copy
const sourceControlSlotResource = new azure.appservice.SourceControlSlot("sourceControlSlotResource", {
    slotId: "string",
    branch: "string",
    githubActionConfiguration: {
        codeConfiguration: {
            runtimeStack: "string",
            runtimeVersion: "string",
        },
        containerConfiguration: {
            imageName: "string",
            registryUrl: "string",
            registryPassword: "string",
            registryUsername: "string",
        },
        generateWorkflowFile: false,
        linuxAction: false,
    },
    repoUrl: "string",
    rollbackEnabled: false,
    useLocalGit: false,
    useManualIntegration: false,
    useMercurial: false,
});
Copy
type: azure:appservice:SourceControlSlot
properties:
    branch: string
    githubActionConfiguration:
        codeConfiguration:
            runtimeStack: string
            runtimeVersion: string
        containerConfiguration:
            imageName: string
            registryPassword: string
            registryUrl: string
            registryUsername: string
        generateWorkflowFile: false
        linuxAction: false
    repoUrl: string
    rollbackEnabled: false
    slotId: string
    useLocalGit: false
    useManualIntegration: false
    useMercurial: false
Copy

SourceControlSlot Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SourceControlSlot resource accepts the following input properties:

SlotId
This property is required.
Changes to this property will trigger replacement.
string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

Branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
GithubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
RepoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
RollbackEnabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
UseLocalGit Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
UseManualIntegration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
UseMercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
SlotId
This property is required.
Changes to this property will trigger replacement.
string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

Branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
GithubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationArgs
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
RepoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
RollbackEnabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
UseLocalGit Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
UseManualIntegration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
UseMercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
slotId
This property is required.
Changes to this property will trigger replacement.
String

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

branch Changes to this property will trigger replacement. String
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. String
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. Boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
useLocalGit Changes to this property will trigger replacement. Boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. Boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. Boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
slotId
This property is required.
Changes to this property will trigger replacement.
string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
useLocalGit Changes to this property will trigger replacement. boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
slot_id
This property is required.
Changes to this property will trigger replacement.
str

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

branch Changes to this property will trigger replacement. str
The URL for the repository. Changing this forces a new resource to be created.
github_action_configuration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationArgs
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repo_url Changes to this property will trigger replacement. str
The branch name to use for deployments. Changing this forces a new resource to be created.
rollback_enabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
use_local_git Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
use_manual_integration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
use_mercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
slotId
This property is required.
Changes to this property will trigger replacement.
String

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

branch Changes to this property will trigger replacement. String
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. Property Map
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. String
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. Boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
useLocalGit Changes to this property will trigger replacement. Boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. Boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. Boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the SourceControlSlot resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ScmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
UsesGithubAction bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
Id string
The provider-assigned unique ID for this managed resource.
ScmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
UsesGithubAction bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
id String
The provider-assigned unique ID for this managed resource.
scmType String
The SCM Type in use. This value is decoded by the service from the repository information supplied.
usesGithubAction Boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
id string
The provider-assigned unique ID for this managed resource.
scmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
usesGithubAction boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
id str
The provider-assigned unique ID for this managed resource.
scm_type str
The SCM Type in use. This value is decoded by the service from the repository information supplied.
uses_github_action bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
id String
The provider-assigned unique ID for this managed resource.
scmType String
The SCM Type in use. This value is decoded by the service from the repository information supplied.
usesGithubAction Boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.

Look up Existing SourceControlSlot Resource

Get an existing SourceControlSlot 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?: SourceControlSlotState, opts?: CustomResourceOptions): SourceControlSlot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        branch: Optional[str] = None,
        github_action_configuration: Optional[SourceControlSlotGithubActionConfigurationArgs] = None,
        repo_url: Optional[str] = None,
        rollback_enabled: Optional[bool] = None,
        scm_type: Optional[str] = None,
        slot_id: Optional[str] = None,
        use_local_git: Optional[bool] = None,
        use_manual_integration: Optional[bool] = None,
        use_mercurial: Optional[bool] = None,
        uses_github_action: Optional[bool] = None) -> SourceControlSlot
func GetSourceControlSlot(ctx *Context, name string, id IDInput, state *SourceControlSlotState, opts ...ResourceOption) (*SourceControlSlot, error)
public static SourceControlSlot Get(string name, Input<string> id, SourceControlSlotState? state, CustomResourceOptions? opts = null)
public static SourceControlSlot get(String name, Output<String> id, SourceControlSlotState state, CustomResourceOptions options)
resources:  _:    type: azure:appservice:SourceControlSlot    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
GithubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
RepoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
RollbackEnabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
ScmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
SlotId Changes to this property will trigger replacement. string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

UseLocalGit Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
UseManualIntegration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
UseMercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
UsesGithubAction bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
Branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
GithubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationArgs
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
RepoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
RollbackEnabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
ScmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
SlotId Changes to this property will trigger replacement. string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

UseLocalGit Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
UseManualIntegration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
UseMercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
UsesGithubAction bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
branch Changes to this property will trigger replacement. String
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. String
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. Boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
scmType String
The SCM Type in use. This value is decoded by the service from the repository information supplied.
slotId Changes to this property will trigger replacement. String

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

useLocalGit Changes to this property will trigger replacement. Boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. Boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. Boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
usesGithubAction Boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
branch Changes to this property will trigger replacement. string
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfiguration
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. string
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
scmType string
The SCM Type in use. This value is decoded by the service from the repository information supplied.
slotId Changes to this property will trigger replacement. string

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

useLocalGit Changes to this property will trigger replacement. boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
usesGithubAction boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
branch Changes to this property will trigger replacement. str
The URL for the repository. Changing this forces a new resource to be created.
github_action_configuration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationArgs
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repo_url Changes to this property will trigger replacement. str
The branch name to use for deployments. Changing this forces a new resource to be created.
rollback_enabled Changes to this property will trigger replacement. bool
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
scm_type str
The SCM Type in use. This value is decoded by the service from the repository information supplied.
slot_id Changes to this property will trigger replacement. str

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

use_local_git Changes to this property will trigger replacement. bool
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
use_manual_integration Changes to this property will trigger replacement. bool
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
use_mercurial Changes to this property will trigger replacement. bool
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
uses_github_action bool
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.
branch Changes to this property will trigger replacement. String
The URL for the repository. Changing this forces a new resource to be created.
githubActionConfiguration Changes to this property will trigger replacement. Property Map
A github_action_configuration block as detailed below. Changing this forces a new resource to be created.
repoUrl Changes to this property will trigger replacement. String
The branch name to use for deployments. Changing this forces a new resource to be created.
rollbackEnabled Changes to this property will trigger replacement. Boolean
Should the Deployment Rollback be enabled? Defaults to false Changing this forces a new resource to be created.
scmType String
The SCM Type in use. This value is decoded by the service from the repository information supplied.
slotId Changes to this property will trigger replacement. String

The ID of the Linux or Windows Web App Slot. Changing this forces a new resource to be created.

NOTE: Function App Slots are not supported at this time.

useLocalGit Changes to this property will trigger replacement. Boolean
Should the Slot use local Git configuration. Changing this forces a new resource to be created.
useManualIntegration Changes to this property will trigger replacement. Boolean
Should code be deployed manually. Set to true to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
useMercurial Changes to this property will trigger replacement. Boolean
The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
usesGithubAction Boolean
Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied.

Supporting Types

SourceControlSlotGithubActionConfiguration
, SourceControlSlotGithubActionConfigurationArgs

CodeConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationCodeConfiguration
A code_configuration block as detailed below. Changing this forces a new resource to be created.
ContainerConfiguration SourceControlSlotGithubActionConfigurationContainerConfiguration
A container_configuration block as detailed below.
GenerateWorkflowFile Changes to this property will trigger replacement. bool
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
LinuxAction bool
Denotes this action uses a Linux base image.
CodeConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationCodeConfiguration
A code_configuration block as detailed below. Changing this forces a new resource to be created.
ContainerConfiguration SourceControlSlotGithubActionConfigurationContainerConfiguration
A container_configuration block as detailed below.
GenerateWorkflowFile Changes to this property will trigger replacement. bool
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
LinuxAction bool
Denotes this action uses a Linux base image.
codeConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationCodeConfiguration
A code_configuration block as detailed below. Changing this forces a new resource to be created.
containerConfiguration SourceControlSlotGithubActionConfigurationContainerConfiguration
A container_configuration block as detailed below.
generateWorkflowFile Changes to this property will trigger replacement. Boolean
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
linuxAction Boolean
Denotes this action uses a Linux base image.
codeConfiguration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationCodeConfiguration
A code_configuration block as detailed below. Changing this forces a new resource to be created.
containerConfiguration SourceControlSlotGithubActionConfigurationContainerConfiguration
A container_configuration block as detailed below.
generateWorkflowFile Changes to this property will trigger replacement. boolean
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
linuxAction boolean
Denotes this action uses a Linux base image.
code_configuration Changes to this property will trigger replacement. SourceControlSlotGithubActionConfigurationCodeConfiguration
A code_configuration block as detailed below. Changing this forces a new resource to be created.
container_configuration SourceControlSlotGithubActionConfigurationContainerConfiguration
A container_configuration block as detailed below.
generate_workflow_file Changes to this property will trigger replacement. bool
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
linux_action bool
Denotes this action uses a Linux base image.
codeConfiguration Changes to this property will trigger replacement. Property Map
A code_configuration block as detailed below. Changing this forces a new resource to be created.
containerConfiguration Property Map
A container_configuration block as detailed below.
generateWorkflowFile Changes to this property will trigger replacement. Boolean
Should the service generate the GitHub Action Workflow file. Defaults to true Changing this forces a new resource to be created.
linuxAction Boolean
Denotes this action uses a Linux base image.

SourceControlSlotGithubActionConfigurationCodeConfiguration
, SourceControlSlotGithubActionConfigurationCodeConfigurationArgs

RuntimeStack
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
RuntimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.
RuntimeStack
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
RuntimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.
runtimeStack
This property is required.
Changes to this property will trigger replacement.
String
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
String
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.
runtimeStack
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
string
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.
runtime_stack
This property is required.
Changes to this property will trigger replacement.
str
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
runtime_version
This property is required.
Changes to this property will trigger replacement.
str
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.
runtimeStack
This property is required.
Changes to this property will trigger replacement.
String
The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are dotnetcore, spring, tomcat, node and python.
runtimeVersion
This property is required.
Changes to this property will trigger replacement.
String
The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created.

SourceControlSlotGithubActionConfigurationContainerConfiguration
, SourceControlSlotGithubActionConfigurationContainerConfigurationArgs

ImageName
This property is required.
Changes to this property will trigger replacement.
string
The image name for the build. Changing this forces a new resource to be created.
RegistryUrl
This property is required.
Changes to this property will trigger replacement.
string
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
RegistryPassword Changes to this property will trigger replacement. string
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
RegistryUsername Changes to this property will trigger replacement. string
The username used to upload the image to the container registry. Changing this forces a new resource to be created.
ImageName
This property is required.
Changes to this property will trigger replacement.
string
The image name for the build. Changing this forces a new resource to be created.
RegistryUrl
This property is required.
Changes to this property will trigger replacement.
string
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
RegistryPassword Changes to this property will trigger replacement. string
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
RegistryUsername Changes to this property will trigger replacement. string
The username used to upload the image to the container registry. Changing this forces a new resource to be created.
imageName
This property is required.
Changes to this property will trigger replacement.
String
The image name for the build. Changing this forces a new resource to be created.
registryUrl
This property is required.
Changes to this property will trigger replacement.
String
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
registryPassword Changes to this property will trigger replacement. String
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
registryUsername Changes to this property will trigger replacement. String
The username used to upload the image to the container registry. Changing this forces a new resource to be created.
imageName
This property is required.
Changes to this property will trigger replacement.
string
The image name for the build. Changing this forces a new resource to be created.
registryUrl
This property is required.
Changes to this property will trigger replacement.
string
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
registryPassword Changes to this property will trigger replacement. string
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
registryUsername Changes to this property will trigger replacement. string
The username used to upload the image to the container registry. Changing this forces a new resource to be created.
image_name
This property is required.
Changes to this property will trigger replacement.
str
The image name for the build. Changing this forces a new resource to be created.
registry_url
This property is required.
Changes to this property will trigger replacement.
str
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
registry_password Changes to this property will trigger replacement. str
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
registry_username Changes to this property will trigger replacement. str
The username used to upload the image to the container registry. Changing this forces a new resource to be created.
imageName
This property is required.
Changes to this property will trigger replacement.
String
The image name for the build. Changing this forces a new resource to be created.
registryUrl
This property is required.
Changes to this property will trigger replacement.
String
The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
registryPassword Changes to this property will trigger replacement. String
The password used to upload the image to the container registry. Changing this forces a new resource to be created.
registryUsername Changes to this property will trigger replacement. String
The username used to upload the image to the container registry. Changing this forces a new resource to be created.

Import

an App Service Source Control Slot can be imported using the resource id, e.g.

$ pulumi import azure:appservice/sourceControlSlot:SourceControlSlot example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/slots/slot1"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.