Skip to content

Commit

Permalink
Allow importing of projects
Browse files Browse the repository at this point in the history
Add an importer to the `bitbucket_project` resource.

Fixes hashicorp#68
  • Loading branch information
particleflux committed Sep 1, 2020
1 parent eabec0c commit 779cdef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bitbucket/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ func resourceProject() *schema.Resource {
Update: resourceProjectUpdate,
Read: resourceProjectRead,
Delete: resourceProjectDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},

Schema: map[string]*schema.Schema{
"key": {
Expand Down
10 changes: 9 additions & 1 deletion website/docs/r/project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@ The following arguments are supported:
* `name` - (Required) The name of the project
* `key` - (Required) The key used for this project
* `description` - (Optional) The description of the project
* `is_private` - (Optional) If you want to keep the project private - defaults to true
* `is_private` - (Optional) If you want to keep the project private - defaults to true

## Import

Projects can be imported using their `owner/name` ID, e.g.

```
$ terraform import bitbucket_project.my-repo my-account/my-repo
```

0 comments on commit 779cdef

Please sign in to comment.