published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Import
The resource Repo can be imported using the Repo 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,
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)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",
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"),
Tag: pulumi.String("string"),
})
var repoResource = new Repo("repoResource", RepoArgs.builder()
.url("string")
.branch("string")
.commitHash("string")
.gitProvider("string")
.path("string")
.tag("string")
.build());
repo_resource = databricks.Repo("repoResource",
url="string",
branch="string",
commit_hash="string",
git_provider="string",
path="string",
tag="string")
const repoResource = new databricks.Repo("repoResource", {
url: "string",
branch: "string",
commitHash: "string",
gitProvider: "string",
path: "string",
tag: "string",
});
type: databricks:Repo
properties:
branch: string
commitHash: string
gitProvider: string
path: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Repo resource accepts the following input properties:
- Url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - Commit
Hash 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
- Git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - Path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - Tag string
- name of the tag for initial checkout. Conflicts with
branch
- Url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - Commit
Hash 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
- Git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - Path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - Tag string
- name of the tag for initial checkout. Conflicts with
branch
- url String
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider String - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path String
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag String
- name of the tag for initial checkout. Conflicts with
branch
- url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag string
- name of the tag for initial checkout. Conflicts with
branch
- url str
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn'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 (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path str
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag str
- name of the tag for initial checkout. Conflicts with
branch
- url String
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider String - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path String
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
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,
tag: Optional[str] = None,
url: Optional[str] = None) -> Repofunc 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)resources: _: type: databricks:Repo get: id: ${id}- 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.
- Branch string
- name of the branch for initial checkout. If not specified, the default branch of the repository will be used. Conflicts with
tag. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - Commit
Hash 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
- Git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - Path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - Tag string
- name of the tag for initial checkout. Conflicts with
branch - Url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - Commit
Hash 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
- Git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - Path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - Tag string
- name of the tag for initial checkout. Conflicts with
branch - Url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider String - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path String
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag String
- name of the tag for initial checkout. Conflicts with
branch - url String
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider string - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path string
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag string
- name of the tag for initial checkout. Conflicts with
branch - url string
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn'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 (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path str
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag str
- name of the tag for initial checkout. Conflicts with
branch - url str
- The URL of the Git Repository to clone from. If value changes, repo 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. Ifbranchis removed, andtagisn't specified, then the repository will stay at the previously checked out state. - commit
Hash 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
- git
Provider String - case insensitive name of the Git provider. Following values are supported right now (maybe a subject for change, consult Repos API documentation):
gitHub,gitHubEnterprise,bitbucketCloud,bitbucketServer,azureDevOpsServices,gitLab,gitLabEnterpriseEdition - path String
- path to put the checked out Repo. If not specified, then repo will be created in the user's repo directory (
/Repos/<username>/...). If value changes, repo is re-created - tag String
- name of the tag for initial checkout. Conflicts with
branch - url String
- The URL of the Git Repository to clone from. If value changes, repo is re-created
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
