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

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.appservice.SourceControl

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    Manages an App Service Web App or Function App Source Control Configuration.

    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",
        resourceGroupName: example.name,
        location: example.location,
        osType: "Linux",
        skuName: "P1v2",
    });
    const exampleLinuxWebApp = new azure.appservice.LinuxWebApp("example", {
        name: "example",
        resourceGroupName: example.name,
        location: exampleServicePlan.location,
        servicePlanId: exampleServicePlan.id,
        siteConfig: {},
    });
    const exampleSourceControl = new azure.appservice.SourceControl("example", {
        appId: exampleLinuxWebApp.id,
        repoUrl: "https://github.com/Azure-Samples/python-docs-hello-world",
        branch: "master",
    });
    
    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",
        resource_group_name=example.name,
        location=example.location,
        os_type="Linux",
        sku_name="P1v2")
    example_linux_web_app = azure.appservice.LinuxWebApp("example",
        name="example",
        resource_group_name=example.name,
        location=example_service_plan.location,
        service_plan_id=example_service_plan.id,
        site_config=azure.appservice.LinuxWebAppSiteConfigArgs())
    example_source_control = azure.appservice.SourceControl("example",
        app_id=example_linux_web_app.id,
        repo_url="https://github.com/Azure-Samples/python-docs-hello-world",
        branch="master")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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"),
    			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"),
    			ResourceGroupName: example.Name,
    			Location:          exampleServicePlan.Location,
    			ServicePlanId:     exampleServicePlan.ID(),
    			SiteConfig:        nil,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appservice.NewSourceControl(ctx, "example", &appservice.SourceControlArgs{
    			AppId:   exampleLinuxWebApp.ID(),
    			RepoUrl: pulumi.String("https://github.com/Azure-Samples/python-docs-hello-world"),
    			Branch:  pulumi.String("master"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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",
            ResourceGroupName = example.Name,
            Location = example.Location,
            OsType = "Linux",
            SkuName = "P1v2",
        });
    
        var exampleLinuxWebApp = new Azure.AppService.LinuxWebApp("example", new()
        {
            Name = "example",
            ResourceGroupName = example.Name,
            Location = exampleServicePlan.Location,
            ServicePlanId = exampleServicePlan.Id,
            SiteConfig = null,
        });
    
        var exampleSourceControl = new Azure.AppService.SourceControl("example", new()
        {
            AppId = exampleLinuxWebApp.Id,
            RepoUrl = "https://github.com/Azure-Samples/python-docs-hello-world",
            Branch = "master",
        });
    
    });
    
    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.SourceControl;
    import com.pulumi.azure.appservice.SourceControlArgs;
    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")
                .resourceGroupName(example.name())
                .location(example.location())
                .osType("Linux")
                .skuName("P1v2")
                .build());
    
            var exampleLinuxWebApp = new LinuxWebApp("exampleLinuxWebApp", LinuxWebAppArgs.builder()        
                .name("example")
                .resourceGroupName(example.name())
                .location(exampleServicePlan.location())
                .servicePlanId(exampleServicePlan.id())
                .siteConfig()
                .build());
    
            var exampleSourceControl = new SourceControl("exampleSourceControl", SourceControlArgs.builder()        
                .appId(exampleLinuxWebApp.id())
                .repoUrl("https://github.com/Azure-Samples/python-docs-hello-world")
                .branch("master")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleServicePlan:
        type: azure:appservice:ServicePlan
        name: example
        properties:
          name: example
          resourceGroupName: ${example.name}
          location: ${example.location}
          osType: Linux
          skuName: P1v2
      exampleLinuxWebApp:
        type: azure:appservice:LinuxWebApp
        name: example
        properties:
          name: example
          resourceGroupName: ${example.name}
          location: ${exampleServicePlan.location}
          servicePlanId: ${exampleServicePlan.id}
          siteConfig: {}
      exampleSourceControl:
        type: azure:appservice:SourceControl
        name: example
        properties:
          appId: ${exampleLinuxWebApp.id}
          repoUrl: https://github.com/Azure-Samples/python-docs-hello-world
          branch: master
    

    Create SourceControl Resource

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

    Constructor syntax

    new SourceControl(name: string, args: SourceControlArgs, opts?: CustomResourceOptions);
    @overload
    def SourceControl(resource_name: str,
                      args: SourceControlArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SourceControl(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      app_id: Optional[str] = None,
                      branch: Optional[str] = None,
                      github_action_configuration: Optional[SourceControlGithubActionConfigurationArgs] = 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 NewSourceControl(ctx *Context, name string, args SourceControlArgs, opts ...ResourceOption) (*SourceControl, error)
    public SourceControl(string name, SourceControlArgs args, CustomResourceOptions? opts = null)
    public SourceControl(String name, SourceControlArgs args)
    public SourceControl(String name, SourceControlArgs args, CustomResourceOptions options)
    
    type: azure:appservice:SourceControl
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Example

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

    var sourceControlResource = new Azure.AppService.SourceControl("sourceControlResource", new()
    {
        AppId = "string",
        Branch = "string",
        GithubActionConfiguration = new Azure.AppService.Inputs.SourceControlGithubActionConfigurationArgs
        {
            CodeConfiguration = new Azure.AppService.Inputs.SourceControlGithubActionConfigurationCodeConfigurationArgs
            {
                RuntimeStack = "string",
                RuntimeVersion = "string",
            },
            ContainerConfiguration = new Azure.AppService.Inputs.SourceControlGithubActionConfigurationContainerConfigurationArgs
            {
                ImageName = "string",
                RegistryUrl = "string",
                RegistryPassword = "string",
                RegistryUsername = "string",
            },
            GenerateWorkflowFile = false,
            LinuxAction = false,
        },
        RepoUrl = "string",
        RollbackEnabled = false,
        UseLocalGit = false,
        UseManualIntegration = false,
        UseMercurial = false,
    });
    
    example, err := appservice.NewSourceControl(ctx, "sourceControlResource", &appservice.SourceControlArgs{
    	AppId:  pulumi.String("string"),
    	Branch: pulumi.String("string"),
    	GithubActionConfiguration: &appservice.SourceControlGithubActionConfigurationArgs{
    		CodeConfiguration: &appservice.SourceControlGithubActionConfigurationCodeConfigurationArgs{
    			RuntimeStack:   pulumi.String("string"),
    			RuntimeVersion: pulumi.String("string"),
    		},
    		ContainerConfiguration: &appservice.SourceControlGithubActionConfigurationContainerConfigurationArgs{
    			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),
    })
    
    var sourceControlResource = new SourceControl("sourceControlResource", SourceControlArgs.builder()        
        .appId("string")
        .branch("string")
        .githubActionConfiguration(SourceControlGithubActionConfigurationArgs.builder()
            .codeConfiguration(SourceControlGithubActionConfigurationCodeConfigurationArgs.builder()
                .runtimeStack("string")
                .runtimeVersion("string")
                .build())
            .containerConfiguration(SourceControlGithubActionConfigurationContainerConfigurationArgs.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());
    
    source_control_resource = azure.appservice.SourceControl("sourceControlResource",
        app_id="string",
        branch="string",
        github_action_configuration=azure.appservice.SourceControlGithubActionConfigurationArgs(
            code_configuration=azure.appservice.SourceControlGithubActionConfigurationCodeConfigurationArgs(
                runtime_stack="string",
                runtime_version="string",
            ),
            container_configuration=azure.appservice.SourceControlGithubActionConfigurationContainerConfigurationArgs(
                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)
    
    const sourceControlResource = new azure.appservice.SourceControl("sourceControlResource", {
        appId: "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,
    });
    
    type: azure:appservice:SourceControl
    properties:
        appId: string
        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
        useLocalGit: false
        useManualIntegration: false
        useMercurial: false
    

    SourceControl Resource Properties

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

    Inputs

    The SourceControl resource accepts the following input properties:

    AppId string

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

    NOTE: Function apps are not supported at this time.

    Branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    GithubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    RepoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    RollbackEnabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    UseLocalGit bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    UseManualIntegration bool
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    UseMercurial bool
    The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
    AppId string

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

    NOTE: Function apps are not supported at this time.

    Branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    GithubActionConfiguration SourceControlGithubActionConfigurationArgs
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    RepoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    RollbackEnabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    UseLocalGit bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    UseManualIntegration bool
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    UseMercurial bool
    The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
    appId String

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

    NOTE: Function apps are not supported at this time.

    branch String
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl String
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled Boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    useLocalGit Boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration Boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial Boolean
    The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
    appId string

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

    NOTE: Function apps are not supported at this time.

    branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    useLocalGit boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial boolean
    The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
    app_id str

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

    NOTE: Function apps are not supported at this time.

    branch str
    The branch name to use for deployments. Changing this forces a new resource to be created.
    github_action_configuration SourceControlGithubActionConfigurationArgs
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repo_url str
    The URL for the repository. Changing this forces a new resource to be created.
    rollback_enabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    use_local_git bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    use_manual_integration bool
    Should code be deployed manually. Set to false to enable 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 bool
    The repository specified is Mercurial. Defaults to false. Changing this forces a new resource to be created.
    appId String

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

    NOTE: Function apps are not supported at this time.

    branch String
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration Property Map
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl String
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled Boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    useLocalGit Boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration Boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial 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 SourceControl 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 SourceControl Resource

    Get an existing SourceControl 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?: SourceControlState, opts?: CustomResourceOptions): SourceControl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            branch: Optional[str] = None,
            github_action_configuration: Optional[SourceControlGithubActionConfigurationArgs] = None,
            repo_url: Optional[str] = None,
            rollback_enabled: Optional[bool] = None,
            scm_type: 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) -> SourceControl
    func GetSourceControl(ctx *Context, name string, id IDInput, state *SourceControlState, opts ...ResourceOption) (*SourceControl, error)
    public static SourceControl Get(string name, Input<string> id, SourceControlState? state, CustomResourceOptions? opts = null)
    public static SourceControl get(String name, Output<String> id, SourceControlState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    AppId string

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

    NOTE: Function apps are not supported at this time.

    Branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    GithubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    RepoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    RollbackEnabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    ScmType string
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    UseLocalGit bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    UseManualIntegration bool
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    UseMercurial 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.
    AppId string

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

    NOTE: Function apps are not supported at this time.

    Branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    GithubActionConfiguration SourceControlGithubActionConfigurationArgs
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    RepoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    RollbackEnabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    ScmType string
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    UseLocalGit bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    UseManualIntegration bool
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    UseMercurial 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.
    appId String

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

    NOTE: Function apps are not supported at this time.

    branch String
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl String
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled Boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    scmType String
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    useLocalGit Boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration Boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial 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.
    appId string

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

    NOTE: Function apps are not supported at this time.

    branch string
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration SourceControlGithubActionConfiguration
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl string
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    scmType string
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    useLocalGit boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial 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.
    app_id str

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

    NOTE: Function apps are not supported at this time.

    branch str
    The branch name to use for deployments. Changing this forces a new resource to be created.
    github_action_configuration SourceControlGithubActionConfigurationArgs
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repo_url str
    The URL for the repository. Changing this forces a new resource to be created.
    rollback_enabled bool

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    scm_type str
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    use_local_git bool
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    use_manual_integration bool
    Should code be deployed manually. Set to false to enable 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 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.
    appId String

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

    NOTE: Function apps are not supported at this time.

    branch String
    The branch name to use for deployments. Changing this forces a new resource to be created.
    githubActionConfiguration Property Map
    A github_action_configuration block as defined below. Changing this forces a new resource to be created.
    repoUrl String
    The URL for the repository. Changing this forces a new resource to be created.
    rollbackEnabled Boolean

    Should the Deployment Rollback be enabled? Defaults to false. Changing this forces a new resource to be created.

    NOTE: Azure can typically set this value automatically based on the repo_url value.

    scmType String
    The SCM Type in use. This value is decoded by the service from the repository information supplied.
    useLocalGit Boolean
    Should the App use local Git configuration. Changing this forces a new resource to be created.
    useManualIntegration Boolean
    Should code be deployed manually. Set to false to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to false. Changing this forces a new resource to be created.
    useMercurial 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

    SourceControlGithubActionConfiguration, SourceControlGithubActionConfigurationArgs

    CodeConfiguration SourceControlGithubActionConfigurationCodeConfiguration
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    ContainerConfiguration SourceControlGithubActionConfigurationContainerConfiguration
    A container_configuration block as defined above.
    GenerateWorkflowFile bool
    Whether to generate the GitHub work flow file. Defaults to true. Changing this forces a new resource to be created.
    LinuxAction bool
    Denotes this action uses a Linux base image.
    CodeConfiguration SourceControlGithubActionConfigurationCodeConfiguration
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    ContainerConfiguration SourceControlGithubActionConfigurationContainerConfiguration
    A container_configuration block as defined above.
    GenerateWorkflowFile bool
    Whether to generate the GitHub work flow file. Defaults to true. Changing this forces a new resource to be created.
    LinuxAction bool
    Denotes this action uses a Linux base image.
    codeConfiguration SourceControlGithubActionConfigurationCodeConfiguration
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    containerConfiguration SourceControlGithubActionConfigurationContainerConfiguration
    A container_configuration block as defined above.
    generateWorkflowFile Boolean
    Whether to generate the GitHub work flow file. Defaults to true. Changing this forces a new resource to be created.
    linuxAction Boolean
    Denotes this action uses a Linux base image.
    codeConfiguration SourceControlGithubActionConfigurationCodeConfiguration
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    containerConfiguration SourceControlGithubActionConfigurationContainerConfiguration
    A container_configuration block as defined above.
    generateWorkflowFile boolean
    Whether to generate the GitHub work flow 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 SourceControlGithubActionConfigurationCodeConfiguration
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    container_configuration SourceControlGithubActionConfigurationContainerConfiguration
    A container_configuration block as defined above.
    generate_workflow_file bool
    Whether to generate the GitHub work flow 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 Property Map
    A code_configuration block as defined above. Changing this forces a new resource to be created.
    containerConfiguration Property Map
    A container_configuration block as defined above.
    generateWorkflowFile Boolean
    Whether to generate the GitHub work flow file. Defaults to true. Changing this forces a new resource to be created.
    linuxAction Boolean
    Denotes this action uses a Linux base image.

    SourceControlGithubActionConfigurationCodeConfiguration, SourceControlGithubActionConfigurationCodeConfigurationArgs

    RuntimeStack string
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    RuntimeVersion 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 string
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    RuntimeVersion 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 String
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    runtimeVersion 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 string
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    runtimeVersion 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 str
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    runtime_version 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 String
    The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are dotnetcore, spring, tomcat, node and python. Changing this forces a new resource to be created.
    runtimeVersion 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.

    SourceControlGithubActionConfigurationContainerConfiguration, SourceControlGithubActionConfigurationContainerConfigurationArgs

    ImageName string
    The image name for the build. Changing this forces a new resource to be created.
    RegistryUrl string
    The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
    RegistryPassword string
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    RegistryUsername string
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.
    ImageName string
    The image name for the build. Changing this forces a new resource to be created.
    RegistryUrl string
    The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
    RegistryPassword string
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    RegistryUsername string
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.
    imageName String
    The image name for the build. Changing this forces a new resource to be created.
    registryUrl String
    The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
    registryPassword String
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    registryUsername String
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.
    imageName string
    The image name for the build. Changing this forces a new resource to be created.
    registryUrl string
    The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
    registryPassword string
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    registryUsername string
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.
    image_name str
    The image name for the build. Changing this forces a new resource to be created.
    registry_url 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 str
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    registry_username str
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.
    imageName String
    The image name for the build. Changing this forces a new resource to be created.
    registryUrl String
    The server URL for the container registry where the build will be hosted. Changing this forces a new resource to be created.
    registryPassword String
    The password used to upload the image to the container registry. Changing this forces a new resource to be created.
    registryUsername String
    The username used to upload the image to the container registry. Changing this forces a new resource to be created.

    Import

    App Service Source Controls can be imported using the resource id, e.g.

    $ pulumi import azure:appservice/sourceControl:SourceControl example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi