1. Packages
  2. Databricks
  3. API Docs
  4. Repo
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

databricks.Repo

Explore with Pulumi AI

databricks logo
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

    Import

    The resource can be imported using the Git folder ID (obtained via UI or using API)

    bash

    $ pulumi import databricks:index/repo:Repo this repo_id
    

    Create Repo Resource

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

    Constructor syntax

    new Repo(name: string, args: RepoArgs, opts?: CustomResourceOptions);
    @overload
    def Repo(resource_name: str,
             args: RepoArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Repo(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             url: Optional[str] = None,
             branch: Optional[str] = None,
             commit_hash: Optional[str] = None,
             git_provider: Optional[str] = None,
             path: Optional[str] = None,
             sparse_checkout: Optional[RepoSparseCheckoutArgs] = None,
             tag: Optional[str] = None)
    func NewRepo(ctx *Context, name string, args RepoArgs, opts ...ResourceOption) (*Repo, error)
    public Repo(string name, RepoArgs args, CustomResourceOptions? opts = null)
    public Repo(String name, RepoArgs args)
    public Repo(String name, RepoArgs args, CustomResourceOptions options)
    
    type: databricks:Repo
    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 RepoArgs
    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 RepoArgs
    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 RepoArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepoArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepoArgs
    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 repoResource = new Databricks.Repo("repoResource", new()
    {
        Url = "string",
        Branch = "string",
        CommitHash = "string",
        GitProvider = "string",
        Path = "string",
        SparseCheckout = new Databricks.Inputs.RepoSparseCheckoutArgs
        {
            Patterns = new[]
            {
                "string",
            },
        },
        Tag = "string",
    });
    
    example, err := databricks.NewRepo(ctx, "repoResource", &databricks.RepoArgs{
    	Url:         pulumi.String("string"),
    	Branch:      pulumi.String("string"),
    	CommitHash:  pulumi.String("string"),
    	GitProvider: pulumi.String("string"),
    	Path:        pulumi.String("string"),
    	SparseCheckout: &databricks.RepoSparseCheckoutArgs{
    		Patterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Tag: pulumi.String("string"),
    })
    
    var repoResource = new Repo("repoResource", RepoArgs.builder()
        .url("string")
        .branch("string")
        .commitHash("string")
        .gitProvider("string")
        .path("string")
        .sparseCheckout(RepoSparseCheckoutArgs.builder()
            .patterns("string")
            .build())
        .tag("string")
        .build());
    
    repo_resource = databricks.Repo("repoResource",
        url="string",
        branch="string",
        commit_hash="string",
        git_provider="string",
        path="string",
        sparse_checkout=databricks.RepoSparseCheckoutArgs(
            patterns=["string"],
        ),
        tag="string")
    
    const repoResource = new databricks.Repo("repoResource", {
        url: "string",
        branch: "string",
        commitHash: "string",
        gitProvider: "string",
        path: "string",
        sparseCheckout: {
            patterns: ["string"],
        },
        tag: "string",
    });
    
    type: databricks:Repo
    properties:
        branch: string
        commitHash: string
        gitProvider: string
        path: string
        sparseCheckout:
            patterns:
                - string
        tag: string
        url: string
    

    Repo 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 Repo resource accepts the following input properties:

    Url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    Branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    CommitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    GitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    Path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    SparseCheckout RepoSparseCheckout
    Tag string
    name of the tag for initial checkout. Conflicts with branch.
    Url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    Branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    CommitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    GitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    Path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    SparseCheckout RepoSparseCheckoutArgs
    Tag string
    name of the tag for initial checkout. Conflicts with branch.
    url String
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    branch String
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash String
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider String
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path String
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout RepoSparseCheckout
    tag String
    name of the tag for initial checkout. Conflicts with branch.
    url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout RepoSparseCheckout
    tag string
    name of the tag for initial checkout. Conflicts with branch.
    url str
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    branch str
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commit_hash str
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    git_provider str
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path str
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparse_checkout RepoSparseCheckoutArgs
    tag str
    name of the tag for initial checkout. Conflicts with branch.
    url String
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    branch String
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash String
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider String
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path String
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout Property Map
    tag String
    name of the tag for initial checkout. Conflicts with branch.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    Id string
    The provider-assigned unique ID for this managed resource.
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    The provider-assigned unique ID for this managed resource.
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    id string
    The provider-assigned unique ID for this managed resource.
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id str
    The provider-assigned unique ID for this managed resource.
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    The provider-assigned unique ID for this managed resource.
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    Look up Existing Repo Resource

    Get an existing Repo 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?: RepoState, opts?: CustomResourceOptions): Repo
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            branch: Optional[str] = None,
            commit_hash: Optional[str] = None,
            git_provider: Optional[str] = None,
            path: Optional[str] = None,
            sparse_checkout: Optional[RepoSparseCheckoutArgs] = None,
            tag: Optional[str] = None,
            url: Optional[str] = None,
            workspace_path: Optional[str] = None) -> Repo
    func GetRepo(ctx *Context, name string, id IDInput, state *RepoState, opts ...ResourceOption) (*Repo, error)
    public static Repo Get(string name, Input<string> id, RepoState? state, CustomResourceOptions? opts = null)
    public static Repo get(String name, Output<String> id, RepoState 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:
    Branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    CommitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    GitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    Path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    SparseCheckout RepoSparseCheckout
    Tag string
    name of the tag for initial checkout. Conflicts with branch.
    Url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    Branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    CommitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    GitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    Path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    SparseCheckout RepoSparseCheckoutArgs
    Tag string
    name of the tag for initial checkout. Conflicts with branch.
    Url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    branch String
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash String
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider String
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path String
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout RepoSparseCheckout
    tag String
    name of the tag for initial checkout. Conflicts with branch.
    url String
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    branch string
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash string
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider string
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path string
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout RepoSparseCheckout
    tag string
    name of the tag for initial checkout. Conflicts with branch.
    url string
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    branch str
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commit_hash str
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    git_provider str
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path str
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparse_checkout RepoSparseCheckoutArgs
    tag str
    name of the tag for initial checkout. Conflicts with branch.
    url str
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    branch String
    name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with tag. If branch is removed, and tag isn't specified, then the repository will stay at the previously checked out state.
    commitHash String
    Hash of the HEAD commit at time of the last executed operation. It won't change if you manually perform pull operation via UI or API
    gitProvider String
    case insensitive name of the Git provider. Following values are supported right now (could be a subject for a change, consult Repos API documentation): gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.
    path String
    path to put the checked out Git folder. If not specified, , then the Git folder will be created in the default location. If the value changes, Git folder is re-created.
    sparseCheckout Property Map
    tag String
    name of the tag for initial checkout. Conflicts with branch.
    url String
    The URL of the Git Repository to clone from. If the value changes, Git folder is re-created.
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    Supporting Types

    RepoSparseCheckout, RepoSparseCheckoutArgs

    Patterns List<string>

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    Patterns []string

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    patterns List<String>

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    patterns string[]

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    patterns Sequence[str]

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    patterns List<String>

    array of paths (directories) that will be used for sparse checkout. List of patterns could be updated in-place.

    Addition or removal of the sparse_checkout configuration block will lead to recreation of the Git folder.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi