2017-08-03 22:00:34 +00:00
|
|
|
---
|
2019-01-04 00:53:43 +00:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# This file is automatically generated by Magic Modules and manual
|
|
|
|
# changes will be clobbered when the file is regenerated.
|
|
|
|
#
|
|
|
|
# Please read more about how to change this file in
|
|
|
|
# .github/CONTRIBUTING.md.
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
2017-08-03 22:00:34 +00:00
|
|
|
layout: "google"
|
|
|
|
page_title: "Google: google_sourcerepo_repository"
|
2019-01-04 00:53:43 +00:00
|
|
|
sidebar_current: "docs-google-sourcerepo-repository"
|
2017-08-03 22:00:34 +00:00
|
|
|
description: |-
|
2019-01-04 00:53:43 +00:00
|
|
|
A repository (or repo) is a Git repository storing versioned source content.
|
2017-08-03 22:00:34 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# google\_sourcerepo\_repository
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
A repository (or repo) is a Git repository storing versioned source content.
|
2017-08-03 22:00:34 +00:00
|
|
|
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
To get more information about Repository, see:
|
|
|
|
|
|
|
|
* [API documentation](https://cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos)
|
|
|
|
* How-to Guides
|
|
|
|
* [Official Documentation](https://cloud.google.com/source-repositories/)
|
|
|
|
|
|
|
|
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
|
|
|
|
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=sourcerepo_repository_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
|
|
|
|
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
## Example Usage - Sourcerepo Repository Basic
|
|
|
|
|
2017-08-03 22:00:34 +00:00
|
|
|
|
|
|
|
```hcl
|
2019-01-04 00:53:43 +00:00
|
|
|
resource "google_sourcerepo_repository" "my-repo" {
|
|
|
|
name = "my-repository"
|
2017-08-03 22:00:34 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
|
|
|
|
* `name` -
|
|
|
|
(Required)
|
|
|
|
Resource name of the repository, of the form `{{repo}}`.
|
|
|
|
The repo name may contain slashes. eg, `name/with/slash`
|
|
|
|
|
2017-08-03 22:00:34 +00:00
|
|
|
|
|
|
|
- - -
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
* `project` - (Optional) The ID of the project in which the resource belongs.
|
|
|
|
If it is not provided, the provider project is used.
|
|
|
|
|
2017-08-03 22:00:34 +00:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
In addition to the arguments listed above, the following computed attributes are exported:
|
|
|
|
|
2017-08-03 22:00:34 +00:00
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
* `url` -
|
|
|
|
URL to clone the repository from Google Cloud Source Repositories.
|
|
|
|
|
|
|
|
* `size` -
|
|
|
|
The disk usage of the repo, in bytes.
|
|
|
|
|
|
|
|
|
|
|
|
## Timeouts
|
|
|
|
|
|
|
|
This resource provides the following
|
|
|
|
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
|
|
|
|
|
|
|
|
- `create` - Default is 4 minutes.
|
|
|
|
- `delete` - Default is 4 minutes.
|
2019-01-03 00:52:31 +00:00
|
|
|
|
|
|
|
## Import
|
|
|
|
|
2019-01-04 00:53:43 +00:00
|
|
|
Repository can be imported using any of these accepted formats:
|
2019-01-03 00:52:31 +00:00
|
|
|
|
|
|
|
```
|
2019-01-03 21:12:01 +00:00
|
|
|
$ terraform import google_sourcerepo_repository.default projects/{{project}}/repos/{{name}}
|
|
|
|
$ terraform import google_sourcerepo_repository.default {{project}}/{{name}}
|
2019-01-03 00:52:31 +00:00
|
|
|
$ terraform import google_sourcerepo_repository.default {{name}}
|
|
|
|
```
|
2019-01-04 00:53:43 +00:00
|
|
|
|
|
|
|
-> If you're importing a resource with beta features, make sure to include `-provider=google-beta`
|
|
|
|
as an argument so that Terraform uses the correct provider to import your resource.
|