Skip to content

Commit 7f92963

Browse files
modular-magicianEdward Sun
andauthored
Add descriptions to schema #1 (#3507) (#2077)
* add descriptions to the schema * add descriptions to schema * run go fmt Co-authored-by: Edward Sun <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Edward Sun <[email protected]>
1 parent dde1a7f commit 7f92963

File tree

2 files changed

+33
-20
lines changed

2 files changed

+33
-20
lines changed

.changelog/3507.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_bigtable_instance.go

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,28 @@ func resourceBigtableInstance() *schema.Resource {
4242
// ----------------------------------------------------------------------
4343
Schema: map[string]*schema.Schema{
4444
"name": {
45-
Type: schema.TypeString,
46-
Required: true,
47-
ForceNew: true,
45+
Type: schema.TypeString,
46+
Required: true,
47+
ForceNew: true,
48+
Description: `The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance.`,
4849
},
4950

5051
"cluster": {
51-
Type: schema.TypeList,
52-
Optional: true,
53-
Computed: true,
52+
Type: schema.TypeList,
53+
Optional: true,
54+
Computed: true,
55+
Description: `A block of cluster configuration options. This can be specified 1 or 2 times.`,
5456
Elem: &schema.Resource{
5557
Schema: map[string]*schema.Schema{
5658
"cluster_id": {
57-
Type: schema.TypeString,
58-
Required: true,
59+
Type: schema.TypeString,
60+
Required: true,
61+
Description: `The ID of the Cloud Bigtable cluster.`,
5962
},
6063
"zone": {
61-
Type: schema.TypeString,
62-
Required: true,
64+
Type: schema.TypeString,
65+
Required: true,
66+
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.`,
6367
},
6468
"num_nodes": {
6569
Type: schema.TypeInt,
@@ -68,40 +72,46 @@ func resourceBigtableInstance() *schema.Resource {
6872
// so mark as computed.
6973
Computed: true,
7074
ValidateFunc: validation.IntAtLeast(1),
75+
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.`,
7176
},
7277
"storage_type": {
7378
Type: schema.TypeString,
7479
Optional: true,
7580
Default: "SSD",
7681
ValidateFunc: validation.StringInSlice([]string{"SSD", "HDD"}, false),
82+
Description: `The storage type to use. One of "SSD" or "HDD". Defaults to "SSD".`,
7783
},
7884
},
7985
},
8086
},
8187
"display_name": {
82-
Type: schema.TypeString,
83-
Optional: true,
84-
Computed: true,
88+
Type: schema.TypeString,
89+
Optional: true,
90+
Computed: true,
91+
Description: `The human-readable display name of the Bigtable instance. Defaults to the instance name.`,
8592
},
8693

8794
"instance_type": {
8895
Type: schema.TypeString,
8996
Optional: true,
9097
Default: "PRODUCTION",
9198
ValidateFunc: validation.StringInSlice([]string{"DEVELOPMENT", "PRODUCTION"}, false),
99+
Description: `The instance type to create. One of "DEVELOPMENT" or "PRODUCTION". Defaults to "PRODUCTION".`,
92100
},
93101

94102
"deletion_protection": {
95-
Type: schema.TypeBool,
96-
Optional: true,
97-
Default: true,
103+
Type: schema.TypeBool,
104+
Optional: true,
105+
Default: true,
106+
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.`,
98107
},
99108

100109
"project": {
101-
Type: schema.TypeString,
102-
Optional: true,
103-
Computed: true,
104-
ForceNew: true,
110+
Type: schema.TypeString,
111+
Optional: true,
112+
Computed: true,
113+
ForceNew: true,
114+
Description: `The ID of the project in which the resource belongs. If it is not provided, the provider project is used.`,
105115
},
106116
},
107117
}

0 commit comments

Comments
 (0)