Skip to content

Commit

Permalink
Merge cec6511 into b1782c9
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Nov 5, 2018
2 parents b1782c9 + cec6511 commit 5ef7fb8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions provider/terraform/resources/resource_bigtable_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ func resourceBigtableInstance() *schema.Resource {
Required: true,
},
"num_nodes": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Optional: true,
ValidateFunc: validation.IntAtLeast(3),
},
"storage_type": {
Type: schema.TypeString,
Expand Down
22 changes: 19 additions & 3 deletions provider/terraform/website/docs/r/bigtable_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Creates a Google Bigtable instance. For more information see
[API](https://cloud.google.com/bigtable/docs/go/reference).


## Example Usage
## Example Usage - Production Instance

```hcl
resource "google_bigtable_instance" "instance" {
resource "google_bigtable_instance" "production-instance" {
name = "tf-instance"
cluster {
cluster_id = "tf-instance-cluster"
zone = "us-central1-b"
Expand All @@ -27,6 +28,21 @@ resource "google_bigtable_instance" "instance" {
}
```

## Example Usage - Development Instance

```hcl
resource "google_bigtable_instance" "development-instance" {
name = "tf-instance"
instance_type = "DEVELOPMENT"
cluster {
cluster_id = "tf-instance-cluster"
zone = "us-central1-b"
storage_type = "HDD"
}
}
```

## Argument Reference

The following arguments are supported:
Expand All @@ -53,7 +69,7 @@ The `cluster` block supports the following arguments:

* `zone` - (Required) The zone to create the Cloud Bigtable cluster in. Each cluster must have a different zone in the same region. Zones that support Bigtable instances are noted on the [Cloud Bigtable locations page](https://cloud.google.com/bigtable/docs/locations).

* `num_nodes` - (Optional) The number of nodes in your Cloud Bigtable cluster. Required, with a minimum of `3` for a `PRODUCTION` instance. Cannot be set for a `DEVELOPMENT` instance.
* `num_nodes` - (Optional) The number of nodes in your Cloud Bigtable cluster. Required, with a minimum of `3` for a `PRODUCTION` instance. Must be left unset for a `DEVELOPMENT` instance.

* `storage_type` - (Optional) The storage type to use. One of `"SSD"` or `"HDD"`. Defaults to `"SSD"`.

Expand Down

0 comments on commit 5ef7fb8

Please sign in to comment.