From 03fc72ca04545d44b51aafea1fbbfa4357ebd57d Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Tue, 12 Nov 2019 11:05:29 -0800 Subject: [PATCH] Add descriptions to Terraform schema (#2643) Merged PR #2643. --- build/terraform | 2 +- build/terraform-beta | 2 +- products/compute/api.yaml | 14 +++++++------- templates/terraform/schema_property.erb | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build/terraform b/build/terraform index 1aaf578c3e7c..23dad53e9497 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 1aaf578c3e7c1d22582fe8e892e9cde5940e7bf1 +Subproject commit 23dad53e94979080200f104e4228ba550baeb253 diff --git a/build/terraform-beta b/build/terraform-beta index 858167e3bf28..43c722571b19 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 858167e3bf28e4f2fd111d8cb8b17521ef2156f7 +Subproject commit 43c722571b19043e6c77c6e8f46ee42418db9d47 diff --git a/products/compute/api.yaml b/products/compute/api.yaml index b2332989973c..b213d130787c 100644 --- a/products/compute/api.yaml +++ b/products/compute/api.yaml @@ -805,7 +805,7 @@ objects: - !ruby/object:Api::Type::NestedObject name: 'ttl' description: | - Liftime of the cookie. + Lifetime of the cookie. properties: - !ruby/object:Api::Type::Integer name: 'seconds' @@ -1471,7 +1471,7 @@ objects: - !ruby/object:Api::Type::NestedObject name: 'ttl' description: | - Liftime of the cookie. + Lifetime of the cookie. properties: - !ruby/object:Api::Type::Integer name: 'seconds' @@ -9167,11 +9167,11 @@ objects: - :ACTIVE - :BACKUP description: | - The role of subnetwork. Currenly, this field is only used - when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set - to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently - being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork - is one that is ready to be promoted to ACTIVE or is currently draining. + The role of subnetwork. Currently, this field is only used when + purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE + or BACKUP. An ACTIVE subnetwork is one that is currently being used + for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that + is ready to be promoted to ACTIVE or is currently draining. - !ruby/object:Api::Type::Array name: 'secondaryIpRanges' description: | diff --git a/templates/terraform/schema_property.erb b/templates/terraform/schema_property.erb index b4e6c13eff6e..cee3277b822e 100644 --- a/templates/terraform/schema_property.erb +++ b/templates/terraform/schema_property.erb @@ -64,6 +64,7 @@ <% unless property.state_func.nil? -%> StateFunc: <%= property.state_func %>, <% end -%> + Description: `<%= property.description.strip.gsub("`", "'") -%>`, <% if property.is_a?(Api::Type::NestedObject) -%> MaxItems: 1, Elem: &schema.Resource{