From fa3480e42e9f2274115a71e6808387a50913caf9 Mon Sep 17 00:00:00 2001 From: Edward Sun <42220489+edwardmedia@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:30:30 -0700 Subject: [PATCH] add desc to schema for 3 compute resources (#3680) Co-authored-by: Edward Sun --- ...resource_compute_instance_from_template.go | 7 ++++--- ...ce_compute_project_default_network_tier.go | 10 +++++---- .../resource_compute_project_metadata_item.go | 21 +++++++++++-------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/third_party/terraform/resources/resource_compute_instance_from_template.go b/third_party/terraform/resources/resource_compute_instance_from_template.go index 7c382e726657..373942ef4eaf 100644 --- a/third_party/terraform/resources/resource_compute_instance_from_template.go +++ b/third_party/terraform/resources/resource_compute_instance_from_template.go @@ -68,9 +68,10 @@ func computeInstanceFromTemplateSchema() map[string]*schema.Schema { }) s["source_instance_template"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Name or self link of an instance template to create the instance based on.`, } return s diff --git a/third_party/terraform/resources/resource_compute_project_default_network_tier.go b/third_party/terraform/resources/resource_compute_project_default_network_tier.go index 1224d0dafa97..97252ef67ab9 100644 --- a/third_party/terraform/resources/resource_compute_project_default_network_tier.go +++ b/third_party/terraform/resources/resource_compute_project_default_network_tier.go @@ -31,14 +31,16 @@ func resourceComputeProjectDefaultNetworkTier() *schema.Resource { "network_tier": { Type: schema.TypeString, Required: true, + Description: `The default network tier to be configured for the project. This field can take the following values: PREMIUM or STANDARD.`, ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD"}, false), }, "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.`, }, }, } diff --git a/third_party/terraform/resources/resource_compute_project_metadata_item.go b/third_party/terraform/resources/resource_compute_project_metadata_item.go index 95e4c8f93459..7564871a8f43 100644 --- a/third_party/terraform/resources/resource_compute_project_metadata_item.go +++ b/third_party/terraform/resources/resource_compute_project_metadata_item.go @@ -28,19 +28,22 @@ func resourceComputeProjectMetadataItem() *schema.Resource { Schema: map[string]*schema.Schema{ "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The metadata key to set.`, }, "value": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The value to set for the given metadata key.`, }, "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.`, }, },