mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-19 07:53:48 +01:00
Added forking for repository resources to allow creation of repo from a fork
This commit is contained in:
@@ -15,17 +15,20 @@ resource "bitbucketserver_repository" "test" {
|
||||
}
|
||||
```
|
||||
|
||||
###### if you want to fork an existing repository in the same project
|
||||
### Forking an existing repository
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository" "test" {
|
||||
project = "MYPROJ"
|
||||
name = "test-01"
|
||||
description = "Test repository"
|
||||
origin_slug_to_fork = "MYOLDPROJ"
|
||||
project = "MYPROJ"
|
||||
name = "test-01"
|
||||
description = "Test repository"
|
||||
fork_repository_project = "MY-ORIGIN-PROJ"
|
||||
fork_repository_slug = "MY-ORIGIN-REPO"
|
||||
}
|
||||
```
|
||||
|
||||
> Note: Both `fork_repositiroy_project` and `fork_repository_slug` are required to specified the origin repository to fork.
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Name of the project to create the repository in.
|
||||
@@ -35,7 +38,9 @@ resource "bitbucketserver_repository" "test" {
|
||||
* `forkable` - Optional. Enable/disable forks of this repository. Default `true`
|
||||
* `public` - Optional. Determine if this repository is public. Default `false`
|
||||
* `enable_git_lfs` - Optional. Enable git-lfs for this repository. Default `false`
|
||||
* `origin_slug_to_fork` - Optional. Use this to fork an expisting repository in the same project. Default `false`
|
||||
* `fork_repository_project` - Optional. Use this to fork an existing repository from the given project.
|
||||
* `fork_repository_slug` - Optional. Use this to fork an existing repository from the given repository.
|
||||
|
||||
## Attribute Reference
|
||||
|
||||
Additional to the above, the following attributes are emitted:
|
||||
|
||||
Reference in New Issue
Block a user