Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Allow importing of projects #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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-project
```