Skip to content

Commit

Permalink
google/resource_source_repos_repository: Export repository url (#943)
Browse files Browse the repository at this point in the history
* google/resource_source_repos_repository: Export repository url

* website/docs/r/sourcerepo_repository: Update official documentation link
  • Loading branch information
vishen authored and rosbo committed Jan 10, 2018
1 parent ddd9ceb commit e3b6e3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions google/resource_source_repos_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package google

import (
"fmt"

"github.com/hashicorp/terraform/helper/schema"
"google.golang.org/api/sourcerepo/v1"
)
Expand Down Expand Up @@ -31,6 +32,11 @@ func resourceSourceRepoRepository() *schema.Resource {
Type: schema.TypeInt,
Computed: true,
},

"url": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -80,6 +86,7 @@ func resourceSourceRepoRepositoryRead(d *schema.ResourceData, meta interface{})

d.Set("size", repo.Size)
d.Set("project", project)
d.Set("url", repo.Url)

return nil
}
Expand Down
5 changes: 3 additions & 2 deletions website/docs/r/sourcerepo_repository.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# google\_sourcerepo\_repository

For more information, see [the official
documentation](https://cloud.google.com/compute/docs/source-repositories) and
documentation](https://cloud.google.com/source-repositories/) and
[API](https://cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos)

## Example Usage
Expand All @@ -35,6 +35,7 @@ The following arguments are supported:

## Attributes Reference

The following attribute is exported:
The following attributes are exported:

* `size` - The size of the repository.
* `url` - The url to clone the repository.

0 comments on commit e3b6e3e

Please sign in to comment.