Skip to content

Commit

Permalink
Add google_spanner_instance docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickithewatt committed Jul 30, 2017
1 parent d0243e5 commit 7ab852d
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
68 changes: 68 additions & 0 deletions website/docs/r/spanner_instance.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
layout: "google"
page_title: "Google: google_spanner_instance"
sidebar_current: "docs-google-spanner-instance"
description: |-
Creates and manages a Google Spanner Instance.
---

# google\_spanner\_instance

Creates and manages a Google Spanner Instance. For more information, see the [official documentation](https://cloud.google.com/spanner/), or the [JSON API](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances).

## Example Usage

Example creating a Spanner instance.

```hcl
resource "google_spanner_instance" "main" {
config = "regional-europe-west1"
display_name = "main-instance"
name = "main-instance"
num_nodes = 1
}
```

## Argument Reference

The following arguments are supported:

* `config` - (Required) The name of the instance's configuration (similar but not
quite the same as a region) which defines defines the geographic placement and
replication of your databases in this instance. It determines where your data
is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc.
In order to obtain a valid list please consult the
[Configuration section of the docs](https://cloud.google.com/spanner/docs/instances).

* `display_name` - (Required) The descriptive name for this instance as it appears
in UIs. Can be updated, however should be kept globally unique to avoid confusion.

- - -

* `name` - (Optional, Computed) The unique name (ID) of the instance. If the name is left
blank, Terraform will randomly generate one when the instance is first
created.

* `num_nodes` - (Optional, Computed) The number of nodes allocated to this instance.
Defaults to `1`. This can be updated after creation.

* `project` - (Optional) The project in which the resource belongs. If it
is not provided, the provider project is used.

## Attributes Reference

No additional attributes are computed other than those defined above.

## Import

Instances can be imported using their `name` and optionally
the `project` in which it is defined (Often used when the project is different
to that defined in the provider), The format is thus either `{instanceId}` or
`{projectId}/{instanceId}`. e.g.

```
$ terraform import google_spanner_instance.master instance123
$ terraform import google_spanner_instance.master project123/instance456
```
9 changes: 9 additions & 0 deletions website/google.erb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@
</ul>
</li>

<li<%= sidebar_current("docs-google-spanner") %>>
<a href="#">Google Spanner Resources</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-google-spanner-instance") %>>
<a href="/docs/providers/google/r/spanner_instance.html">google_spanner_instance</a>
</li>
</ul>
</li>

<li<%= sidebar_current("docs-google-sql") %>>
<a href="#">Google SQL Resources</a>
<ul class="nav nav-visible">
Expand Down

0 comments on commit 7ab852d

Please sign in to comment.