From 88eafdf7216e83154be539349b68f6074c7654ec Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Fri, 15 May 2020 23:33:45 +0000 Subject: [PATCH] Add descriptions to schema #1 (#3507) * add descriptions to the schema * add descriptions to schema * run go fmt Co-authored-by: Edward Sun Signed-off-by: Modular Magician --- .changelog/3507.txt | 3 ++ google/resource_bigtable_instance.go | 50 +++++++++++++++++----------- 2 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 .changelog/3507.txt diff --git a/.changelog/3507.txt b/.changelog/3507.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/3507.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_bigtable_instance.go b/google/resource_bigtable_instance.go index ece530e46b5..c1fb475e12a 100644 --- a/google/resource_bigtable_instance.go +++ b/google/resource_bigtable_instance.go @@ -42,24 +42,28 @@ func resourceBigtableInstance() *schema.Resource { // ---------------------------------------------------------------------- Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance.`, }, "cluster": { - Type: schema.TypeList, - Optional: true, - Computed: true, + Type: schema.TypeList, + Optional: true, + Computed: true, + Description: `A block of cluster configuration options. This can be specified 1 or 2 times.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cluster_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The ID of the Cloud Bigtable cluster.`, }, "zone": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `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.`, }, "num_nodes": { Type: schema.TypeInt, @@ -68,20 +72,23 @@ func resourceBigtableInstance() *schema.Resource { // so mark as computed. Computed: true, ValidateFunc: validation.IntAtLeast(1), + Description: `The number of nodes in your Cloud Bigtable cluster. Required, with a minimum of 1 for a PRODUCTION instance. Must be left unset for a DEVELOPMENT instance.`, }, "storage_type": { Type: schema.TypeString, Optional: true, Default: "SSD", ValidateFunc: validation.StringInSlice([]string{"SSD", "HDD"}, false), + Description: `The storage type to use. One of "SSD" or "HDD". Defaults to "SSD".`, }, }, }, }, "display_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: `The human-readable display name of the Bigtable instance. Defaults to the instance name.`, }, "instance_type": { @@ -89,19 +96,22 @@ func resourceBigtableInstance() *schema.Resource { Optional: true, Default: "PRODUCTION", ValidateFunc: validation.StringInSlice([]string{"DEVELOPMENT", "PRODUCTION"}, false), + Description: `The instance type to create. One of "DEVELOPMENT" or "PRODUCTION". Defaults to "PRODUCTION".`, }, "deletion_protection": { - Type: schema.TypeBool, - Optional: true, - Default: true, + Type: schema.TypeBool, + Optional: true, + Default: true, + Description: `Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply that would delete the instance will fail.`, }, "project": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + Description: `The ID of the project in which the resource belongs. If it is not provided, the provider project is used.`, }, }, }