Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions website/docs/r/repository.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ resource "github_repository" "example" {
}
```

## Example Usage with Repository Forking

```hcl
resource "github_repository" "forked_repo" {
name = "forked-repository"
description = "This is a fork of another repository"
fork = true
source_owner = "some-org"
source_repo = "original-repository"
}
```

## Argument Reference

The following arguments are supported:
Expand All @@ -57,6 +69,12 @@ The following arguments are supported:

* `homepage_url` - (Optional) URL of a page describing the project.

* `fork` - (Optional) Set to `true` to create a fork of an existing repository. When set to `true`, both `source_owner` and `source_repo` must also be specified.

* `source_owner` - (Optional) The GitHub username or organization that owns the repository being forked. Required when `fork` is `true`.

* `source_repo` - (Optional) The name of the repository to fork. Required when `fork` is `true`.

* `private` - (Optional) Set to `true` to create a private repository.
Repositories are created as public (e.g. open source) by default.

Expand Down