provider/github: Add github importability documentation (#15150)

Fixes: #15120
This commit is contained in:
Paul Stack 2017-06-07 14:36:35 +03:00 committed by GitHub
parent bc85755c1b
commit 4e1eb9a856
8 changed files with 70 additions and 0 deletions

View File

@ -140,6 +140,17 @@ To make a resource importable, please see the
* fastly_service_v1
### Github
* github_branch_protection
* github_issue_label
* github_membership
* github_repository
* github_repository_collaborator
* github_team
* github_team_membership
* github_team_repository
### Google
* google_bigquery_dataset

View File

@ -70,3 +70,11 @@ The following arguments are supported:
* `teams`: (Optional) The list of team slugs with push access.
`restrictions` is only available for organization-owned repositories.
## Import
Github Branch Protection can be imported using an id made up of `repository:branch`, e.g.
```
$ terraform import github_branch_protection.terraform terraform:master
```

View File

@ -41,3 +41,11 @@ The following arguments are supported:
* `name` - (Required) The name of the label.
* `color` - (Required) A 6 character hex code, **without the leading #**, identifying the color of the label.
## Import
Github Issue Labels can be imported using an id made up of `repository:name`, e.g.
```
$ terraform import github_issue_label.panic_label terraform:panic
```

View File

@ -31,3 +31,12 @@ The following arguments are supported:
* `username` - (Required) The user to add to the organization.
* `role` - (Optional) The role of the user within the organization.
Must be one of `member` or `admin`. Defaults to `member`.
## Import
Github Membership can be imported using an id made up of `organization:username`, e.g.
```
$ terraform import github_membership.member hashicorp:someuser
```

View File

@ -43,3 +43,12 @@ The following arguments are supported:
* `username` - (Required) The user to add to the repository as a collaborator.
* `permission` - (Optional) The permission of the outside collaborator for the repository.
Must be one of `pull`, `push`, or `admin`. Defaults to `push`.
## Import
Github Repository Collaborators can be imported using an id made up of `repository:username`, e.g.
```
$ terraform import github_repository_collaborator.collaborator terraform:someuser
```

View File

@ -38,3 +38,11 @@ The following arguments are supported:
The following attributes are exported:
* `id` - The ID of the created team.
## Import
Github Teams can be imported using the github team Id e.g.
```
$ terraform import github_team.core 1234567
```

View File

@ -44,3 +44,11 @@ The following arguments are supported:
* `username` - (Required) The user to add to the team.
* `role` - (Optional) The role of the user within the team.
Must be one of `member` or `maintainer`. Defaults to `member`.
## Import
Github Team Membership can be imported using an id made up of `teamid:username`, e.g.
```
$ terraform import github_team_membership.member 1234567:someuser
```

View File

@ -46,3 +46,12 @@ The following arguments are supported:
* `repository` - (Required) The repository to add to the team.
* `permission` - (Optional) The permissions of team members regarding the repository.
Must be one of `pull`, `push`, or `admin`. Defaults to `pull`.
## Import
Github Team Membership can be imported using an id made up of `teamid:repository`, e.g.
```
$ terraform import github_team_repository.terraform_repo 1234567:terraform
```