diff --git a/google/resource_access_context_manager_access_level.go b/google/resource_access_context_manager_access_level.go index d601df253b1..a8ed9552219 100644 --- a/google/resource_access_context_manager_access_level.go +++ b/google/resource_access_context_manager_access_level.go @@ -47,37 +47,50 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Resource name for the Access Level. The short_name component must begin +with a letter and only include alphanumeric and '_'. +Format: accessPolicies/{policy_id}/accessLevels/{short_name}`, }, "parent": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The AccessPolicy this AccessLevel lives in. +Format: accessPolicies/{policy_id}`, }, "title": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Human readable title. Must be unique within the Policy.`, }, "basic": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `A set of predefined conditions for the access level and a combining function.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "conditions": { - Type: schema.TypeList, - Required: true, - MinItems: 1, + Type: schema.TypeList, + Required: true, + Description: `A set of requirements for the AccessLevel to be granted.`, + MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "device_policy": { Type: schema.TypeList, Optional: true, + Description: `Device specific restrictions, all restrictions must hold for +the Condition to be true. If not specified, all devices are +allowed.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "allowed_device_management_levels": { Type: schema.TypeList, Optional: true, + Description: `A list of allowed device management levels. +An empty list allows all management levels.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -85,6 +98,8 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "allowed_encryption_statuses": { Type: schema.TypeList, Optional: true, + Description: `A list of allowed encryptions statuses. +An empty list allows all statuses.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -92,16 +107,22 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "os_constraints": { Type: schema.TypeList, Optional: true, + Description: `A list of allowed OS versions. +An empty list allows all types and all versions.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "minimum_version": { Type: schema.TypeString, Optional: true, + Description: `The minimum allowed OS version. If not set, any version +of this OS satisfies the constraint. +Format: "major.minor.patch" such as "10.5.301", "9.2.1".`, }, "os_type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"OS_UNSPECIFIED", "DESKTOP_MAC", "DESKTOP_WINDOWS", "DESKTOP_LINUX", "DESKTOP_CHROME_OS", ""}, false), + Description: `The operating system type of the device.`, }, }, }, @@ -109,6 +130,8 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "require_screen_lock": { Type: schema.TypeBool, Optional: true, + Description: `Whether or not screenlock is required for the DevicePolicy +to be true. Defaults to false.`, }, }, }, @@ -116,6 +139,16 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "ip_subnetworks": { Type: schema.TypeList, Optional: true, + Description: `A list of CIDR block IP subnetwork specification. May be IPv4 +or IPv6. +Note that for a CIDR IP address block, the specified IP address +portion must be properly truncated (i.e. all the host bits must +be zero) or the input is considered malformed. For example, +"192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, +for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" +is not. The originating IP of a request must be in one of the +listed subnets in order for this Condition to be true. +If empty, all IP addresses are allowed.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -123,6 +156,12 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "members": { Type: schema.TypeList, Optional: true, + Description: `An allowed list of members (users, groups, service accounts). +The signed-in user originating the request must be a part of one +of the provided members. If not specified, a request may come +from any user (logged in/not logged in, not present in any +groups, etc.). +Formats: 'user:{emailid}', 'group:{emailid}', 'serviceAccount:{emailid}'`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -130,10 +169,18 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { "negate": { Type: schema.TypeBool, Optional: true, + Description: `Whether to negate the Condition. If true, the Condition becomes +a NAND over its non-empty fields, each field must be false for +the Condition overall to be satisfied. Defaults to false.`, }, "required_access_levels": { Type: schema.TypeList, Optional: true, + Description: `A list of other access levels defined in the same Policy, +referenced by resource name. Referencing an AccessLevel which +does not exist is an error. All access levels listed must be +granted for the Condition to be true. +Format: accessPolicies/{policy_id}/accessLevels/{short_name}`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -145,14 +192,20 @@ func resourceAccessContextManagerAccessLevel() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"AND", "OR", ""}, false), - Default: "AND", + Description: `How the conditions list should be combined to determine if a request +is granted this AccessLevel. If AND is used, each Condition in +conditions must be satisfied for the AccessLevel to be applied. If +OR is used, at least one Condition in conditions must be satisfied +for the AccessLevel to be applied. Defaults to AND if unspecified.`, + Default: "AND", }, }, }, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Description of the AccessLevel and its use. Does not affect behavior.`, }, }, } diff --git a/google/resource_access_context_manager_access_policy.go b/google/resource_access_context_manager_access_policy.go index 368a66af0f9..e3a5f339abe 100644 --- a/google/resource_access_context_manager_access_policy.go +++ b/google/resource_access_context_manager_access_policy.go @@ -46,22 +46,28 @@ func resourceAccessContextManagerAccessPolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The parent of this AccessPolicy in the Cloud Resource Hierarchy. +Format: organizations/{organization_id}`, }, "title": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Human readable title. Does not affect behavior.`, }, "create_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time the AccessPolicy was created in UTC.`, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Resource name of the AccessPolicy. Format: {policy_id}`, }, "update_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time the AccessPolicy was updated in UTC.`, }, }, } diff --git a/google/resource_access_context_manager_service_perimeter.go b/google/resource_access_context_manager_service_perimeter.go index 27c0b4978f9..f0ce2aea5fb 100644 --- a/google/resource_access_context_manager_service_perimeter.go +++ b/google/resource_access_context_manager_service_perimeter.go @@ -47,36 +47,73 @@ func resourceAccessContextManagerServicePerimeter() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Resource name for the ServicePerimeter. The short_name component must +begin with a letter and only include alphanumeric and '_'. +Format: accessPolicies/{policy_id}/servicePerimeters/{short_name}`, }, "parent": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The AccessPolicy this ServicePerimeter lives in. +Format: accessPolicies/{policy_id}`, }, "title": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Human readable title. Must be unique within the Policy.`, }, "description": { Type: schema.TypeString, Optional: true, + Description: `Description of the ServicePerimeter and its use. Does not affect +behavior.`, }, "perimeter_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"PERIMETER_TYPE_REGULAR", "PERIMETER_TYPE_BRIDGE", ""}, false), - Default: "PERIMETER_TYPE_REGULAR", + Description: `Specifies the type of the Perimeter. There are two types: regular and +bridge. Regular Service Perimeter contains resources, access levels, +and restricted services. Every resource can be in at most +ONE regular Service Perimeter. + +In addition to being in a regular service perimeter, a resource can also +be in zero or more perimeter bridges. A perimeter bridge only contains +resources. Cross project operations are permitted if all effected +resources share some perimeter (whether bridge or regular). Perimeter +Bridge does not contain access levels or services: those are governed +entirely by the regular perimeter that resource is in. + +Perimeter Bridges are typically useful when building more complex +topologies with many independent perimeters that need to share some data +with a common perimeter, but should not be able to share data among +themselves.`, + Default: "PERIMETER_TYPE_REGULAR", }, "status": { Type: schema.TypeList, Optional: true, + Description: `ServicePerimeter configuration. Specifies sets of resources, +restricted services and access levels that determine +perimeter content and boundaries.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "access_levels": { Type: schema.TypeList, Optional: true, + Description: `A list of AccessLevel resource names that allow resources within +the ServicePerimeter to be accessed from the internet. +AccessLevels listed must be in the same policy as this +ServicePerimeter. Referencing a nonexistent AccessLevel is a +syntax error. If no AccessLevel names are listed, resources within +the perimeter can only be accessed via GCP calls with request +origins within the perimeter. For Service Perimeter Bridge, must +be empty. + +Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -84,6 +121,9 @@ func resourceAccessContextManagerServicePerimeter() *schema.Resource { "resources": { Type: schema.TypeList, Optional: true, + Description: `A list of GCP resources that are inside of the service perimeter. +Currently only projects are allowed. +Format: projects/{project_number}`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -91,6 +131,11 @@ func resourceAccessContextManagerServicePerimeter() *schema.Resource { "restricted_services": { Type: schema.TypeList, Optional: true, + Description: `GCP services that are subject to the Service Perimeter +restrictions. Must contain a list of services. For example, if +'storage.googleapis.com' is specified, access to the storage +buckets inside the perimeter must meet the perimeter's access +restrictions.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -99,12 +144,14 @@ func resourceAccessContextManagerServicePerimeter() *schema.Resource { }, }, "create_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time the AccessPolicy was created in UTC.`, }, "update_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time the AccessPolicy was updated in UTC.`, }, }, } diff --git a/google/resource_app_engine_application_url_dispatch_rules.go b/google/resource_app_engine_application_url_dispatch_rules.go index da0943a6086..23894454028 100644 --- a/google/resource_app_engine_application_url_dispatch_rules.go +++ b/google/resource_app_engine_application_url_dispatch_rules.go @@ -43,22 +43,29 @@ func resourceAppEngineApplicationUrlDispatchRules() *schema.Resource { Schema: map[string]*schema.Schema{ "dispatch_rules": { - Type: schema.TypeList, - Required: true, + Type: schema.TypeList, + Required: true, + Description: `Rules to match an HTTP request and dispatch that request to a service.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "path": { Type: schema.TypeString, Required: true, + Description: `Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. +The sum of the lengths of the domain and path may not exceed 100 characters.`, }, "service": { Type: schema.TypeString, Required: true, + Description: `Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. +The sum of the lengths of the domain and path may not exceed 100 characters.`, }, "domain": { Type: schema.TypeString, Optional: true, - Default: "*", + Description: `Domain name to match against. The wildcard "*" is supported if specified before a period: "*.". +Defaults to matching all domains: "*".`, + Default: "*", }, }, }, diff --git a/google/resource_app_engine_domain_mapping.go b/google/resource_app_engine_domain_mapping.go index 633489a5569..052c466e076 100644 --- a/google/resource_app_engine_domain_mapping.go +++ b/google/resource_app_engine_domain_mapping.go @@ -59,20 +59,24 @@ func resourceAppEngineDomainMapping() *schema.Resource { Schema: map[string]*schema.Schema{ "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Relative name of the domain serving the application. Example: example.com.`, }, "override_strategy": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"STRICT", "OVERRIDE", ""}, false), - Default: "STRICT", + Description: `Whether the domain creation should override any existing mappings for this domain. +By default, overrides are rejected.`, + Default: "STRICT", }, "ssl_settings": { Type: schema.TypeList, Optional: true, DiffSuppressFunc: sslSettingsDiffSuppress, + Description: `SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -80,40 +84,59 @@ func resourceAppEngineDomainMapping() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, + Description: `ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will +remove SSL support. +By default, a managed certificate is automatically created for every domain mapping. To omit SSL support +or to configure SSL manually, specify 'SslManagementType.MANUAL' on a 'CREATE' or 'UPDATE' request. You must be +authorized to administer the 'AuthorizedCertificate' resource to manually map it to a DomainMapping resource. +Example: 12345.`, }, "ssl_management_type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"AUTOMATIC", "MANUAL", ""}, false), + Description: `SSL management type for this domain. If 'AUTOMATIC', a managed certificate is automatically provisioned. +If 'MANUAL', 'certificateId' must be manually specified in order to configure SSL for this domain.`, }, "pending_managed_certificate_id": { Type: schema.TypeString, Computed: true, + Description: `ID of the managed 'AuthorizedCertificate' resource currently being provisioned, if applicable. Until the new +managed certificate has been successfully provisioned, the previous SSL state will be preserved. Once the +provisioning process completes, the 'certificateId' field will reflect the new managed certificate and this +field will be left empty. To remove SSL support while there is still a pending managed certificate, clear the +'certificateId' field with an update request.`, }, }, }, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.`, }, "resource_records": { Type: schema.TypeList, Computed: true, + Description: `The resource records required to configure this domain mapping. These records must be added to the domain's DNS +configuration in order to serve the application via this domain mapping.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.`, }, "rrdata": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).`, }, "type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"A", "AAAA", "CNAME", ""}, false), + Description: `Resource record type. Example: 'AAAA'.`, }, }, }, diff --git a/google/resource_app_engine_firewall_rule.go b/google/resource_app_engine_firewall_rule.go index ee8cb55f406..c3791e21546 100644 --- a/google/resource_app_engine_firewall_rule.go +++ b/google/resource_app_engine_firewall_rule.go @@ -48,18 +48,27 @@ func resourceAppEngineFirewallRule() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"UNSPECIFIED_ACTION", "ALLOW", "DENY"}, false), + Description: `The action to take if this rule matches.`, }, "source_range": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `IP address or range, defined using CIDR notation, of requests that this rule applies to.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional string description of this rule.`, }, "priority": { Type: schema.TypeInt, Optional: true, + Description: `A positive integer that defines the order of rule evaluation. +Rules with the lowest priority are evaluated first. + +A default rule at priority Int32.MaxValue matches all IPv4 and +IPv6 traffic when no previous rule matches. Only the action of +this rule can be modified by the user.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_app_engine_standard_app_version.go b/google/resource_app_engine_standard_app_version.go index 4ae86d12d61..46d854402b2 100644 --- a/google/resource_app_engine_standard_app_version.go +++ b/google/resource_app_engine_standard_app_version.go @@ -44,18 +44,22 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { Schema: map[string]*schema.Schema{ "runtime": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Desired runtime. Example python27.`, }, "deployment": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Code and application artifacts that make up this version.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "files": { Type: schema.TypeSet, Optional: true, + Description: `Manifest of the files stored in Google Cloud Storage that are included as part of this version. +All files must be readable using the credentials supplied with this call.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { @@ -63,29 +67,34 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { Required: true, }, "sha1_sum": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `SHA1 checksum of the file`, }, "source_url": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Source URL`, }, }, }, }, "zip": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Zip File`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "files_count": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `files count`, }, "source_url": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Source URL`, }, }, }, @@ -94,52 +103,63 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { }, }, "entrypoint": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `The entrypoint for the application.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "shell": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The format should be a shell command that can be fed to bash -c.`, }, }, }, }, "env_variables": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Environment variables available to the application.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "handlers": { Type: schema.TypeList, Optional: true, + Description: `An ordered list of URL-matching patterns that should be applied to incoming requests. +The first matching URL handles the request and other request handlers are not attempted.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auth_fail_action": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"AUTH_FAIL_ACTION_UNSPECIFIED", "AUTH_FAIL_ACTION_REDIRECT", "AUTH_FAIL_ACTION_UNAUTHORIZED", ""}, false), + Description: `Actions to take when the user is not logged in.`, }, "login": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"LOGIN_UNSPECIFIED", "LOGIN_OPTIONAL", "LOGIN_ADMIN", "LOGIN_REQUIRED", ""}, false), + Description: `Methods to restrict access to a URL based on login status.`, }, "redirect_http_response_code": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", "REDIRECT_HTTP_RESPONSE_CODE_301", "REDIRECT_HTTP_RESPONSE_CODE_302", "REDIRECT_HTTP_RESPONSE_CODE_303", "REDIRECT_HTTP_RESPONSE_CODE_307", ""}, false), + Description: `Redirect codes.`, }, "script": { Type: schema.TypeList, Optional: true, + Description: `Executes a script to handle the requests that match this URL pattern. +Only the auto value is supported for Node.js in the App Engine standard environment, for example "script:" "auto".`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "script_path": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Path to the script from the application root directory.`, }, }, }, @@ -148,41 +168,53 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"SECURE_UNSPECIFIED", "SECURE_DEFAULT", "SECURE_NEVER", "SECURE_OPTIONAL", "SECURE_ALWAYS", ""}, false), + Description: `Security (HTTPS) enforcement for this URL.`, }, "static_files": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "application_readable": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.`, }, "expiration": { Type: schema.TypeString, Optional: true, + Description: `Time a static file served by this handler should be cached by web proxies and browsers. +A duration in seconds with up to nine fractional digits, terminated by 's'. Example "3.5s".`, }, "http_headers": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `HTTP headers to use for all responses from these URLs. +An object containing a list of "key:value" value pairs.".`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "mime_type": { Type: schema.TypeString, Optional: true, + Description: `MIME type used to serve all files served by this handler. +Defaults to file-specific MIME types, which are derived from each file's filename extension.`, }, "path": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.`, }, "require_matching_file": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether this handler should match the request if the file referenced by the handler does not exist.`, }, "upload_path_regex": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Regular expression that matches the file paths for all files that should be referenced by this handler.`, }, }, }, @@ -190,6 +222,8 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { "url_regex": { Type: schema.TypeString, Optional: true, + Description: `URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. +All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.`, }, }, }, @@ -197,19 +231,25 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { "instance_class": { Type: schema.TypeString, Optional: true, + Description: `Instance class that is used to run this version. Valid values are +AutomaticScaling F1, F2, F4, F4_1G +(Only AutomaticScaling is supported at the moment)`, }, "libraries": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `Configuration for third-party Python runtime libraries that are required by the application.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Name of the library. Example "django".`, }, "version": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Version of the library to select, or "latest".`, }, }, }, @@ -217,24 +257,30 @@ func resourceAppEngineStandardAppVersion() *schema.Resource { "runtime_api_version": { Type: schema.TypeString, Optional: true, + Description: `The version of the API in the given runtime environment. +Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref`, }, "service": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `AppEngine service resource`, }, "threadsafe": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether multiple requests can be dispatched to this version at once.`, }, "version_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Relative name of the version within the service. For example, 'v1'. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names,"default", "latest", and any name with the prefix "ah-".`, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Full path to the Version resource in the API. Example, "v1".`, }, "noop_on_destroy": { Type: schema.TypeBool, diff --git a/google/resource_big_query_dataset.go b/google/resource_big_query_dataset.go index b927f6fa839..1f75710055f 100644 --- a/google/resource_big_query_dataset.go +++ b/google/resource_big_query_dataset.go @@ -73,24 +73,34 @@ func resourceBigQueryDataset() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validateDatasetId, + Description: `A unique ID for this dataset, without the project name. The ID +must contain only letters (a-z, A-Z), numbers (0-9), or +underscores (_). The maximum length is 1,024 characters.`, }, "access": { - Type: schema.TypeSet, - Computed: true, - Optional: true, - Elem: bigqueryDatasetAccessSchema(), + Type: schema.TypeSet, + Computed: true, + Optional: true, + Description: `An array of objects that define dataset access for one or more entities.`, + Elem: bigqueryDatasetAccessSchema(), // Default schema.HashSchema is used. }, "default_encryption_configuration": { Type: schema.TypeList, Optional: true, + Description: `The default encryption key for all tables in the dataset. Once this property is set, +all newly-created partitioned tables in the dataset will have encryption key set to +this value, unless table creation request (or query) overrides the key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "kms_key_name": { Type: schema.TypeString, Required: true, + Description: `Describes the Cloud KMS encryption key that will be used to protect destination +BigQuery table. The BigQuery Service Account associated with your project requires +access to this encryption key.`, }, }, }, @@ -98,42 +108,99 @@ func resourceBigQueryDataset() *schema.Resource { "default_partition_expiration_ms": { Type: schema.TypeInt, Optional: true, + Description: `The default partition expiration for all partitioned tables in +the dataset, in milliseconds. + + +Once this property is set, all newly-created partitioned tables in +the dataset will have an 'expirationMs' property in the 'timePartitioning' +settings set to this value, and changing the value will only +affect new tables, not existing ones. The storage in a partition will +have an expiration time of its partition time plus this value. +Setting this property overrides the use of 'defaultTableExpirationMs' +for partitioned tables: only one of 'defaultTableExpirationMs' and +'defaultPartitionExpirationMs' will be used for any new partitioned +table. If you provide an explicit 'timePartitioning.expirationMs' when +creating or updating a partitioned table, that value takes precedence +over the default partition expiration time indicated by this property.`, }, "default_table_expiration_ms": { Type: schema.TypeInt, Optional: true, ValidateFunc: validateDefaultTableExpirationMs, + Description: `The default lifetime of all tables in the dataset, in milliseconds. +The minimum value is 3600000 milliseconds (one hour). + + +Once this property is set, all newly-created tables in the dataset +will have an 'expirationTime' property set to the creation time plus +the value in this property, and changing the value will only affect +new tables, not existing ones. When the 'expirationTime' for a given +table is reached, that table will be deleted automatically. +If a table's 'expirationTime' is modified or removed before the +table expires, or if you provide an explicit 'expirationTime' when +creating a table, that value takes precedence over the default +expiration time indicated by this property.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A user-friendly description of the dataset`, }, "friendly_name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A descriptive name for the dataset`, }, "labels": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `The labels associated with this dataset. You can use these to +organize and group your datasets`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "location": { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "US", + Description: `The geographic location where the dataset should reside. +See [official docs](https://cloud.google.com/bigquery/docs/dataset-locations). + + +There are two types of locations, regional or multi-regional. A regional +location is a specific geographic place, such as Tokyo, and a multi-regional +location is a large geographic area, such as the United States, that +contains at least two geographic places. + + +Possible regional values include: 'asia-east1', 'asia-northeast1', +'asia-southeast1', 'australia-southeast1', 'europe-north1', +'europe-west2' and 'us-east4'. + + +Possible multi-regional values: 'EU' and 'US'. + + +The default value is multi-regional location 'US'. +Changing this forces a new resource to be created.`, + Default: "US", }, "creation_time": { Type: schema.TypeInt, Computed: true, + Description: `The time when this dataset was created, in milliseconds since the +epoch.`, }, "etag": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `A hash of the resource.`, }, "last_modified_time": { Type: schema.TypeInt, Computed: true, + Description: `The date when this dataset or any of its tables was last modified, in +milliseconds since the epoch.`, }, "delete_contents_on_destroy": { Type: schema.TypeBool, @@ -160,40 +227,77 @@ func bigqueryDatasetAccessSchema() *schema.Resource { "domain": { Type: schema.TypeString, Optional: true, + Description: `A domain to grant access to. Any users signed in with the +domain specified will be granted the specified access`, }, "group_by_email": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An email address of a Google Group to grant access to.`, }, "role": { Type: schema.TypeString, Optional: true, + Description: `Describes the rights granted to the user specified by the other +member of the access object. Primitive, Predefined and custom +roles are supported. Predefined roles that have equivalent +primitive roles are swapped by the API to their Primitive +counterparts, and will show a diff post-create. See +[official docs](https://cloud.google.com/bigquery/docs/access-control).`, }, "special_group": { Type: schema.TypeString, Optional: true, + Description: `A special group to grant access to. + + +Possible values include: + + +* 'projectOwners': Owners of the enclosing project. + + +* 'projectReaders': Readers of the enclosing project. + + +* 'projectWriters': Writers of the enclosing project. + + +* 'allAuthenticatedUsers': All authenticated BigQuery users.`, }, "user_by_email": { Type: schema.TypeString, Optional: true, + Description: `An email address of a user to grant access to. For example: +fred@example.com`, }, "view": { Type: schema.TypeList, Optional: true, + Description: `A view from a different dataset to grant access to. Queries +executed against that view will have read access to tables in +this dataset. The role field is not required when this field is +set. If that view is updated by any user, access to the view +needs to be granted again via an update operation.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "dataset_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The ID of the dataset containing this table.`, }, "project_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The ID of the project containing this table.`, }, "table_id": { Type: schema.TypeString, Required: true, + Description: `The ID of the table. The ID must contain only letters (a-z, +A-Z), numbers (0-9), or underscores (_). The maximum length +is 1,024 characters.`, }, }, }, diff --git a/google/resource_bigquery_data_transfer_config.go b/google/resource_bigquery_data_transfer_config.go index c1600f02fc3..2963b57fadf 100644 --- a/google/resource_bigquery_data_transfer_config.go +++ b/google/resource_bigquery_data_transfer_config.go @@ -44,45 +44,69 @@ func resourceBigqueryDataTransferConfig() *schema.Resource { Schema: map[string]*schema.Schema{ "data_source_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The data source id. Cannot be changed once the transfer config is created.`, }, "destination_dataset_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The BigQuery target dataset id.`, }, "display_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The user specified display name for the transfer config.`, }, "params": { - Type: schema.TypeMap, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Required: true, + Description: `These parameters are specific to each data source.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "data_refresh_window_days": { Type: schema.TypeInt, Optional: true, + Description: `The number of days to look back to automatically refresh the data. +For example, if dataRefreshWindowDays = 10, then every day BigQuery +reingests data for [today-10, today-1], rather than ingesting data for +just [today-1]. Only valid if the data source supports the feature. +Set the value to 0 to use the default value.`, }, "disabled": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `When set to true, no runs are scheduled for a given transfer.`, }, "location": { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "US", + Description: `The geographic location where the transfer config should reside. +Examples: US, EU, asia-northeast1. The default value is US.`, + Default: "US", }, "schedule": { Type: schema.TypeString, Optional: true, + Description: `Data transfer schedule. If the data source does not support a custom +schedule, this should be empty. If it is empty, the default value for +the data source will be used. The specified times are in UTC. Examples +of valid format: 1st,3rd monday of month 15:30, every wed,fri of jan, +jun 13:15, and first sunday of quarter 00:00. See more explanation +about the format here: +https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format +NOTE: the granularity should be at least 8 hours, or less frequent.`, }, "name": { Type: schema.TypeString, Computed: true, + Description: `The resource name of the transfer config. Transfer config names have the +form projects/{projectId}/locations/{location}/transferConfigs/{configId}. +Where configId is usually a uuid, but this is not required. +The name is ignored when creating a transfer config.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_bigtable_app_profile.go b/google/resource_bigtable_app_profile.go index a47c95bcbe9..12f91030f01 100644 --- a/google/resource_bigtable_app_profile.go +++ b/google/resource_bigtable_app_profile.go @@ -44,52 +44,64 @@ func resourceBigtableAppProfile() *schema.Resource { Schema: map[string]*schema.Schema{ "app_profile_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The unique name of the app profile in the form '[_a-zA-Z0-9][-_.a-zA-Z0-9]*'.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Long form description of the use case for this app profile.`, }, "ignore_warnings": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeBool, + Optional: true, + Description: `If true, ignore safety checks when deleting/updating the app profile.`, + Default: false, }, "instance": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The name of the instance to create the app profile within.`, }, "multi_cluster_routing_use_any": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Description: `If true, read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available +in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes +consistency to improve availability.`, ConflictsWith: []string{"single_cluster_routing"}, }, "single_cluster_routing": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Use a single-cluster routing policy.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "allow_transactional_writes": { Type: schema.TypeBool, Optional: true, + Description: `If true, CheckAndMutateRow and ReadModifyWriteRow requests are allowed by this app profile. +It is unsafe to send these requests to the same table/row/column in multiple clusters.`, }, "cluster_id": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The cluster to which read/write requests should be routed.`, }, }, }, ConflictsWith: []string{"multi_cluster_routing_use_any"}, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The unique name of the requested app profile. Values are of the form 'projects//instances//appProfiles/'.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_binary_authorization_attestor.go b/google/resource_binary_authorization_attestor.go index 60b53d035e9..a5800dfbb8e 100644 --- a/google/resource_binary_authorization_attestor.go +++ b/google/resource_binary_authorization_attestor.go @@ -43,9 +43,10 @@ func resourceBinaryAuthorizationAttestor() *schema.Resource { Schema: map[string]*schema.Schema{ "attestation_authority_note": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, + Type: schema.TypeList, + Required: true, + Description: `A Container Analysis ATTESTATION_AUTHORITY Note, created by the user.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "note_reference": { @@ -53,38 +54,81 @@ func resourceBinaryAuthorizationAttestor() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The resource name of a ATTESTATION_AUTHORITY Note, created by the +user. If the Note is in a different project from the Attestor, it +should be specified in the format 'projects/*/notes/*' (or the legacy +'providers/*/notes/*'). This field may not be updated. +An attestation by this attestor is stored as a Container Analysis +ATTESTATION_AUTHORITY Occurrence that names a container image +and that links to this Note.`, }, "public_keys": { Type: schema.TypeList, Optional: true, + Description: `Public keys that verify attestations signed by this attestor. This +field may be updated. +If this field is non-empty, one of the specified public keys must +verify that an attestation was signed by this attestor for the +image specified in the admission request. +If this field is empty, this attestor always returns that no valid +attestations exist.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ascii_armored_pgp_public_key": { Type: schema.TypeString, Optional: true, + Description: `ASCII-armored representation of a PGP public key, as the +entire output by the command +'gpg --export --armor foo@example.com' (either LF or CRLF +line endings). When using this field, id should be left +blank. The BinAuthz API handlers will calculate the ID +and fill it in automatically. BinAuthz computes this ID +as the OpenPGP RFC4880 V4 fingerprint, represented as +upper-case hex. If id is provided by the caller, it will +be overwritten by the API-calculated ID.`, }, "comment": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A descriptive comment. This field may be updated.`, }, "id": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `The ID of this public key. Signatures verified by BinAuthz +must include the ID of the public key that can be used to +verify them, and that ID must match the contents of this +field exactly. Additional restrictions on this field can +be imposed based on which public key type is encapsulated. +See the documentation on publicKey cases below for details.`, }, "pkix_public_key": { Type: schema.TypeList, Optional: true, + Description: `A raw PKIX SubjectPublicKeyInfo format public key. + +NOTE: id may be explicitly provided by the caller when using this +type of public key, but it MUST be a valid RFC3986 URI. If id is left +blank, a default one will be computed based on the digest of the DER +encoding of the public key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "public_key_pem": { Type: schema.TypeString, Optional: true, + Description: `A PEM-encoded public key, as described in +'https://tools.ietf.org/html/rfc7468#section-13'`, }, "signature_algorithm": { Type: schema.TypeString, Optional: true, + Description: `The signature algorithm used to verify a message against +a signature using this key. These signature algorithm must +match the structure and any object identifiers encoded in +publicKeyPem (i.e. this algorithm must match that of the +public key).`, }, }, }, @@ -95,18 +139,30 @@ func resourceBinaryAuthorizationAttestor() *schema.Resource { "delegation_service_account_email": { Type: schema.TypeString, Computed: true, + Description: `This field will contain the service account email address that +this Attestor will use as the principal when querying Container +Analysis. Attestor administrators must grant this service account +the IAM role needed to read attestations from the noteReference in +Container Analysis (containeranalysis.notes.occurrences.viewer). +This email address is fixed for the lifetime of the Attestor, but +callers should not make any other assumptions about the service +account email; future versions may use an email based on a +different naming pattern.`, }, }, }, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name.`, }, "description": { Type: schema.TypeString, Optional: true, + Description: `A descriptive comment. This field may be updated. The field may be +displayed in chooser dialogs.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_binary_authorization_policy.go b/google/resource_binary_authorization_policy.go index cdfb1528b1d..437d7115fb4 100644 --- a/google/resource_binary_authorization_policy.go +++ b/google/resource_binary_authorization_policy.go @@ -63,6 +63,8 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { "default_admission_rule": { Type: schema.TypeList, Required: true, + Description: `Default admission rule for a cluster without a per-cluster admission +rule.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -70,16 +72,27 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"ENFORCED_BLOCK_AND_AUDIT_LOG", "DRYRUN_AUDIT_LOG_ONLY"}, false), + Description: `The action when a pod creation is denied by the admission rule.`, }, "evaluation_mode": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"ALWAYS_ALLOW", "REQUIRE_ATTESTATION", "ALWAYS_DENY"}, false), + Description: `How this admission rule will be evaluated.`, }, "require_attestations_by": { Type: schema.TypeSet, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The resource names of the attestors that must attest to a +container image. If the attestor is in a different project from the +policy, it should be specified in the format 'projects/*/attestors/*'. +Each attestor must exist before a policy can reference it. To add an +attestor to a policy the principal issuing the policy change +request must be able to read the attestor resource. + +Note: this field must be non-empty when the evaluation_mode field +specifies REQUIRE_ATTESTATION, otherwise it must be empty.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -91,11 +104,18 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { "admission_whitelist_patterns": { Type: schema.TypeList, Optional: true, + Description: `A whitelist of image patterns to exclude from admission rules. If an +image's name matches a whitelist pattern, the image's admission +requests will always be permitted regardless of your admission rules.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name_pattern": { Type: schema.TypeString, Optional: true, + Description: `An image name pattern to whitelist, in the form +'registry/path/to/image'. This supports a trailing * as a +wildcard, but this is allowed only in text after the registry/ +part.`, }, }, }, @@ -103,6 +123,16 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { "cluster_admission_rules": { Type: schema.TypeSet, Optional: true, + Description: `Per-cluster admission rules. An admission rule specifies either that +all container images used in a pod creation request must be attested +to by one or more attestors, that all pod creations will be allowed, +or that all pod creations will be denied. There can be at most one +admission rule per cluster spec. + + +Identifier format: '{{location}}.{{clusterId}}'. +A location is either a compute zone (e.g. 'us-central1-a') or a region +(e.g. 'us-central1').`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cluster": { @@ -113,16 +143,27 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ENFORCED_BLOCK_AND_AUDIT_LOG", "DRYRUN_AUDIT_LOG_ONLY", ""}, false), + Description: `The action when a pod creation is denied by the admission rule.`, }, "evaluation_mode": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ALWAYS_ALLOW", "REQUIRE_ATTESTATION", "ALWAYS_DENY", ""}, false), + Description: `How this admission rule will be evaluated.`, }, "require_attestations_by": { Type: schema.TypeSet, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The resource names of the attestors that must attest to a +container image. If the attestor is in a different project from the +policy, it should be specified in the format 'projects/*/attestors/*'. +Each attestor must exist before a policy can reference it. To add an +attestor to a policy the principal issuing the policy change +request must be able to read the attestor resource. + +Note: this field must be non-empty when the evaluation_mode field +specifies REQUIRE_ATTESTATION, otherwise it must be empty.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -155,14 +196,18 @@ func resourceBinaryAuthorizationPolicy() *schema.Resource { }, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A descriptive comment.`, }, "global_policy_evaluation_mode": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ENABLE", "DISABLE", ""}, false), + Description: `Controls the evaluation of a Google-maintained global admission policy +for common system-level images. Images not covered by the global +policy will be subject to the project admission policy.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_cloud_build_trigger.go b/google/resource_cloud_build_trigger.go index 739c0d816cf..ace3f59aab4 100644 --- a/google/resource_cloud_build_trigger.go +++ b/google/resource_cloud_build_trigger.go @@ -44,26 +44,38 @@ func resourceCloudBuildTrigger() *schema.Resource { Schema: map[string]*schema.Schema{ "build": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Contents of the build template. Either a filename or build template must be provided.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "images": { Type: schema.TypeList, Optional: true, + Description: `A list of images to be pushed upon the successful completion of all build steps. +The images are pushed using the builder service account's credentials. +The digests of the pushed images will be stored in the Build resource's results field. +If any of the images fail to be pushed, the build status is marked FAILURE.`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "step": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The operations to be performed on the workspace.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "args": { Type: schema.TypeList, Optional: true, + Description: `A list of arguments that will be presented to the step when it is started. + +If the image used to run the step's container has an entrypoint, the args +are used as arguments to that entrypoint. If the image does not define an +entrypoint, the first element in args is used as the entrypoint, and the +remainder will be used as arguments.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -71,14 +83,33 @@ func resourceCloudBuildTrigger() *schema.Resource { "dir": { Type: schema.TypeString, Optional: true, + Description: `Working directory to use when running this step's container. + +If this value is a relative path, it is relative to the build's working +directory. If this value is absolute, it may be outside the build's working +directory, in which case the contents of the path may not be persisted +across build step executions, unless a 'volume' for that path is specified. + +If the build specifies a 'RepoSource' with 'dir' and a step with a +'dir', +which specifies an absolute path, the 'RepoSource' 'dir' is ignored +for the step's execution.`, }, "entrypoint": { Type: schema.TypeString, Optional: true, + Description: `Entrypoint to be used instead of the build step image's +default entrypoint. +If unset, the image's default entrypoint is used`, }, "env": { Type: schema.TypeList, Optional: true, + Description: `A list of environment variable definitions to be used when +running a step. + +The elements are of the form "KEY=VALUE" for the environment variable +"KEY" being given the value "VALUE".`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -86,14 +117,35 @@ func resourceCloudBuildTrigger() *schema.Resource { "id": { Type: schema.TypeString, Optional: true, + Description: `Unique identifier for this build step, used in 'wait_for' to +reference this build step as a dependency.`, }, "name": { Type: schema.TypeString, Optional: true, + Description: `The name of the container image that will run this particular build step. + +If the image is available in the host's Docker daemon's cache, it will be +run directly. If not, the host will attempt to pull the image first, using +the builder service account's credentials if necessary. + +The Docker daemon's cache will already have the latest versions of all of +the officially supported build steps (https://github.com/GoogleCloudPlatform/cloud-builders). +The Docker daemon will also have cached many of the layers for some popular +images, like "ubuntu", "debian", but they will be refreshed at the time +you attempt to use them. + +If you built an image in a previous build step, it will be stored in the +host's Docker daemon's cache and is available to use as the name for a +later build step.`, }, "secret_env": { Type: schema.TypeList, Optional: true, + Description: `A list of environment variables which are encrypted using +a Cloud Key +Management Service crypto key. These values must be specified in +the build's 'Secret'.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -101,23 +153,45 @@ func resourceCloudBuildTrigger() *schema.Resource { "timeout": { Type: schema.TypeString, Optional: true, + Description: `Time limit for executing this build step. If not defined, +the step has no +time limit and will be allowed to continue to run until either it +completes or the build itself times out.`, }, "timing": { Type: schema.TypeString, Optional: true, + Description: `Output only. Stores timing information for executing this +build step.`, }, "volumes": { Type: schema.TypeList, Optional: true, + Description: `List of volumes to mount into the build step. + +Each volume is created as an empty volume prior to execution of the +build step. Upon completion of the build, volumes and their contents +are discarded. + +Using a named volume in only one step is not valid as it is +indicative of a build request with an incorrect configuration.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, Optional: true, + Description: `Name of the volume to mount. + +Volume names must be unique per build step and must be valid names for +Docker volumes. Each named volume must be used by at least two build steps.`, }, "path": { Type: schema.TypeString, Optional: true, + Description: `Path at which to mount the volume. + +Paths must be absolute and cannot conflict with other volume paths on +the same build step or with certain reserved volume paths.`, }, }, }, @@ -125,6 +199,12 @@ func resourceCloudBuildTrigger() *schema.Resource { "wait_for": { Type: schema.TypeList, Optional: true, + Description: `The ID(s) of the step(s) that this build step depends on. + +This build step will not start until all the build steps in 'wait_for' +have completed successfully. If 'wait_for' is empty, this build step +will start when all previous build steps in the 'Build.Steps' list +have completed successfully.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -133,8 +213,9 @@ func resourceCloudBuildTrigger() *schema.Resource { }, }, "tags": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `Tags for annotation of a Build. These are not docker tags.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -144,21 +225,33 @@ func resourceCloudBuildTrigger() *schema.Resource { ConflictsWith: []string{"filename"}, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Human-readable description of the trigger.`, }, "disabled": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether the trigger is disabled or not. If true, the trigger will never result in a build.`, }, "filename": { Type: schema.TypeString, Optional: true, + Description: `Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided.`, ConflictsWith: []string{"build"}, }, "ignored_files": { Type: schema.TypeList, Optional: true, + Description: `ignoredFiles and includedFiles are file glob matches using http://godoc/pkg/path/filepath#Match +extended with support for '**'. + +If ignoredFiles and changed files are both empty, then they are not +used to determine whether or not to trigger a build. + +If ignoredFiles is not empty, then we ignore any files that match any +of the ignored_file globs. If the change has no files that are outside +of the ignoredFiles globs, then we do not trigger a build.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -166,62 +259,96 @@ func resourceCloudBuildTrigger() *schema.Resource { "included_files": { Type: schema.TypeList, Optional: true, + Description: `ignoredFiles and includedFiles are file glob matches using http://godoc/pkg/path/filepath#Match +extended with support for '**'. + +If any of the files altered in the commit pass the ignoredFiles filter +and includedFiles is empty, then as far as this filter is concerned, we +should trigger the build. + +If any of the files altered in the commit pass the ignoredFiles filter +and includedFiles is not empty, then we make sure that at least one of +those files matches a includedFiles glob. If not, then we do not trigger +a build.`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "name": { - Type: schema.TypeString, - Computed: true, - Optional: true, + Type: schema.TypeString, + Computed: true, + Optional: true, + Description: `Name of the trigger. Must be unique within the project.`, }, "substitutions": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Substitutions data for Build resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "trigger_template": { Type: schema.TypeList, Optional: true, + Description: `Template describing the types of source changes to trigger a build. + +Branch and tag names in trigger templates are interpreted as regular +expressions. Any branch or tag change that matches that regular +expression will trigger a build. +This field is required, and will be validated as such in 3.0.0.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "branch_name": { Type: schema.TypeString, Optional: true, + Description: `Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. +This field is a regular expression.`, }, "commit_sha": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided.`, }, "dir": { Type: schema.TypeString, Optional: true, + Description: `Directory, relative to the source root, in which to run the build. + +This must be a relative path. If a step's dir is specified and +is an absolute path, this value is ignored for that step's +execution.`, }, "project_id": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `ID of the project that owns the Cloud Source Repository. If +omitted, the project ID requesting the build is assumed.`, }, "repo_name": { - Type: schema.TypeString, - Optional: true, - Default: "default", + Type: schema.TypeString, + Optional: true, + Description: `Name of the Cloud Source Repository. If omitted, the name "default" is assumed.`, + Default: "default", }, "tag_name": { Type: schema.TypeString, Optional: true, + Description: `Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. +This field is a regular expression.`, }, }, }, }, "create_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time when the trigger was created.`, }, "trigger_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The unique identifier for the trigger.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_cloud_scheduler_job.go b/google/resource_cloud_scheduler_job.go index 693407eff24..c4905c6d34b 100644 --- a/google/resource_cloud_scheduler_job.go +++ b/google/resource_cloud_scheduler_job.go @@ -94,20 +94,25 @@ func resourceCloudSchedulerJob() *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 of the job.`, }, "region": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: `Region where the scheduler job resides`, }, "app_engine_http_target": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `App Engine HTTP target. +If the job providers a App Engine HTTP target the cron will +send a request to the service instance`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -115,28 +120,40 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The relative URI. +The relative URL must begin with "/" and must be a valid HTTP relative URL. +It can contain a path, query string arguments, and \# fragments. +If the relative URL is empty, then the root path "/" will be used. +No spaces are allowed, and the maximum length allowed is 2083 characters`, }, "app_engine_routing": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `App Engine Routing setting for the job.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "instance": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `App instance. +By default, the job is sent to an instance which is available when the job is attempted.`, }, "service": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `App service. +By default, the job is sent to the service which is the default service when the job is attempted.`, }, "version": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `App version. +By default, the job is sent to the version which is the default version when the job is attempted.`, }, }, }, @@ -145,18 +162,25 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `HTTP request body. +A request body is allowed only if the HTTP method is POST or PUT. +It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.`, }, "headers": { Type: schema.TypeMap, Optional: true, ForceNew: true, ValidateFunc: validateHttpHeaders(), - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `HTTP request headers. +This map contains the header field names and values. +Headers can be set when the job is created.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "http_method": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Which HTTP method to use for the request.`, }, }, }, @@ -166,53 +190,71 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `A human-readable description for the job. +This string must not contain more than 500 characters.`, }, "http_target": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `HTTP target. +If the job providers a http_target the cron will +send a request to the targeted url`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "uri": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The full URI path that the request will be sent to.`, }, "body": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `HTTP request body. +A request body is allowed only if the HTTP method is POST, PUT, or PATCH. +It is an error to set body on a job with an incompatible HttpMethod.`, }, "headers": { Type: schema.TypeMap, Optional: true, ForceNew: true, ValidateFunc: validateHttpHeaders(), - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `This map contains the header field names and values. +Repeated headers are not supported, but a header value can contain commas.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "http_method": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Which HTTP method to use for the request.`, }, "oauth_token": { Type: schema.TypeList, Optional: true, ForceNew: true, DiffSuppressFunc: authHeaderDiffSuppress, - MaxItems: 1, + Description: `Contains information needed for generating an OAuth token. +This type of authorization should be used when sending requests to a GCP endpoint.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "scope": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `OAuth scope to be used for generating OAuth access token. If not specified, +"https://www.googleapis.com/auth/cloud-platform" will be used.`, }, "service_account_email": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Service account email to be used for generating OAuth token. +The service account must be within the same project as the job.`, }, }, }, @@ -222,18 +264,24 @@ func resourceCloudSchedulerJob() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: authHeaderDiffSuppress, - MaxItems: 1, + Description: `Contains information needed for generating an OpenID Connect token. +This type of authorization should be used when sending requests to third party endpoints or Cloud Run.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "audience": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Audience to be used when generating OIDC token. If not specified, +the URI specified in target will be used.`, }, "service_account_email": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Service account email to be used for generating OAuth token. +The service account must be within the same project as the job.`, }, }, }, @@ -246,6 +294,9 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Pub/Sub target +If the job providers a Pub/Sub target the cron will publish +a message to the provided topic`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -253,17 +304,24 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. +The topic name must be in the same format as required by PubSub's PublishRequest.name, +for example projects/PROJECT_ID/topics/TOPIC_ID.`, }, "attributes": { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `Attributes for PubsubMessage. +Pubsub message must contain either non-empty data, or at least one attribute.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "data": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The message payload for PubsubMessage. +Pubsub message must contain either non-empty data, or at least one attribute.`, }, }, }, @@ -273,6 +331,9 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `By default, if a job does not complete successfully, +meaning that an acknowledgement is not received from the handler, +then it will be retried with exponential backoff according to the settings`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -280,40 +341,57 @@ func resourceCloudSchedulerJob() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The maximum amount of time to wait before retrying a job after it fails. +A duration in seconds with up to nine fractional digits, terminated by 's'.`, }, "max_doublings": { Type: schema.TypeInt, Optional: true, ForceNew: true, + Description: `The time between retries will double maxDoublings times. +A job's retry interval starts at minBackoffDuration, +then doubles maxDoublings times, then increases linearly, +and finally retries retries at intervals of maxBackoffDuration up to retryCount times.`, }, "max_retry_duration": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The time limit for retrying a failed job, measured from time when an execution was first attempted. +If specified with retryCount, the job will be retried until both limits are reached. +A duration in seconds with up to nine fractional digits, terminated by 's'.`, }, "min_backoff_duration": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The minimum amount of time to wait before retrying a job after it fails. +A duration in seconds with up to nine fractional digits, terminated by 's'.`, }, "retry_count": { Type: schema.TypeInt, Optional: true, ForceNew: true, + Description: `The number of attempts that the system will make to run a +job using the exponential backoff procedure described by maxDoublings. +Values greater than 5 and negative values are not allowed.`, }, }, }, }, "schedule": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Describes the schedule on which the job will be executed.`, }, "time_zone": { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "Etc/UTC", + Description: `Specifies the time zone to be used in interpreting schedule. +The value of this field must be a time zone name from the tz database.`, + Default: "Etc/UTC", }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_address.go b/google/resource_compute_address.go index 44b7a765957..0084026ffa5 100644 --- a/google/resource_compute_address.go +++ b/google/resource_compute_address.go @@ -46,24 +46,37 @@ func resourceComputeAddress() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$`), + Description: `Name of the resource. The name must be 1-63 characters long, and +comply with RFC1035. Specifically, the name must be 1-63 characters +long and match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' +which means the first character must be a lowercase letter, and all +following characters must be a dash, lowercase letter, or digit, +except the last character, which cannot be a dash.`, }, "address": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The static external IP address represented by this resource. Only +IPv4 is supported. An address may only be specified for INTERNAL +address types. The IP address must be inside the specified subnetwork, +if any.`, }, "address_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"INTERNAL", "EXTERNAL", ""}, false), - Default: "EXTERNAL", + Description: `The type of address to reserve, either INTERNAL or EXTERNAL. +If unspecified, defaults to EXTERNAL.`, + Default: "EXTERNAL", }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "network_tier": { Type: schema.TypeString, @@ -71,6 +84,9 @@ func resourceComputeAddress() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD", ""}, false), + Description: `The networking tier used for configuring this address. This field can +take the following values: PREMIUM or STANDARD. If this field is not +specified, it is assumed to be PREMIUM.`, }, "purpose": { Type: schema.TypeString, @@ -78,6 +94,11 @@ func resourceComputeAddress() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"GCE_ENDPOINT", ""}, false), + Description: `The purpose of this resource, which can be one of the following values: + +- GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. + +This should only be set when using an Internal address.`, }, "region": { Type: schema.TypeString, @@ -85,6 +106,8 @@ func resourceComputeAddress() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The Region in which the created address should reside. +If it is not provided, the provider region is used.`, }, "subnetwork": { Type: schema.TypeString, @@ -92,14 +115,20 @@ func resourceComputeAddress() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The URL of the subnetwork in which to reserve the address. If an IP +address is specified, it must be within the subnetwork's IP range. +This field can only be used with INTERNAL type with +GCE_ENDPOINT/DNS_RESOLVER purposes.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "users": { - Type: schema.TypeList, - Computed: true, + Type: schema.TypeList, + Computed: true, + Description: `The URLs of the resources that are using this address.`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google/resource_compute_autoscaler.go b/google/resource_compute_autoscaler.go index 0255572e2c8..76c778787a0 100644 --- a/google/resource_compute_autoscaler.go +++ b/google/resource_compute_autoscaler.go @@ -47,45 +47,89 @@ func resourceComputeAutoscaler() *schema.Resource { "autoscaling_policy": { Type: schema.TypeList, Required: true, + Description: `The configuration parameters for the autoscaling algorithm. You can +define one or more of the policies for an autoscaler: cpuUtilization, +customMetricUtilizations, and loadBalancingUtilization. + +If none of these are specified, the default will be to autoscale based +on cpuUtilization to 0.6 or 60%.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "max_replicas": { Type: schema.TypeInt, Required: true, + Description: `The maximum number of instances that the autoscaler can scale up +to. This is required when creating or updating an autoscaler. The +maximum number of replicas should not be lower than minimal number +of replicas.`, }, "min_replicas": { Type: schema.TypeInt, Required: true, + Description: `The minimum number of replicas that the autoscaler can scale down +to. This cannot be less than 0. If not provided, autoscaler will +choose a default value depending on maximum number of instances +allowed.`, }, "cooldown_period": { Type: schema.TypeInt, Optional: true, - Default: 60, + Description: `The number of seconds that the autoscaler should wait before it +starts collecting information from a new instance. This prevents +the autoscaler from collecting information when the instance is +initializing, during which the collected usage would not be +reliable. The default time autoscaler waits is 60 seconds. + +Virtual machine initialization times might vary because of +numerous factors. We recommend that you test how long an +instance may take to initialize. To do this, create an instance +and time the startup process.`, + Default: 60, }, "cpu_utilization": { Type: schema.TypeList, Computed: true, Optional: true, + Description: `Defines the CPU utilization policy that allows the autoscaler to +scale based on the average CPU utilization of a managed instance +group.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "target": { Type: schema.TypeFloat, Required: true, + Description: `The target CPU utilization that the autoscaler should maintain. +Must be a float value in the range (0, 1]. If not specified, the +default is 0.6. + +If the CPU level is below the target utilization, the autoscaler +scales down the number of instances until it reaches the minimum +number of instances you specified or until the average CPU of +your instances reaches the target utilization. + +If the average CPU is above the target utilization, the autoscaler +scales up until it reaches the maximum number of instances you +specified or until the average utilization reaches the target +utilization.`, }, }, }, }, "load_balancing_utilization": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Configuration parameters of autoscaling based on a load balancer.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "target": { Type: schema.TypeFloat, Required: true, + Description: `Fraction of backend capacity utilization (set in HTTP(s) load +balancing configuration) that autoscaler should maintain. Must +be a positive float value. If not defined, the default is 0.8.`, }, }, }, @@ -93,20 +137,39 @@ func resourceComputeAutoscaler() *schema.Resource { "metric": { Type: schema.TypeList, Optional: true, + Description: `Defines the CPU utilization policy that allows the autoscaler to +scale based on the average CPU utilization of a managed instance +group.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, Required: true, + Description: `The identifier (type) of the Stackdriver Monitoring metric. +The metric cannot have negative values. + +The metric must have a value type of INT64 or DOUBLE.`, }, "target": { Type: schema.TypeFloat, Optional: true, + Description: `The target value of the metric that autoscaler should +maintain. This must be a positive value. A utilization +metric scales number of virtual machines handling requests +to increase or decrease proportionally to the metric. + +For example, a good metric to use as a utilizationTarget is +www.googleapis.com/compute/instance/network/received_bytes_count. +The autoscaler will work to keep this value constant for each +of the instances.`, }, "type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"GAUGE", "DELTA_PER_SECOND", "DELTA_PER_MINUTE", ""}, false), + Description: `Defines how target utilization value is expressed for a +Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, +or DELTA_PER_MINUTE.`, }, }, }, @@ -119,15 +182,22 @@ func resourceComputeAutoscaler() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource. The name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "target": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the managed instance group that this autoscaler will scale.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "zone": { Type: schema.TypeString, @@ -135,10 +205,12 @@ func resourceComputeAutoscaler() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the zone where the instance group resides.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_backend_bucket.go b/google/resource_compute_backend_bucket.go index 33c350a5639..28dd7e1bfe1 100644 --- a/google/resource_compute_backend_bucket.go +++ b/google/resource_compute_backend_bucket.go @@ -44,26 +44,43 @@ func resourceComputeBackendBucket() *schema.Resource { Schema: map[string]*schema.Schema{ "bucket_name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Cloud Storage bucket name.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$`), + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "cdn_policy": { - Type: schema.TypeList, - Computed: true, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Optional: true, + Description: `Cloud CDN configuration for this Backend Bucket.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "signed_url_cache_max_age_sec": { Type: schema.TypeInt, Optional: true, - Default: 3600, + Description: `Maximum number of seconds the response to a signed URL request will +be considered fresh. Defaults to 1hr (3600s). After this time period, +the response will be revalidated before being served. +When serving responses to signed URL requests, +Cloud CDN will internally behave as though +all responses from this backend had a "Cache-Control: public, +max-age=[TTL]" header, regardless of any existing Cache-Control +header. The actual headers served in responses will not be altered.`, + Default: 3600, }, }, }, @@ -71,14 +88,18 @@ func resourceComputeBackendBucket() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, + Description: `An optional textual description of the resource; provided by the +client when the resource is created.`, }, "enable_cdn": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `If true, enable Cloud CDN for this BackendBucket.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_backend_bucket_signed_url_key.go b/google/resource_compute_backend_bucket_signed_url_key.go index 591fb4d8b62..242784c86a1 100644 --- a/google/resource_compute_backend_bucket_signed_url_key.go +++ b/google/resource_compute_backend_bucket_signed_url_key.go @@ -41,11 +41,14 @@ func resourceComputeBackendBucketSignedUrlKey() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend bucket this signed URL key belongs.`, }, "key_value": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `128-bit key value used for signing the URL. The key value must be a +valid RFC 4648 Section 5 base64url encoded string.`, Sensitive: true, }, "name": { @@ -53,6 +56,7 @@ func resourceComputeBackendBucketSignedUrlKey() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$`), + Description: `Name of the signed URL key.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_backend_service.go b/google/resource_compute_backend_service.go index 80968d17649..eb7ca8e4051 100644 --- a/google/resource_compute_backend_service.go +++ b/google/resource_compute_backend_service.go @@ -165,6 +165,11 @@ func resourceComputeBackendService() *schema.Resource { "health_checks": { Type: schema.TypeSet, Required: true, + Description: `The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource +for health checking this BackendService. Currently at most one health +check can be specified, and a health check is required. + +For internal load balancing, a URL to a HealthCheck resource must be specified instead.`, MinItems: 1, MaxItems: 1, Elem: &schema.Schema{ @@ -176,45 +181,76 @@ func resourceComputeBackendService() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "affinity_cookie_ttl_sec": { Type: schema.TypeInt, Optional: true, + Description: `Lifetime of cookies in seconds if session_affinity is +GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts +only until the end of the browser session (or equivalent). The +maximum allowed value for TTL is one day. + +When the load balancing scheme is INTERNAL, this field is not used.`, }, "backend": { - Type: schema.TypeSet, - Optional: true, - Elem: computeBackendServiceBackendSchema(), - Set: resourceGoogleComputeBackendServiceBackendHash, + Type: schema.TypeSet, + Optional: true, + Description: `The set of backends that serve this BackendService.`, + Elem: computeBackendServiceBackendSchema(), + Set: resourceGoogleComputeBackendServiceBackendHash, }, "cdn_policy": { - Type: schema.TypeList, - Computed: true, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Optional: true, + Description: `Cloud CDN configuration for this BackendService.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cache_key_policy": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `The CacheKeyPolicy for this CdnPolicy.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "include_host": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `If true requests to different hosts will be cached separately.`, }, "include_protocol": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `If true, http and https requests will be cached separately.`, }, "include_query_string": { Type: schema.TypeBool, Optional: true, + Description: `If true, include query string parameters in the cache key +according to query_string_whitelist and +query_string_blacklist. If neither is set, the entire query +string will be included. + +If false, the query string will be excluded from the cache +key entirely.`, }, "query_string_blacklist": { Type: schema.TypeSet, Optional: true, + Description: `Names of query string parameters to exclude in cache keys. + +All other parameters will be included. Either specify +query_string_whitelist or query_string_blacklist, not both. +'&' and '=' will be percent encoded and not treated as +delimiters.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -223,6 +259,12 @@ func resourceComputeBackendService() *schema.Resource { "query_string_whitelist": { Type: schema.TypeSet, Optional: true, + Description: `Names of query string parameters to include in cache keys. + +All other parameters will be excluded. Either specify +query_string_whitelist or query_string_blacklist, not both. +'&' and '=' will be percent encoded and not treated as +delimiters.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -234,7 +276,17 @@ func resourceComputeBackendService() *schema.Resource { "signed_url_cache_max_age_sec": { Type: schema.TypeInt, Optional: true, - Default: 3600, + Description: `Maximum number of seconds the response to a signed URL request +will be considered fresh, defaults to 1hr (3600s). After this +time period, the response will be revalidated before +being served. + +When serving responses to signed URL requests, Cloud CDN will +internally behave as though all responses from this backend had a +"Cache-Control: public, max-age=[TTL]" header, regardless of any +existing Cache-Control header. The actual headers served in +responses will not be altered.`, + Default: 3600, }, }, }, @@ -242,36 +294,44 @@ func resourceComputeBackendService() *schema.Resource { "connection_draining_timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 300, + Description: `Time for which instance will be drained (not accept new +connections, but still work to finish started).`, + Default: 300, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "enable_cdn": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `If true, enable Cloud CDN for this BackendService.`, }, "iap": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Settings for enabling Cloud Identity Aware Proxy`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "oauth2_client_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `OAuth2 Client ID for IAP`, }, "oauth2_client_secret": { - Type: schema.TypeString, - Required: true, - Sensitive: true, + Type: schema.TypeString, + Required: true, + Description: `OAuth2 Client Secret for IAP`, + Sensitive: true, }, "oauth2_client_secret_sha256": { - Type: schema.TypeString, - Computed: true, - Sensitive: true, + Type: schema.TypeString, + Computed: true, + Description: `OAuth2 Client Secret SHA-256 for IAP`, + Sensitive: true, }, }, }, @@ -281,42 +341,61 @@ func resourceComputeBackendService() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", "INTERNAL_SELF_MANAGED", ""}, false), - Default: "EXTERNAL", + Description: `Indicates whether the backend service will be used with internal or +external load balancing. A backend service created for one type of +load balancing cannot be used with the other. Must be 'EXTERNAL' or +'INTERNAL_SELF_MANAGED' for a global backend service. Defaults to 'EXTERNAL'.`, + Default: "EXTERNAL", }, "port_name": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `Name of backend port. The same name should appear in the instance +groups referenced by this service. Required when the load balancing +scheme is EXTERNAL.`, }, "protocol": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"HTTP", "HTTPS", "HTTP2", "TCP", "SSL", ""}, false), + Description: `The protocol this BackendService uses to communicate with backends. +Possible values are HTTP, HTTPS, HTTP2, TCP, and SSL. The default is +HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer +types and may result in errors if used with the GA API.`, }, "security_policy": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The security policy associated with this backend service.`, }, "session_affinity": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "CLIENT_IP", "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", "HEADER_FIELD", "HTTP_COOKIE", ""}, false), + Description: `Type of session affinity to use. The default is NONE. Session affinity is +not applicable if the protocol is UDP.`, }, "timeout_sec": { Type: schema.TypeInt, Computed: true, Optional: true, + Description: `How many seconds to wait for the backend before considering it a +failed request. Default is 30 seconds. Valid range is [1, 86400].`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "fingerprint": { Type: schema.TypeString, Computed: true, + Description: `Fingerprint of this resource. A hash of the contents stored in this +object. This field is used in optimistic locking.`, }, "project": { Type: schema.TypeString, @@ -339,50 +418,118 @@ func computeBackendServiceBackendSchema() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"UTILIZATION", "RATE", "CONNECTION", ""}, false), - Default: "UTILIZATION", + Description: `Specifies the balancing mode for this backend. + +For global HTTP(S) or TCP/SSL load balancing, the default is +UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) +and CONNECTION (for TCP/SSL).`, + Default: "UTILIZATION", }, "capacity_scaler": { Type: schema.TypeFloat, Optional: true, - Default: 1.0, + Description: `A multiplier applied to the group's maximum servicing capacity +(based on UTILIZATION, RATE or CONNECTION). + +Default value is 1, which means the group will serve up to 100% +of its configured capacity (depending on balancingMode). A +setting of 0 means the group is completely drained, offering +0% of its available Capacity. Valid range is [0.0,1.0].`, + Default: 1.0, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. +Provide this property when you create the resource.`, }, "group": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The fully-qualified URL of an Instance Group or Network Endpoint +Group resource. In case of instance group this defines the list +of instances that serve traffic. Member virtual machine +instances from each instance group must live in the same zone as +the instance group itself. No two backends in a backend service +are allowed to use same Instance Group resource. + +For Network Endpoint Groups this defines list of endpoints. All +endpoints of Network Endpoint Group must be hosted on instances +located in the same zone as the Network Endpoint Group. + +Backend services cannot mix Instance Group and +Network Endpoint Group backends. + +Note that you must specify an Instance Group or Network Endpoint +Group resource using the fully-qualified URL, rather than a +partial URL.`, }, "max_connections": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections for the group. Can +be used with either CONNECTION or UTILIZATION balancing modes. + +For CONNECTION mode, either maxConnections or one +of maxConnectionsPerInstance or maxConnectionsPerEndpoint, +as appropriate for group type, must be set.`, }, "max_connections_per_endpoint": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections that a single backend +network endpoint can handle. This is used to calculate the +capacity of the group. Can be used in either CONNECTION or +UTILIZATION balancing modes. + +For CONNECTION mode, either +maxConnections or maxConnectionsPerEndpoint must be set.`, }, "max_connections_per_instance": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections that a single +backend instance can handle. This is used to calculate the +capacity of the group. Can be used in either CONNECTION or +UTILIZATION balancing modes. + +For CONNECTION mode, either maxConnections or +maxConnectionsPerInstance must be set.`, }, "max_rate": { Type: schema.TypeInt, Optional: true, + Description: `The max requests per second (RPS) of the group. + +Can be used with either RATE or UTILIZATION balancing modes, +but required if RATE mode. For RATE mode, either maxRate or one +of maxRatePerInstance or maxRatePerEndpoint, as appropriate for +group type, must be set.`, }, "max_rate_per_endpoint": { Type: schema.TypeFloat, Optional: true, + Description: `The max requests per second (RPS) that a single backend network +endpoint can handle. This is used to calculate the capacity of +the group. Can be used in either balancing mode. For RATE mode, +either maxRate or maxRatePerEndpoint must be set.`, }, "max_rate_per_instance": { Type: schema.TypeFloat, Optional: true, + Description: `The max requests per second (RPS) that a single backend +instance can handle. This is used to calculate the capacity of +the group. Can be used in either balancing mode. For RATE mode, +either maxRate or maxRatePerInstance must be set.`, }, "max_utilization": { Type: schema.TypeFloat, Optional: true, - Default: 0.8, + Description: `Used when balancingMode is UTILIZATION. This ratio defines the +CPU utilization target for the group. The default is 0.8. Valid +range is [0.0, 1.0].`, + Default: 0.8, }, }, } diff --git a/google/resource_compute_backend_service_signed_url_key.go b/google/resource_compute_backend_service_signed_url_key.go index 28912de9988..5c45c504e9d 100644 --- a/google/resource_compute_backend_service_signed_url_key.go +++ b/google/resource_compute_backend_service_signed_url_key.go @@ -41,11 +41,14 @@ func resourceComputeBackendServiceSignedUrlKey() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend service this signed URL key belongs.`, }, "key_value": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `128-bit key value used for signing the URL. The key value must be a +valid RFC 4648 Section 5 base64url encoded string.`, Sensitive: true, }, "name": { @@ -53,6 +56,7 @@ func resourceComputeBackendServiceSignedUrlKey() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$`), + Description: `Name of the signed URL key.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_disk.go b/google/resource_compute_disk.go index 3439fc2a196..44c27e7c7e1 100644 --- a/google/resource_compute_disk.go +++ b/google/resource_compute_disk.go @@ -248,16 +248,37 @@ func resourceComputeDisk() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "disk_encryption_key": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Encrypts the disk using a customer-supplied encryption key. + +After you encrypt a disk with a customer-supplied key, you must +provide the same key if you use the disk later (e.g. to create a disk +snapshot or an image, or to attach the disk to a virtual machine). + +Customer-supplied encryption keys do not protect access to metadata of +the disk. + +If you do not provide an encryption key when creating the disk, then +the disk will be encrypted using an automatically generated key and +you do not need to provide a key to use the disk later.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -266,15 +287,23 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The self link of the encryption key used to encrypt the disk. Also called KmsKeyName +in the cloud console. In order to use this additional +IAM permissions need to be set on the Compute Engine Service Agent. See +https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys`, }, "raw_key": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, @@ -284,33 +313,67 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: diskImageDiffSuppress, + Description: `The image from which to initialize this disk. This can be +one of: the image's 'self_link', 'projects/{project}/global/images/{image}', +'projects/{project}/global/images/family/{family}', 'global/images/{image}', +'global/images/family/{family}', 'family/{family}', '{project}/{family}', +'{project}/{image}', '{family}', or '{image}'. If referred by family, the +images names must include the family name. If they don't, use the +[google_compute_image data source](/docs/providers/google/d/datasource_compute_image.html). +For instance, the image 'centos-6-v20180104' includes its family name 'centos-6'. +These images can be referred by family name here.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Labels to apply to this disk. A list of key->value pairs.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "physical_block_size_bytes": { Type: schema.TypeInt, Computed: true, Optional: true, ForceNew: true, + Description: `Physical block size of the persistent disk, in bytes. If not present +in a request, a default value is used. Currently supported sizes +are 4096 and 16384, other sizes may be added in the future. +If an unsupported value is requested, the error message will list +the supported values for the caller's project.`, }, "size": { Type: schema.TypeInt, Computed: true, Optional: true, + Description: `Size of the persistent disk, specified in GB. You can specify this +field when creating a persistent disk using the 'image' or +'snapshot' parameter, or specify it alone to create an empty +persistent disk. + +If you specify this field along with 'image' or 'snapshot', +the value must not be less than the size of the image +or the size of the snapshot.`, }, "snapshot": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The source snapshot used to create this disk. You can provide this as +a partial or full URL to the resource. If the snapshot is in another +project than this disk, you must supply a full URL. For example, the +following are valid values: + +* 'https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot' +* 'projects/project/global/snapshots/snapshot' +* 'global/snapshots/snapshot' +* 'snapshot'`, }, "source_image_encryption_key": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The customer-supplied encryption key of the source image. Required if +the source image is protected by a customer-supplied encryption key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -319,15 +382,23 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The self link of the encryption key used to encrypt the disk. Also called KmsKeyName +in the cloud console. In order to use this additional +IAM permissions need to be set on the Compute Engine Service Agent. See +https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys`, }, "raw_key": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, @@ -336,6 +407,9 @@ func resourceComputeDisk() *schema.Resource { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The customer-supplied encryption key of the source snapshot. Required +if the source snapshot is protected by a customer-supplied encryption +key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -344,15 +418,23 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The self link of the encryption key used to encrypt the disk. Also called KmsKeyName +in the cloud console. In order to use this additional +IAM permissions need to be set on the Compute Engine Service Agent. See +https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys`, }, "raw_key": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, @@ -362,7 +444,9 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, - Default: "pd-standard", + Description: `URL of the disk type resource describing which disk type to use to +create the disk. Provide this when creating the disk.`, + Default: "pd-standard", }, "zone": { Type: schema.TypeString, @@ -370,34 +454,53 @@ func resourceComputeDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the zone where the disk resides.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "label_fingerprint": { Type: schema.TypeString, Computed: true, + Description: `The fingerprint used for optimistic locking of this resource. Used +internally during updates.`, }, "last_attach_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Last attach timestamp in RFC3339 text format.`, }, "last_detach_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Last detach timestamp in RFC3339 text format.`, }, "source_image_id": { Type: schema.TypeString, Computed: true, + Description: `The ID value of the image used to create this disk. This value +identifies the exact image that was used to create this persistent +disk. For example, if you created the persistent disk from an image +that was later deleted and recreated under the same name, the source +image ID would identify the exact version of the image that was used.`, }, "source_snapshot_id": { Type: schema.TypeString, Computed: true, + Description: `The unique ID of the snapshot used to create this disk. This value +identifies the exact snapshot that was used to create this persistent +disk. For example, if you created the persistent disk from a snapshot +that was later deleted and recreated under the same name, the source +snapshot ID would identify the exact version of the snapshot that was +used.`, }, "users": { Type: schema.TypeList, Computed: true, + Description: `Links to the users of the disk (attached instances) in form: +project/zones/zone/instances/instance`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, diff --git a/google/resource_compute_disk_resource_policy_attachment.go b/google/resource_compute_disk_resource_policy_attachment.go index 3a6535399a4..9bcad0acfd0 100644 --- a/google/resource_compute_disk_resource_policy_attachment.go +++ b/google/resource_compute_disk_resource_policy_attachment.go @@ -45,11 +45,14 @@ func resourceComputeDiskResourcePolicyAttachment() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the disk in which the resource policies are attached to.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The resource policy to be attached to the disk for scheduling snapshot +creation. Do not specify the self link.`, }, "zone": { Type: schema.TypeString, @@ -57,6 +60,7 @@ func resourceComputeDiskResourcePolicyAttachment() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the zone where the disk resides.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_firewall.go b/google/resource_compute_firewall.go index 71d7ef58a30..7cdf838d30c 100644 --- a/google/resource_compute_firewall.go +++ b/google/resource_compute_firewall.go @@ -82,22 +82,35 @@ func resourceComputeFirewall() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name or self_link of the network to attach this firewall to.`, }, "allow": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Description: `The list of ALLOW rules specified by this firewall. Each rule +specifies a protocol and port-range tuple that describes a permitted +connection.`, Elem: computeFirewallAllowSchema(), Set: resourceComputeFirewallRuleHash, ConflictsWith: []string{"deny"}, }, "deny": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Description: `The list of DENY rules specified by this firewall. Each rule specifies +a protocol and port-range tuple that describes a denied connection.`, Elem: computeFirewallDenySchema(), Set: resourceComputeFirewallRuleHash, ConflictsWith: []string{"allow"}, @@ -105,11 +118,16 @@ func resourceComputeFirewall() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "destination_ranges": { Type: schema.TypeSet, Computed: true, Optional: true, + Description: `If destination ranges are specified, the firewall will apply only to +traffic that has destination IP address in these ranges. These ranges +must be expressed in CIDR format. Only IPv4 is supported.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -122,21 +140,43 @@ func resourceComputeFirewall() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"INGRESS", "EGRESS", ""}, false), + Description: `Direction of traffic to which this firewall applies; default is +INGRESS. Note: For INGRESS traffic, it is NOT supported to specify +destinationRanges; For EGRESS traffic, it is NOT supported to specify +sourceRanges OR sourceTags.`, }, "disabled": { Type: schema.TypeBool, Optional: true, + Description: `Denotes whether the firewall rule is disabled, i.e not applied to the +network it is associated with. When set to true, the firewall rule is +not enforced and the network behaves as if it did not exist. If this +is unspecified, the firewall rule will be enabled.`, }, "priority": { Type: schema.TypeInt, Optional: true, ValidateFunc: validation.IntBetween(0, 65535), - Default: 1000, + Description: `Priority for this rule. This is an integer between 0 and 65535, both +inclusive. When not specified, the value assumed is 1000. Relative +priorities determine precedence of conflicting rules. Lower value of +priority implies higher precedence (eg, a rule with priority 0 has +higher precedence than a rule with priority 1). DENY rules take +precedence over ALLOW rules having equal priority.`, + Default: 1000, }, "source_ranges": { Type: schema.TypeSet, Computed: true, Optional: true, + Description: `If source ranges are specified, the firewall will apply only to +traffic that has source IP address in these ranges. These ranges must +be expressed in CIDR format. One or both of sourceRanges and +sourceTags may be set. If both properties are set, the firewall will +apply to traffic that has source IP address within sourceRanges OR the +source IP that belongs to a tag listed in the sourceTags property. The +connection does not need to match both properties for the firewall to +apply. Only IPv4 is supported.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -146,6 +186,17 @@ func resourceComputeFirewall() *schema.Resource { "source_service_accounts": { Type: schema.TypeSet, Optional: true, + Description: `If source service accounts are specified, the firewall will apply only +to traffic originating from an instance with a service account in this +list. Source service accounts cannot be used to control traffic to an +instance's external IP address because service accounts are associated +with an instance, not an IP address. sourceRanges can be set at the +same time as sourceServiceAccounts. If both are set, the firewall will +apply to traffic that has source IP address within sourceRanges OR the +source IP belongs to an instance with service account listed in +sourceServiceAccount. The connection does not need to match both +properties for the firewall to apply. sourceServiceAccounts cannot be +used at the same time as sourceTags or targetTags.`, MaxItems: 10, Elem: &schema.Schema{ Type: schema.TypeString, @@ -156,6 +207,15 @@ func resourceComputeFirewall() *schema.Resource { "source_tags": { Type: schema.TypeSet, Optional: true, + Description: `If source tags are specified, the firewall will apply only to traffic +with source IP that belongs to a tag listed in source tags. Source +tags cannot be used to control traffic to an instance's external IP +address. Because tags are associated with an instance, not an IP +address. One or both of sourceRanges and sourceTags may be set. If +both properties are set, the firewall will apply to traffic that has +source IP address within sourceRanges OR the source IP that belongs to +a tag listed in the sourceTags property. The connection does not need +to match both properties for the firewall to apply.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -165,6 +225,12 @@ func resourceComputeFirewall() *schema.Resource { "target_service_accounts": { Type: schema.TypeSet, Optional: true, + Description: `A list of service accounts indicating sets of instances located in the +network that may make network connections as specified in allowed[]. +targetServiceAccounts cannot be used at the same time as targetTags or +sourceTags. If neither targetServiceAccounts nor targetTags are +specified, the firewall rule applies to all instances on the specified +network.`, MaxItems: 10, Elem: &schema.Schema{ Type: schema.TypeString, @@ -175,6 +241,10 @@ func resourceComputeFirewall() *schema.Resource { "target_tags": { Type: schema.TypeSet, Optional: true, + Description: `A list of instance tags indicating sets of instances located in the +network that may make network connections as specified in allowed[]. +If no targetTags are specified, the firewall rule applies to all +instances on the specified network.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -182,8 +252,9 @@ func resourceComputeFirewall() *schema.Resource { ConflictsWith: []string{"source_service_accounts", "target_service_accounts"}, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, @@ -206,10 +277,21 @@ func computeFirewallAllowSchema() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareCaseInsensitive, + Description: `The IP protocol to which this rule applies. The protocol type is +required when creating a firewall rule. This value can either be +one of the following well known protocol strings (tcp, udp, +icmp, esp, ah, sctp), or the IP protocol number.`, }, "ports": { Type: schema.TypeList, Optional: true, + Description: `An optional list of ports to which this rule applies. This field +is only applicable for UDP or TCP protocol. Each entry must be +either an integer or a range. If not specified, this rule +applies to connections through any port. + +Example inputs include: ["22"], ["80","443"], and +["12345-12349"].`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -225,10 +307,21 @@ func computeFirewallDenySchema() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareCaseInsensitive, + Description: `The IP protocol to which this rule applies. The protocol type is +required when creating a firewall rule. This value can either be +one of the following well known protocol strings (tcp, udp, +icmp, esp, ah, sctp), or the IP protocol number.`, }, "ports": { Type: schema.TypeList, Optional: true, + Description: `An optional list of ports to which this rule applies. This field +is only applicable for UDP or TCP protocol. Each entry must be +either an integer or a range. If not specified, this rule +applies to connections through any port. + +Example inputs include: ["22"], ["80","443"], and +["12345-12349"].`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google/resource_compute_forwarding_rule.go b/google/resource_compute_forwarding_rule.go index c2830ab8e50..354f822f9b7 100644 --- a/google/resource_compute_forwarding_rule.go +++ b/google/resource_compute_forwarding_rule.go @@ -48,12 +48,47 @@ func resourceComputeForwardingRule() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource; provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "ip_address": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The IP address that this forwarding rule is serving on behalf of. + +Addresses are restricted based on the forwarding rule's load balancing +scheme (EXTERNAL or INTERNAL) and scope (global or regional). + +When the load balancing scheme is EXTERNAL, for global forwarding +rules, the address must be a global IP, and for regional forwarding +rules, the address must live in the same region as the forwarding +rule. If this field is empty, an ephemeral IPv4 address from the same +scope (global or regional) will be assigned. A regional forwarding +rule supports IPv4 only. A global forwarding rule supports either IPv4 +or IPv6. + +When the load balancing scheme is INTERNAL, this can only be an RFC +1918 IP address belonging to the network/subnet configured for the +forwarding rule. By default, if this field is empty, an ephemeral +internal IP address will be automatically allocated from the IP range +of the subnet or network configured for this forwarding rule. + +~> **NOTE** The address should be specified as a literal IP address, +e.g. '100.1.2.3' to avoid a permanent diff, as the server returns the +IP address regardless of the input value. + +The server accepts a literal IP address or a URL reference to an existing +Address resource. The following examples are all valid but only the first +will prevent a permadiff. If you are using 'google_compute_address' or +similar, interpolate using '.address' instead of '.self_link' or similar +to prevent a diff on re-apply.`, }, "ip_protocol": { Type: schema.TypeString, @@ -62,22 +97,36 @@ func resourceComputeForwardingRule() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"TCP", "UDP", "ESP", "AH", "SCTP", "ICMP", ""}, false), DiffSuppressFunc: caseDiffSuppress, + Description: `The IP protocol to which this rule applies. Valid options are TCP, +UDP, ESP, AH, SCTP or ICMP. + +When the load balancing scheme is INTERNAL, only TCP and UDP are +valid.`, }, "all_ports": { Type: schema.TypeBool, Optional: true, ForceNew: true, + Description: `For internal TCP/UDP load balancing (i.e. load balancing scheme is +INTERNAL and protocol is TCP/UDP), set this to true to allow packets +addressed to any ports to be forwarded to the backends configured +with this forwarding rule. Used with backend service. Cannot be set +if port or portRange are set.`, }, "backend_service": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A BackendService to receive the matched traffic. This is used only +for INTERNAL load balancing.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "ip_version": { Type: schema.TypeString, @@ -85,13 +134,21 @@ func resourceComputeForwardingRule() *schema.Resource { Deprecated: "ipVersion is not used for regional forwarding rules. Please remove this field if you are using it.", ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false), + Description: `ipVersion is not a valid field for regional forwarding rules.`, }, "load_balancing_scheme": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", "INTERNAL", "INTERNAL_MANAGED", ""}, false), - Default: "EXTERNAL", + Description: `This signifies what the ForwardingRule will be used for and can be +EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic +Cloud VPN gateways, protocol forwarding to VMs from an external IP address, +and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. +INTERNAL is used for protocol forwarding to VMs from an internal IP address, +and internal TCP/UDP load balancers. +INTERNAL_MANAGED is used for internal HTTP(S) load balancers.`, + Default: "EXTERNAL", }, "network": { Type: schema.TypeString, @@ -99,6 +156,10 @@ func resourceComputeForwardingRule() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `For internal load balancing, this field identifies the network that +the load balanced IP should belong to for this Forwarding Rule. If +this field is not specified, the default network will be used. +This field is only used for INTERNAL load balancing.`, }, "network_tier": { Type: schema.TypeString, @@ -106,17 +167,48 @@ func resourceComputeForwardingRule() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD", ""}, false), + Description: `The networking tier used for configuring this address. This field can +take the following values: PREMIUM or STANDARD. If this field is not +specified, it is assumed to be PREMIUM.`, }, "port_range": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: portRangeDiffSuppress, + Description: `This field is used along with the target field for TargetHttpProxy, +TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, +TargetPool, TargetInstance. + +Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets +addressed to ports in the specified range will be forwarded to target. +Forwarding rules with the same [IPAddress, IPProtocol] pair must have +disjoint port ranges. + +Some types of forwarding target have constraints on the acceptable +ports: + +* TargetHttpProxy: 80, 8080 +* TargetHttpsProxy: 443 +* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, + 1883, 5222 +* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, + 1883, 5222 +* TargetVpnGateway: 500, 4500`, }, "ports": { Type: schema.TypeSet, Optional: true, ForceNew: true, + Description: `This field is used along with the backend_service field for internal +load balancing. + +When the load balancing scheme is INTERNAL, a single port or a comma +separated list of ports can be configured. Only packets addressed to +these ports will be forwarded to the backends configured with this +forwarding rule. + +You may specify a maximum of up to 5 ports.`, MaxItems: 5, Elem: &schema.Schema{ Type: schema.TypeString, @@ -129,12 +221,26 @@ func resourceComputeForwardingRule() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the region where the regional forwarding rule resides. +This field is not applicable to global forwarding rules.`, }, "service_label": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `An optional prefix to the service name for this Forwarding Rule. +If specified, will be the first label of the fully qualified service +name. + +The label must be 1-63 characters long, and comply with RFC1035. +Specifically, the label must be 1-63 characters long and match the +regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the first +character must be a lowercase letter, and all following characters +must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash. + +This field is only used for INTERNAL load balancing.`, }, "subnetwork": { Type: schema.TypeString, @@ -142,19 +248,33 @@ func resourceComputeForwardingRule() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The subnetwork that the load balanced IP should belong to for this +Forwarding Rule. This field is only used for INTERNAL load balancing. + +If the network specified is in auto subnet mode, this field is +optional. However, if the network is in custom subnet mode, a +subnetwork must be specified.`, }, "target": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `This field is only used for EXTERNAL load balancing. +A reference to a TargetPool resource to receive the matched traffic. +This target must live in the same region as the forwarding rule. +The forwarded traffic must be of a type appropriate to the target +object.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "service_name": { Type: schema.TypeString, Computed: true, + Description: `The internal fully qualified service name for this Forwarding Rule. +This field is only used for INTERNAL load balancing.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_global_address.go b/google/resource_compute_global_address.go index 10eba4b392b..6021f6dd5dc 100644 --- a/google/resource_compute_global_address.go +++ b/google/resource_compute_global_address.go @@ -46,12 +46,22 @@ func resourceComputeGlobalAddress() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "address": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The IP address or beginning of the address range represented by this +resource. This can be supplied as an input to reserve a specific +address or omitted to allow GCP to choose a valid one for you.`, }, "address_type": { Type: schema.TypeString, @@ -59,12 +69,17 @@ func resourceComputeGlobalAddress() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", "INTERNAL", ""}, false), DiffSuppressFunc: emptyOrDefaultStringSuppress("EXTERNAL"), - Default: "EXTERNAL", + Description: `The type of the address to reserve, default is EXTERNAL. + +* EXTERNAL indicates public/external single IP address. +* INTERNAL indicates internal IP ranges belonging to some network.`, + Default: "EXTERNAL", }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "ip_version": { Type: schema.TypeString, @@ -72,27 +87,44 @@ func resourceComputeGlobalAddress() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false), DiffSuppressFunc: emptyOrDefaultStringSuppress("IPV4"), + Description: `The IP Version that will be used by this address. Valid options are +'IPV4' or 'IPV6'. The default value is 'IPV4'.`, }, "network": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The URL of the network in which to reserve the IP range. The IP range +must be in RFC1918 space. The network cannot be deleted if there are +any reserved IP ranges referring to it. + +This should only be set when using an Internal address.`, }, "prefix_length": { Type: schema.TypeInt, Optional: true, ForceNew: true, + Description: `The prefix length of the IP range. If not present, it means the +address field is a single IP address. + +This field is not applicable to addresses with addressType=EXTERNAL.`, }, "purpose": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"VPC_PEERING", ""}, false), + Description: `The purpose of the resource. For global internal addresses it can be + +* VPC_PEERING - for peer networks + +This should only be set when using an Internal address.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_global_forwarding_rule.go b/google/resource_compute_global_forwarding_rule.go index 264f7e1cbc5..ee947f78e21 100644 --- a/google/resource_compute_global_forwarding_rule.go +++ b/google/resource_compute_global_forwarding_rule.go @@ -47,17 +47,56 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource; provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "target": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The URL of the target resource to receive the matched traffic. +The forwarded traffic must be of a type appropriate to the target object. +For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets +are valid.`, }, "ip_address": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The IP address that this forwarding rule is serving on behalf of. + +Addresses are restricted based on the forwarding rule's load balancing +scheme (EXTERNAL or INTERNAL) and scope (global or regional). + +When the load balancing scheme is EXTERNAL, for global forwarding +rules, the address must be a global IP, and for regional forwarding +rules, the address must live in the same region as the forwarding +rule. If this field is empty, an ephemeral IPv4 address from the same +scope (global or regional) will be assigned. A regional forwarding +rule supports IPv4 only. A global forwarding rule supports either IPv4 +or IPv6. + +When the load balancing scheme is INTERNAL, this can only be an RFC +1918 IP address belonging to the network/subnet configured for the +forwarding rule. By default, if this field is empty, an ephemeral +internal IP address will be automatically allocated from the IP range +of the subnet or network configured for this forwarding rule. + +~> **NOTE** The address should be specified as a literal IP address, +e.g. '100.1.2.3' to avoid a permanent diff, as the server returns the +IP address regardless of the input value. + +The server accepts a literal IP address or a URL reference to an existing +Address resource. The following examples are all valid but only the first +will prevent a permadiff. If you are using 'google_compute_address' or +similar, interpolate using '.address' instead of '.self_link' or similar +to prevent a diff on re-apply.`, }, "ip_protocol": { Type: schema.TypeString, @@ -66,35 +105,71 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"TCP", "UDP", "ESP", "AH", "SCTP", "ICMP", ""}, false), DiffSuppressFunc: caseDiffSuppress, + Description: `The IP protocol to which this rule applies. Valid options are TCP, +UDP, ESP, AH, SCTP or ICMP. When the load balancing scheme is +INTERNAL_SELF_MANAGED, only TCP is valid.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "ip_version": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false), + Description: `The IP Version that will be used by this global forwarding rule. +Valid options are IPV4 or IPV6.`, }, "load_balancing_scheme": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", "INTERNAL_SELF_MANAGED", ""}, false), - Default: "EXTERNAL", + Description: `This signifies what the GlobalForwardingRule will be used for. +The value of INTERNAL_SELF_MANAGED means that this will be used for +Internal Global HTTP(S) LB. The value of EXTERNAL means that this +will be used for External Global Load Balancing (HTTP(S) LB, +External TCP/UDP LB, SSL Proxy) + +NOTE: Currently global forwarding rules cannot be used for INTERNAL +load balancing.`, + Default: "EXTERNAL", }, "metadata_filters": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Opaque filter criteria used by Loadbalancer to restrict routing +configuration to a limited set xDS compliant clients. In their xDS +requests to Loadbalancer, xDS clients present node metadata. If a +match takes place, the relevant routing configuration is made available +to those proxies. + +For each metadataFilter in this list, if its filterMatchCriteria is set +to MATCH_ANY, at least one of the filterLabels must match the +corresponding label provided in the metadata. If its filterMatchCriteria +is set to MATCH_ALL, then all of its filterLabels must match with +corresponding labels in the provided metadata. + +metadataFilters specified here can be overridden by those specified in +the UrlMap that this ForwardingRule references. + +metadataFilters only applies to Loadbalancers that have their +loadBalancingScheme set to INTERNAL_SELF_MANAGED.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "filter_labels": { Type: schema.TypeList, Required: true, ForceNew: true, + Description: `The list of label value pairs that must match labels in the +provided metadata based on filterMatchCriteria + +This list must not be empty and can have at the most 64 entries.`, MinItems: 1, MaxItems: 64, Elem: &schema.Resource{ @@ -103,11 +178,15 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the metadata label. The length must be between +1 and 1024 characters, inclusive.`, }, "value": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The value that the label must match. The value has a maximum +length of 1024 characters.`, }, }, }, @@ -117,6 +196,13 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"MATCH_ANY", "MATCH_ALL"}, false), + Description: `Specifies how individual filterLabel matches within the list of +filterLabels contribute towards the overall metadataFilter match. + +MATCH_ANY - At least one of the filterLabels must have a matching +label in the provided metadata. +MATCH_ALL - All filterLabels must have matching labels in the +provided metadata.`, }, }, }, @@ -126,6 +212,25 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: portRangeDiffSuppress, + Description: `This field is used along with the target field for TargetHttpProxy, +TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, +TargetPool, TargetInstance. + +Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets +addressed to ports in the specified range will be forwarded to target. +Forwarding rules with the same [IPAddress, IPProtocol] pair must have +disjoint port ranges. + +Some types of forwarding target have constraints on the acceptable +ports: + +* TargetHttpProxy: 80, 8080 +* TargetHttpsProxy: 443 +* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, + 1883, 5222 +* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, + 1883, 5222 +* TargetVpnGateway: 500, 4500`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_health_check.go b/google/resource_compute_health_check.go index a311b3d8dbb..f803fa78fef 100644 --- a/google/resource_compute_health_check.go +++ b/google/resource_compute_health_check.go @@ -133,59 +133,101 @@ func resourceComputeHealthCheck() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "check_interval_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How often (in seconds) to send a health check. The default value is 5 +seconds.`, + Default: 5, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "healthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far unhealthy instance will be marked healthy after this many +consecutive successes. The default value is 2.`, + Default: 2, }, "http2_health_check": { Type: schema.TypeList, Optional: true, DiffSuppressFunc: portDiffSuppress, + Description: `A nested object resource`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "host": { Type: schema.TypeString, Optional: true, + Description: `The value of the host header in the HTTP2 health check request. +If left empty (default value), the public IP on behalf of which this health +check is performed will be used.`, }, "port": { Type: schema.TypeInt, Optional: true, + Description: `The TCP port number for the HTTP2 health check request. +The default value is 443.`, }, "port_name": { Type: schema.TypeString, Optional: true, + Description: `Port name as defined in InstanceGroup#NamedPort#name. If both port and +port_name are defined, port takes precedence.`, }, "port_specification": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT", ""}, false), + Description: `Specifies how port is selected for health checking, can be one of the +following values: + + * 'USE_FIXED_PORT': The port number in 'port' is used for health checking. + + * 'USE_NAMED_PORT': The 'portName' is used for health checking. + + * 'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health + checking. + +If not specified, HTTP2 health check follows behavior specified in 'port' and +'portName' fields.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to the +backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "request_path": { Type: schema.TypeString, Optional: true, - Default: "/", + Description: `The request path of the HTTP2 health check request. +The default value is /.`, + Default: "/", }, "response": { Type: schema.TypeString, Optional: true, + Description: `The bytes to match against the beginning of the response data. If left empty +(the default value), any response will indicate health. The response data +can only be ASCII.`, }, }, }, @@ -195,40 +237,69 @@ func resourceComputeHealthCheck() *schema.Resource { Type: schema.TypeList, Optional: true, DiffSuppressFunc: portDiffSuppress, + Description: `A nested object resource`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "host": { Type: schema.TypeString, Optional: true, + Description: `The value of the host header in the HTTP health check request. +If left empty (default value), the public IP on behalf of which this health +check is performed will be used.`, }, "port": { Type: schema.TypeInt, Optional: true, + Description: `The TCP port number for the HTTP health check request. +The default value is 80.`, }, "port_name": { Type: schema.TypeString, Optional: true, + Description: `Port name as defined in InstanceGroup#NamedPort#name. If both port and +port_name are defined, port takes precedence.`, }, "port_specification": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT", ""}, false), + Description: `Specifies how port is selected for health checking, can be one of the +following values: + + * 'USE_FIXED_PORT': The port number in 'port' is used for health checking. + + * 'USE_NAMED_PORT': The 'portName' is used for health checking. + + * 'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health + checking. + +If not specified, HTTP health check follows behavior specified in 'port' and +'portName' fields.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to the +backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "request_path": { Type: schema.TypeString, Optional: true, - Default: "/", + Description: `The request path of the HTTP health check request. +The default value is /.`, + Default: "/", }, "response": { Type: schema.TypeString, Optional: true, + Description: `The bytes to match against the beginning of the response data. If left empty +(the default value), any response will indicate health. The response data +can only be ASCII.`, }, }, }, @@ -238,40 +309,69 @@ func resourceComputeHealthCheck() *schema.Resource { Type: schema.TypeList, Optional: true, DiffSuppressFunc: portDiffSuppress, + Description: `A nested object resource`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "host": { Type: schema.TypeString, Optional: true, + Description: `The value of the host header in the HTTPS health check request. +If left empty (default value), the public IP on behalf of which this health +check is performed will be used.`, }, "port": { Type: schema.TypeInt, Optional: true, + Description: `The TCP port number for the HTTPS health check request. +The default value is 443.`, }, "port_name": { Type: schema.TypeString, Optional: true, + Description: `Port name as defined in InstanceGroup#NamedPort#name. If both port and +port_name are defined, port takes precedence.`, }, "port_specification": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT", ""}, false), + Description: `Specifies how port is selected for health checking, can be one of the +following values: + + * 'USE_FIXED_PORT': The port number in 'port' is used for health checking. + + * 'USE_NAMED_PORT': The 'portName' is used for health checking. + + * 'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health + checking. + +If not specified, HTTPS health check follows behavior specified in 'port' and +'portName' fields.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to the +backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "request_path": { Type: schema.TypeString, Optional: true, - Default: "/", + Description: `The request path of the HTTPS health check request. +The default value is /.`, + Default: "/", }, "response": { Type: schema.TypeString, Optional: true, + Description: `The bytes to match against the beginning of the response data. If left empty +(the default value), any response will indicate health. The response data +can only be ASCII.`, }, }, }, @@ -281,35 +381,63 @@ func resourceComputeHealthCheck() *schema.Resource { Type: schema.TypeList, Optional: true, DiffSuppressFunc: portDiffSuppress, + Description: `A nested object resource`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "port": { Type: schema.TypeInt, Optional: true, + Description: `The TCP port number for the SSL health check request. +The default value is 443.`, }, "port_name": { Type: schema.TypeString, Optional: true, + Description: `Port name as defined in InstanceGroup#NamedPort#name. If both port and +port_name are defined, port takes precedence.`, }, "port_specification": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT", ""}, false), + Description: `Specifies how port is selected for health checking, can be one of the +following values: + + * 'USE_FIXED_PORT': The port number in 'port' is used for health checking. + + * 'USE_NAMED_PORT': The 'portName' is used for health checking. + + * 'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health + checking. + +If not specified, SSL health check follows behavior specified in 'port' and +'portName' fields.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to the +backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "request": { Type: schema.TypeString, Optional: true, + Description: `The application data to send once the SSL connection has been +established (default value is empty). If both request and response are +empty, the connection establishment alone will indicate health. The request +data can only be ASCII.`, }, "response": { Type: schema.TypeString, Optional: true, + Description: `The bytes to match against the beginning of the response data. If left empty +(the default value), any response will indicate health. The response data +can only be ASCII.`, }, }, }, @@ -319,35 +447,63 @@ func resourceComputeHealthCheck() *schema.Resource { Type: schema.TypeList, Optional: true, DiffSuppressFunc: portDiffSuppress, + Description: `A nested object resource`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "port": { Type: schema.TypeInt, Optional: true, + Description: `The TCP port number for the TCP health check request. +The default value is 443.`, }, "port_name": { Type: schema.TypeString, Optional: true, + Description: `Port name as defined in InstanceGroup#NamedPort#name. If both port and +port_name are defined, port takes precedence.`, }, "port_specification": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT", ""}, false), + Description: `Specifies how port is selected for health checking, can be one of the +following values: + + * 'USE_FIXED_PORT': The port number in 'port' is used for health checking. + + * 'USE_NAMED_PORT': The 'portName' is used for health checking. + + * 'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health + checking. + +If not specified, TCP health check follows behavior specified in 'port' and +'portName' fields.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to the +backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "request": { Type: schema.TypeString, Optional: true, + Description: `The application data to send once the TCP connection has been +established (default value is empty). If both request and response are +empty, the connection establishment alone will indicate health. The request +data can only be ASCII.`, }, "response": { Type: schema.TypeString, Optional: true, + Description: `The bytes to match against the beginning of the response data. If left empty +(the default value), any response will indicate health. The response data +can only be ASCII.`, }, }, }, @@ -356,20 +512,27 @@ func resourceComputeHealthCheck() *schema.Resource { "timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How long (in seconds) to wait before claiming failure. +The default value is 5 seconds. It is invalid for timeoutSec to have +greater value than checkIntervalSec.`, + Default: 5, }, "unhealthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far healthy instance will be marked unhealthy after this many +consecutive failures. The default value is 2.`, + Default: 2, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "type": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The type of the health check. One of HTTP, HTTPS, TCP, or SSL.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_http_health_check.go b/google/resource_compute_http_health_check.go index 25ba8b08ca5..2e331dfcdae 100644 --- a/google/resource_compute_http_health_check.go +++ b/google/resource_compute_http_health_check.go @@ -47,48 +47,74 @@ func resourceComputeHttpHealthCheck() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "check_interval_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How often (in seconds) to send a health check. The default value is 5 +seconds.`, + Default: 5, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "healthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far unhealthy instance will be marked healthy after this many +consecutive successes. The default value is 2.`, + Default: 2, }, "host": { Type: schema.TypeString, Optional: true, + Description: `The value of the host header in the HTTP health check request. If +left empty (default value), the public IP on behalf of which this +health check is performed will be used.`, }, "port": { Type: schema.TypeInt, Optional: true, - Default: 80, + Description: `The TCP port number for the HTTP health check request. +The default value is 80.`, + Default: 80, }, "request_path": { Type: schema.TypeString, Optional: true, - Default: "/", + Description: `The request path of the HTTP health check request. +The default value is /.`, + Default: "/", }, "timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How long (in seconds) to wait before claiming failure. +The default value is 5 seconds. It is invalid for timeoutSec to have +greater value than checkIntervalSec.`, + Default: 5, }, "unhealthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far healthy instance will be marked unhealthy after this many +consecutive failures. The default value is 2.`, + Default: 2, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_https_health_check.go b/google/resource_compute_https_health_check.go index f8c313b1bec..a90603598e3 100644 --- a/google/resource_compute_https_health_check.go +++ b/google/resource_compute_https_health_check.go @@ -47,48 +47,74 @@ func resourceComputeHttpsHealthCheck() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "check_interval_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How often (in seconds) to send a health check. The default value is 5 +seconds.`, + Default: 5, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "healthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far unhealthy instance will be marked healthy after this many +consecutive successes. The default value is 2.`, + Default: 2, }, "host": { Type: schema.TypeString, Optional: true, + Description: `The value of the host header in the HTTPS health check request. If +left empty (default value), the public IP on behalf of which this +health check is performed will be used.`, }, "port": { Type: schema.TypeInt, Optional: true, - Default: 443, + Description: `The TCP port number for the HTTPS health check request. +The default value is 80.`, + Default: 443, }, "request_path": { Type: schema.TypeString, Optional: true, - Default: "/", + Description: `The request path of the HTTPS health check request. +The default value is /.`, + Default: "/", }, "timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 5, + Description: `How long (in seconds) to wait before claiming failure. +The default value is 5 seconds. It is invalid for timeoutSec to have +greater value than checkIntervalSec.`, + Default: 5, }, "unhealthy_threshold": { Type: schema.TypeInt, Optional: true, - Default: 2, + Description: `A so-far healthy instance will be marked unhealthy after this many +consecutive failures. The default value is 2.`, + Default: 2, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_image.go b/google/resource_compute_image.go index 537d442a51f..f491a2be6bb 100644 --- a/google/resource_compute_image.go +++ b/google/resource_compute_image.go @@ -48,69 +48,98 @@ func resourceComputeImage() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource; provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "disk_size_gb": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - ForceNew: true, + Type: schema.TypeInt, + Computed: true, + Optional: true, + ForceNew: true, + Description: `Size of the image when restored onto a persistent disk (in GB).`, }, "family": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The name of the image family to which this image belongs. You can +create disks by specifying an image family instead of a specific +image name. The image family always returns its latest image that is +not deprecated. The name of the image family must comply with +RFC1035.`, }, "guest_os_features": { Type: schema.TypeSet, Computed: true, Optional: true, ForceNew: true, - Elem: computeImageGuestOsFeaturesSchema(), + Description: `A list of features to enable on the guest operating system. +Applicable only for bootable images.`, + Elem: computeImageGuestOsFeaturesSchema(), // Default schema.HashSchema is used. }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Labels to apply to this Image.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "licenses": { - Type: schema.TypeList, - Computed: true, - Optional: true, - ForceNew: true, + Type: schema.TypeList, + Computed: true, + Optional: true, + ForceNew: true, + Description: `Any applicable license URI.`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, }, }, "raw_disk": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The parameters of the raw disk image.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "source": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The full Google Cloud Storage URL where disk storage is stored +You must provide either this property or the sourceDisk property +but not both.`, }, "container_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"TAR", ""}, false), - Default: "TAR", + Description: `The format used to encode and transmit the block device, which +should be TAR. This is just a container and transmission format +and not a runtime format. Provided by the client when the disk +image is created.`, + Default: "TAR", }, "sha1": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional SHA1 checksum of the disk image before unpackaging. +This is provided by the client when the disk image is created.`, }, }, }, @@ -120,18 +149,26 @@ func resourceComputeImage() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The source disk to create this image based on. +You must provide either this property or the +rawDisk.source property but not both to create an image.`, }, "archive_size_bytes": { Type: schema.TypeInt, Computed: true, + Description: `Size of the image tar.gz archive stored in Google Cloud Storage (in +bytes).`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "label_fingerprint": { Type: schema.TypeString, Computed: true, + Description: `The fingerprint used for optimistic locking of this resource. Used +internally during updates.`, }, "project": { Type: schema.TypeString, @@ -155,6 +192,7 @@ func computeImageGuestOsFeaturesSchema() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"MULTI_IP_SUBNET", "SECURE_BOOT", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", ""}, false), + Description: `The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options.`, }, }, } diff --git a/google/resource_compute_interconnect_attachment.go b/google/resource_compute_interconnect_attachment.go index 2a56b912f60..7a5e6bee75a 100644 --- a/google/resource_compute_interconnect_attachment.go +++ b/google/resource_compute_interconnect_attachment.go @@ -47,17 +47,29 @@ func resourceComputeInterconnectAttachment() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^[a-z]([-a-z0-9]*[a-z0-9])?$`), + Description: `Name of the resource. Provided by the client when the resource is created. The +name must be 1-63 characters long, and comply with RFC1035. Specifically, the +name must be 1-63 characters long and match the regular expression +'[a-z]([-a-z0-9]*[a-z0-9])?' which means the first character must be a +lowercase letter, and all following characters must be a dash, lowercase +letter, or digit, except the last character, which cannot be a dash.`, }, "router": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the cloud router to be used for dynamic routing. This router must be in +the same region as this InterconnectAttachment. The InterconnectAttachment will +automatically connect the Interconnect to the network & region within which the +Cloud Router is configured.`, }, "admin_enabled": { Type: schema.TypeBool, Optional: true, ForceNew: true, + Description: `Whether the VLAN attachment is enabled or disabled. When using +PARTNER type this will Pre-Activate the interconnect attachment`, }, "bandwidth": { Type: schema.TypeString, @@ -65,30 +77,52 @@ func resourceComputeInterconnectAttachment() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"BPS_50M", "BPS_100M", "BPS_200M", "BPS_300M", "BPS_400M", "BPS_500M", "BPS_1G", "BPS_2G", "BPS_5G", "BPS_10G", "BPS_20G", "BPS_50G", ""}, false), + Description: `Provisioned bandwidth capacity for the interconnect attachment. +For attachments of type DEDICATED, the user can set the bandwidth. +For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. +Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, +Defaults to BPS_10G`, }, "candidate_subnets": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Up to 16 candidate prefixes that can be used to restrict the allocation +of cloudRouterIpAddress and customerRouterIpAddress for this attachment. +All prefixes must be within link-local address space (169.254.0.0/16) +and must be /29 or shorter (/28, /27, etc). Google will attempt to select +an unused /29 from the supplied candidate prefix(es). The request will +fail if all possible /29s are in use on Google's edge. If not supplied, +Google will randomly select an unused /29 from all of link-local space.`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "edge_availability_domain": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Desired availability domain for the attachment. Only available for type +PARTNER, at creation time. For improved reliability, customers should +configure a pair of attachments with one per availability domain. The +selected availability domain will be provided to the Partner via the +pairing key so that the provisioned circuit will lie in the specified +domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.`, }, "interconnect": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the underlying Interconnect object that this attachment's +traffic will traverse through. Required if type is DEDICATED, must not +be set if type is PARTNER.`, }, "region": { Type: schema.TypeString, @@ -96,6 +130,7 @@ func resourceComputeInterconnectAttachment() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Region where the regional interconnect attachment resides.`, }, "type": { Type: schema.TypeString, @@ -103,53 +138,75 @@ func resourceComputeInterconnectAttachment() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"DEDICATED", "PARTNER", "PARTNER_PROVIDER", ""}, false), + Description: `The type of InterconnectAttachment you wish to create. Defaults to +DEDICATED.`, }, "vlan_tag8021q": { Type: schema.TypeInt, Computed: true, Optional: true, ForceNew: true, + Description: `The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When +using PARTNER type this will be managed upstream.`, }, "cloud_router_ip_address": { Type: schema.TypeString, Computed: true, + Description: `IPv4 address + prefix length to be configured on Cloud Router +Interface for this interconnect attachment.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "customer_router_ip_address": { Type: schema.TypeString, Computed: true, + Description: `IPv4 address + prefix length to be configured on the customer +router subinterface for this interconnect attachment.`, }, "google_reference_id": { Type: schema.TypeString, Computed: true, + Description: `Google reference ID, to be used when raising support tickets with +Google or otherwise to debug backend connectivity issues.`, }, "pairing_key": { Type: schema.TypeString, Computed: true, + Description: `[Output only for type PARTNER. Not present for DEDICATED]. The opaque +identifier of an PARTNER attachment used to initiate provisioning with +a selected partner. Of the form "XXXXX/region/domain"`, }, "partner_asn": { Type: schema.TypeString, Computed: true, + Description: `[Output only for type PARTNER. Not present for DEDICATED]. Optional +BGP ASN for the router that should be supplied by a layer 3 Partner if +they configured BGP on behalf of the customer.`, }, "private_interconnect_info": { Type: schema.TypeList, Computed: true, + Description: `Information specific to an InterconnectAttachment. This property +is populated if the interconnect that this is attached to is of type DEDICATED.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "tag8021q": { Type: schema.TypeInt, Computed: true, + Description: `802.1q encapsulation tag to be used for traffic between +Google and the customer, going to and from this network and region.`, }, }, }, }, "state": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `[Output Only] The current state of this attachment's functionality.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_network.go b/google/resource_compute_network.go index 30f7705471a..49ef0d3347f 100644 --- a/google/resource_compute_network.go +++ b/google/resource_compute_network.go @@ -47,34 +47,64 @@ func resourceComputeNetwork() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "auto_create_subnetworks": { Type: schema.TypeBool, Optional: true, ForceNew: true, - Default: true, + Description: `When set to 'true', the network is created in "auto subnet mode" and +it will create a subnet for each region automatically across the +'10.128.0.0/9' address range. + +When set to 'false', the network is created in "custom subnet mode" so +the user can explicitly connect subnetwork resources.`, + Default: true, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. The resource must be +recreated to modify this field.`, }, "ipv4_range": { Type: schema.TypeString, Optional: true, Deprecated: "Legacy Networks are deprecated and you will no longer be able to create them using this field from Feb 1, 2020 onwards.", ForceNew: true, + Description: `If this field is specified, a deprecated legacy network is created. +You will no longer be able to create a legacy network on Feb 1, 2020. +See the [legacy network docs](https://cloud.google.com/vpc/docs/legacy) +for more details. + +The range of internal addresses that are legal on this legacy network. +This range is a CIDR specification, for example: '192.168.0.0/16'. +The resource must be recreated to modify this field.`, }, "routing_mode": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"REGIONAL", "GLOBAL", ""}, false), + Description: `The network-wide routing mode to use. If set to 'REGIONAL', this +network's cloud routers will only advertise routes with subnetworks +of this network in the same region as the router. If set to 'GLOBAL', +this network's cloud routers will advertise routes with all +subnetworks of this network, across regions.`, }, "gateway_ipv4": { Type: schema.TypeString, Computed: true, + Description: `The gateway address for default routing out of the network. This value +is selected by GCP.`, }, "delete_default_routes_on_create": { Type: schema.TypeBool, diff --git a/google/resource_compute_network_endpoint.go b/google/resource_compute_network_endpoint.go index badc3d811ff..7969c721c04 100644 --- a/google/resource_compute_network_endpoint.go +++ b/google/resource_compute_network_endpoint.go @@ -45,22 +45,30 @@ func resourceComputeNetworkEndpoint() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name for a specific VM instance that the IP address belongs to. +This is required for network endpoints of type GCE_VM_IP_PORT. +The instance must be in the same zone of network endpoint group.`, }, "ip_address": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `IPv4 address of network endpoint. The IP address must belong +to a VM in GCE (either the primary IP or as part of an aliased IP +range).`, }, "network_endpoint_group": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The network endpoint group this endpoint is part of.`, }, "port": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `Port number of network endpoint.`, }, "zone": { Type: schema.TypeString, @@ -68,6 +76,7 @@ func resourceComputeNetworkEndpoint() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Zone where the containing network endpoint group is located.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_network_endpoint_group.go b/google/resource_compute_network_endpoint_group.go index 08491f50cba..a50fea189c3 100644 --- a/google/resource_compute_network_endpoint_group.go +++ b/google/resource_compute_network_endpoint_group.go @@ -47,35 +47,51 @@ func resourceComputeNetworkEndpointGroup() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource; provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The network to which all network endpoints in the NEG belong. +Uses "default" project network if unspecified.`, }, "default_port": { Type: schema.TypeInt, Optional: true, ForceNew: true, + Description: `The default port used if the port number is not specified in the +network endpoint.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "network_endpoint_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"GCE_VM_IP_PORT", ""}, false), - Default: "GCE_VM_IP_PORT", + Description: `Type of network endpoints in this network endpoint group. Currently +the only supported value is GCE_VM_IP_PORT.`, + Default: "GCE_VM_IP_PORT", }, "subnetwork": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Optional subnetwork to which all network endpoints in the NEG belong.`, }, "zone": { Type: schema.TypeString, @@ -83,10 +99,12 @@ func resourceComputeNetworkEndpointGroup() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Zone where the network endpoint group is located.`, }, "size": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `Number of network endpoints in the network endpoint group.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_node_group.go b/google/resource_compute_node_group.go index 61a7261a55d..18473441335 100644 --- a/google/resource_compute_node_group.go +++ b/google/resource_compute_node_group.go @@ -47,21 +47,25 @@ func resourceComputeNodeGroup() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The URL of the node template to which this node group belongs.`, }, "size": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `The total number of nodes in the node group.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional textual description of the resource.`, }, "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Name of the resource.`, }, "zone": { Type: schema.TypeString, @@ -69,10 +73,12 @@ func resourceComputeNodeGroup() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Zone where this node group is located`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_node_template.go b/google/resource_compute_node_template.go index fa309e4e410..84652a89a19 100644 --- a/google/resource_compute_node_template.go +++ b/google/resource_compute_node_template.go @@ -41,47 +41,60 @@ func resourceComputeNodeTemplate() *schema.Resource { Schema: map[string]*schema.Schema{ "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional textual description of the resource.`, }, "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Name of the resource.`, }, "node_affinity_labels": { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `Labels to use for node affinity, which will be used in +instance scheduling.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "node_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Node type to use for nodes group that are created from this template. +Only one of nodeTypeFlexibility and nodeType can be specified.`, ConflictsWith: []string{"node_type_flexibility"}, }, "node_type_flexibility": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Flexible properties for the desired node type. Node groups that +use this node template will create nodes of a type that matches +these properties. Only one of nodeTypeFlexibility and nodeType can +be specified.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpus": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Number of virtual CPUs to use.`, }, "memory": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Physical memory available to the node, defined in MB.`, }, "local_ssd": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Use local SSD`, }, }, }, @@ -93,10 +106,13 @@ func resourceComputeNodeTemplate() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Region where nodes using the node template will be created. +If it is not provided, the provider region is used.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_region_autoscaler.go b/google/resource_compute_region_autoscaler.go index 6fe7b8ce1ee..c01c3fcda2f 100644 --- a/google/resource_compute_region_autoscaler.go +++ b/google/resource_compute_region_autoscaler.go @@ -47,45 +47,89 @@ func resourceComputeRegionAutoscaler() *schema.Resource { "autoscaling_policy": { Type: schema.TypeList, Required: true, + Description: `The configuration parameters for the autoscaling algorithm. You can +define one or more of the policies for an autoscaler: cpuUtilization, +customMetricUtilizations, and loadBalancingUtilization. + +If none of these are specified, the default will be to autoscale based +on cpuUtilization to 0.6 or 60%.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "max_replicas": { Type: schema.TypeInt, Required: true, + Description: `The maximum number of instances that the autoscaler can scale up +to. This is required when creating or updating an autoscaler. The +maximum number of replicas should not be lower than minimal number +of replicas.`, }, "min_replicas": { Type: schema.TypeInt, Required: true, + Description: `The minimum number of replicas that the autoscaler can scale down +to. This cannot be less than 0. If not provided, autoscaler will +choose a default value depending on maximum number of instances +allowed.`, }, "cooldown_period": { Type: schema.TypeInt, Optional: true, - Default: 60, + Description: `The number of seconds that the autoscaler should wait before it +starts collecting information from a new instance. This prevents +the autoscaler from collecting information when the instance is +initializing, during which the collected usage would not be +reliable. The default time autoscaler waits is 60 seconds. + +Virtual machine initialization times might vary because of +numerous factors. We recommend that you test how long an +instance may take to initialize. To do this, create an instance +and time the startup process.`, + Default: 60, }, "cpu_utilization": { Type: schema.TypeList, Computed: true, Optional: true, + Description: `Defines the CPU utilization policy that allows the autoscaler to +scale based on the average CPU utilization of a managed instance +group.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "target": { Type: schema.TypeFloat, Required: true, + Description: `The target CPU utilization that the autoscaler should maintain. +Must be a float value in the range (0, 1]. If not specified, the +default is 0.6. + +If the CPU level is below the target utilization, the autoscaler +scales down the number of instances until it reaches the minimum +number of instances you specified or until the average CPU of +your instances reaches the target utilization. + +If the average CPU is above the target utilization, the autoscaler +scales up until it reaches the maximum number of instances you +specified or until the average utilization reaches the target +utilization.`, }, }, }, }, "load_balancing_utilization": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Configuration parameters of autoscaling based on a load balancer.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "target": { Type: schema.TypeFloat, Required: true, + Description: `Fraction of backend capacity utilization (set in HTTP(s) load +balancing configuration) that autoscaler should maintain. Must +be a positive float value. If not defined, the default is 0.8.`, }, }, }, @@ -93,20 +137,39 @@ func resourceComputeRegionAutoscaler() *schema.Resource { "metric": { Type: schema.TypeList, Optional: true, + Description: `Defines the CPU utilization policy that allows the autoscaler to +scale based on the average CPU utilization of a managed instance +group.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, Required: true, + Description: `The identifier (type) of the Stackdriver Monitoring metric. +The metric cannot have negative values. + +The metric must have a value type of INT64 or DOUBLE.`, }, "target": { Type: schema.TypeFloat, Optional: true, + Description: `The target value of the metric that autoscaler should +maintain. This must be a positive value. A utilization +metric scales number of virtual machines handling requests +to increase or decrease proportionally to the metric. + +For example, a good metric to use as a utilizationTarget is +www.googleapis.com/compute/instance/network/received_bytes_count. +The autoscaler will work to keep this value constant for each +of the instances.`, }, "type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"GAUGE", "DELTA_PER_SECOND", "DELTA_PER_MINUTE", ""}, false), + Description: `Defines how target utilization value is expressed for a +Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, +or DELTA_PER_MINUTE.`, }, }, }, @@ -119,15 +182,22 @@ func resourceComputeRegionAutoscaler() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource. The name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "target": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the managed instance group that this autoscaler will scale.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "region": { Type: schema.TypeString, @@ -135,10 +205,12 @@ func resourceComputeRegionAutoscaler() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the region where the instance group resides.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_region_backend_service.go b/google/resource_compute_region_backend_service.go index a9a917ba7ac..1dace9cc30c 100644 --- a/google/resource_compute_region_backend_service.go +++ b/google/resource_compute_region_backend_service.go @@ -55,6 +55,9 @@ func resourceComputeRegionBackendService() *schema.Resource { "health_checks": { Type: schema.TypeSet, Required: true, + Description: `The set of URLs to HealthCheck resources for health checking +this RegionBackendService. Currently at most one health +check can be specified, and a health check is required.`, MinItems: 1, MaxItems: 1, Elem: &schema.Schema{ @@ -66,60 +69,88 @@ func resourceComputeRegionBackendService() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "backend": { - Type: schema.TypeSet, - Optional: true, - Elem: computeRegionBackendServiceBackendSchema(), - Set: resourceGoogleComputeBackendServiceBackendHash, + Type: schema.TypeSet, + Optional: true, + Description: `The set of backends that serve this RegionBackendService.`, + Elem: computeRegionBackendServiceBackendSchema(), + Set: resourceGoogleComputeBackendServiceBackendHash, }, "connection_draining_timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 0, + Description: `Time for which instance will be drained (not accept new +connections, but still work to finish started).`, + Default: 0, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "load_balancing_scheme": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"INTERNAL", "INTERNAL_MANAGED", ""}, false), - Default: "INTERNAL", + Description: `Indicates what kind of load balancing this regional backend service +will be used for. A backend service created for one type of load +balancing cannot be used with the other(s). Must be 'INTERNAL' or +'INTERNAL_MANAGED'. Defaults to 'INTERNAL'.`, + Default: "INTERNAL", }, "protocol": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"HTTP", "HTTPS", "HTTP2", "SSL", "TCP", "UDP", ""}, false), + Description: `The protocol this RegionBackendService uses to communicate with backends. +Possible values are HTTP, HTTPS, HTTP2, SSL, TCP, and UDP. The default is +HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer +types and may result in errors if used with the GA API.`, }, "region": { Type: schema.TypeString, Computed: true, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The Region in which the created backend service should reside. +If it is not provided, the provider region is used.`, }, "session_affinity": { Type: schema.TypeString, Computed: true, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "CLIENT_IP", "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", "HEADER_FIELD", "HTTP_COOKIE", ""}, false), + Description: `Type of session affinity to use. The default is NONE. Session affinity is +not applicable if the protocol is UDP.`, }, "timeout_sec": { Type: schema.TypeInt, Computed: true, Optional: true, + Description: `How many seconds to wait for the backend before considering it a +failed request. Default is 30 seconds. Valid range is [1, 86400].`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "fingerprint": { Type: schema.TypeString, Computed: true, + Description: `Fingerprint of this resource. A hash of the contents stored in this +object. This field is used in optimistic locking.`, }, "project": { Type: schema.TypeString, @@ -142,49 +173,113 @@ func computeRegionBackendServiceBackendSchema() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The fully-qualified URL of an Instance Group or Network Endpoint +Group resource. In case of instance group this defines the list +of instances that serve traffic. Member virtual machine +instances from each instance group must live in the same zone as +the instance group itself. No two backends in a backend service +are allowed to use same Instance Group resource. + +For Network Endpoint Groups this defines list of endpoints. All +endpoints of Network Endpoint Group must be hosted on instances +located in the same zone as the Network Endpoint Group. + +Backend services cannot mix Instance Group and +Network Endpoint Group backends. + +When the 'load_balancing_scheme' is INTERNAL, only instance groups +are supported. + +Note that you must specify an Instance Group or Network Endpoint +Group resource using the fully-qualified URL, rather than a +partial URL.`, }, "balancing_mode": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"UTILIZATION", "RATE", "CONNECTION", ""}, false), + Description: `Specifies the balancing mode for this backend. Defaults to CONNECTION.`, Default: "CONNECTION", }, "capacity_scaler": { Type: schema.TypeFloat, Computed: true, Optional: true, + Description: `A multiplier applied to the group's maximum servicing capacity +(based on UTILIZATION, RATE or CONNECTION). + +A setting of 0 means the group is completely drained, offering +0% of its available Capacity. Valid range is [0.0,1.0].`, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. +Provide this property when you create the resource.`, }, "max_connections": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections for the group. Can +be used with either CONNECTION or UTILIZATION balancing modes. + +For CONNECTION mode, either maxConnections or one +of maxConnectionsPerInstance or maxConnectionsPerEndpoint, +as appropriate for group type, must be set.`, }, "max_connections_per_endpoint": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections that a single backend +network endpoint can handle. This is used to calculate the +capacity of the group. Can be used in either CONNECTION or +UTILIZATION balancing modes. + +For CONNECTION mode, either +maxConnections or maxConnectionsPerEndpoint must be set.`, }, "max_connections_per_instance": { Type: schema.TypeInt, Optional: true, + Description: `The max number of simultaneous connections that a single +backend instance can handle. This is used to calculate the +capacity of the group. Can be used in either CONNECTION or +UTILIZATION balancing modes. + +For CONNECTION mode, either maxConnections or +maxConnectionsPerInstance must be set.`, }, "max_rate": { Type: schema.TypeInt, Optional: true, + Description: `The max requests per second (RPS) of the group. + +Can be used with either RATE or UTILIZATION balancing modes, +but required if RATE mode. Either maxRate or one +of maxRatePerInstance or maxRatePerEndpoint, as appropriate for +group type, must be set.`, }, "max_rate_per_endpoint": { Type: schema.TypeFloat, Optional: true, + Description: `The max requests per second (RPS) that a single backend network +endpoint can handle. This is used to calculate the capacity of +the group. Can be used in either balancing mode. For RATE mode, +either maxRate or maxRatePerEndpoint must be set.`, }, "max_rate_per_instance": { Type: schema.TypeFloat, Optional: true, + Description: `The max requests per second (RPS) that a single backend +instance can handle. This is used to calculate the capacity of +the group. Can be used in either balancing mode. For RATE mode, +either maxRate or maxRatePerInstance must be set.`, }, "max_utilization": { Type: schema.TypeFloat, Optional: true, + Description: `Used when balancingMode is UTILIZATION. This ratio defines the +CPU utilization target for the group. Valid range is [0.0, 1.0].`, }, }, } diff --git a/google/resource_compute_region_disk.go b/google/resource_compute_region_disk.go index e9b3c08e09b..ca6d628b0bd 100644 --- a/google/resource_compute_region_disk.go +++ b/google/resource_compute_region_disk.go @@ -53,13 +53,21 @@ func resourceComputeRegionDisk() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "replica_zones": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MinItems: 2, - MaxItems: 2, + Type: schema.TypeList, + Required: true, + ForceNew: true, + Description: `URLs of the zones where the disk should be replicated to.`, + MinItems: 2, + MaxItems: 2, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, @@ -69,11 +77,25 @@ func resourceComputeRegionDisk() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "disk_encryption_key": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `Encrypts the disk using a customer-supplied encryption key. + +After you encrypt a disk with a customer-supplied key, you must +provide the same key if you use the disk later (e.g. to create a disk +snapshot or an image, or to attach the disk to a virtual machine). + +Customer-supplied encryption keys do not protect access to metadata of +the disk. + +If you do not provide an encryption key when creating the disk, then +the disk will be encrypted using an automatically generated key and +you do not need to provide a key to use the disk later.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -81,24 +103,34 @@ func resourceComputeRegionDisk() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Labels to apply to this disk. A list of key->value pairs.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "physical_block_size_bytes": { Type: schema.TypeInt, Computed: true, Optional: true, ForceNew: true, + Description: `Physical block size of the persistent disk, in bytes. If not present +in a request, a default value is used. Currently supported sizes +are 4096 and 16384, other sizes may be added in the future. +If an unsupported value is requested, the error message will list +the supported values for the caller's project.`, }, "region": { Type: schema.TypeString, @@ -106,22 +138,42 @@ func resourceComputeRegionDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the region where the disk resides.`, }, "size": { Type: schema.TypeInt, Computed: true, Optional: true, + Description: `Size of the persistent disk, specified in GB. You can specify this +field when creating a persistent disk using the sourceImage or +sourceSnapshot parameter, or specify it alone to create an empty +persistent disk. + +If you specify this field along with sourceImage or sourceSnapshot, +the value of sizeGb must not be less than the size of the sourceImage +or the size of the snapshot.`, }, "snapshot": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The source snapshot used to create this disk. You can provide this as +a partial or full URL to the resource. For example, the following are +valid values: + +* 'https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot' +* 'projects/project/global/snapshots/snapshot' +* 'global/snapshots/snapshot' +* 'snapshot'`, }, "source_snapshot_encryption_key": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The customer-supplied encryption key of the source snapshot. Required +if the source snapshot is protected by a customer-supplied encryption +key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -129,10 +181,14 @@ func resourceComputeRegionDisk() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, @@ -142,31 +198,46 @@ func resourceComputeRegionDisk() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, - Default: "pd-standard", + Description: `URL of the disk type resource describing which disk type to use to +create the disk. Provide this when creating the disk.`, + Default: "pd-standard", }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "label_fingerprint": { Type: schema.TypeString, Computed: true, + Description: `The fingerprint used for optimistic locking of this resource. Used +internally during updates.`, }, "last_attach_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Last attach timestamp in RFC3339 text format.`, }, "last_detach_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Last detach timestamp in RFC3339 text format.`, }, "source_snapshot_id": { Type: schema.TypeString, Computed: true, + Description: `The unique ID of the snapshot used to create this disk. This value +identifies the exact snapshot that was used to create this persistent +disk. For example, if you created the persistent disk from a snapshot +that was later deleted and recreated under the same name, the source +snapshot ID would identify the exact version of the snapshot that was +used.`, }, "users": { Type: schema.TypeList, Computed: true, + Description: `Links to the users of the disk (attached instances) in form: +project/zones/zone/instances/instance`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, diff --git a/google/resource_compute_reservation.go b/google/resource_compute_reservation.go index 8709f62b90a..ced27a50f35 100644 --- a/google/resource_compute_reservation.go +++ b/google/resource_compute_reservation.go @@ -46,46 +46,65 @@ func resourceComputeReservation() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "specific_reservation": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Required: true, + ForceNew: true, + Description: `Reservation for instances with specific machine shapes.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "count": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `The number of resources that are allocated.`, }, "instance_properties": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Required: true, + ForceNew: true, + Description: `The instance properties for the reservation.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "machine_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the machine type to reserve.`, }, "guest_accelerators": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Guest accelerator type and count.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "accelerator_count": { Type: schema.TypeInt, Required: true, ForceNew: true, + Description: `The number of the guest accelerator cards exposed to +this instance.`, }, "accelerator_type": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The full or partial URL of the accelerator type to +attach to this instance. For example: +'projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100' + +If you are creating an instance template, specify only the accelerator name.`, }, }, }, @@ -94,19 +113,24 @@ func resourceComputeReservation() *schema.Resource { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The amount of local ssd to reserve with each instance. This +reserves disks of type 'local-ssd'.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "disk_size_gb": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `The size of the disk in base-2 GB.`, }, "interface": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"SCSI", "NVME", ""}, false), - Default: "SCSI", + Description: `The disk interface to use for attaching this disk, one +of 'SCSI' or 'NVME'. The default is 'SCSI'.`, + Default: "SCSI", }, }, }, @@ -116,13 +140,18 @@ func resourceComputeReservation() *schema.Resource { Computed: true, Optional: true, ForceNew: true, + Description: `The minimum CPU platform for the reservation. For example, +'"Intel Skylake"'. See +the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) +for information on available CPU platforms.`, }, }, }, }, "in_use_count": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `How many instances are in use.`, }, }, }, @@ -132,29 +161,38 @@ func resourceComputeReservation() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The zone where the reservation is made.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "specific_reservation_required": { Type: schema.TypeBool, Optional: true, ForceNew: true, - Default: false, + Description: `When set to true, only VMs that target this reservation by name can +consume this reservation. Otherwise, it can be consumed by VMs with +affinity for any reservation. Defaults to false.`, + Default: false, }, "commitment": { Type: schema.TypeString, Computed: true, + Description: `Full or partial URL to a parent commitment. This field displays for +reservations that are tied to a commitment.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "status": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The status of the reservation.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_resource_policy.go b/google/resource_compute_resource_policy.go index d7271b80406..8b9b02c977e 100644 --- a/google/resource_compute_resource_policy.go +++ b/google/resource_compute_resource_policy.go @@ -46,6 +46,13 @@ func resourceComputeResourcePolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The name of the resource, provided by the client when initially creating +the resource. The resource name must be 1-63 characters long, and comply +with RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])'? which means the +first character must be a lowercase letter, and all following characters +must be a dash, lowercase letter, or digit, except the last character, +which cannot be a dash.`, }, "region": { Type: schema.TypeString, @@ -53,75 +60,90 @@ func resourceComputeResourcePolicy() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Region where resource policy resides.`, }, "snapshot_schedule_policy": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Policy for creating snapshots of persistent disks.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "schedule": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Required: true, + ForceNew: true, + Description: `Contains one of an 'hourlySchedule', 'dailySchedule', or 'weeklySchedule'.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "daily_schedule": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The policy will execute every nth day at the specified time.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "days_in_cycle": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `The number of days between snapshots.`, }, "start_time": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `This must be in UTC format that resolves to one of +00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, +both 13:00-5 and 08:00 are valid.`, }, }, }, }, "hourly_schedule": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The policy will execute every nth hour starting at the specified time.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "hours_in_cycle": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `The number of hours between snapshots.`, }, "start_time": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Time within the window to start the operations. +It must be in format "HH:MM", +where HH : [00-23] and MM : [00-00] GMT.`, }, }, }, }, "weekly_schedule": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Allows specifying a snapshot time for each day of the week.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "day_of_weeks": { - Type: schema.TypeSet, - Required: true, - ForceNew: true, - MinItems: 1, - MaxItems: 7, - Elem: computeResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeksSchema(), + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Description: `May contain up to seven (one for each day of the week) snapshot times.`, + MinItems: 1, + MaxItems: 7, + Elem: computeResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeksSchema(), // Default schema.HashSchema is used. }, }, @@ -131,50 +153,59 @@ func resourceComputeResourcePolicy() *schema.Resource { }, }, "retention_policy": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Retention policy applied to snapshots created by this resource policy.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "max_retention_days": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, + Type: schema.TypeInt, + Required: true, + ForceNew: true, + Description: `Maximum age of the snapshot that is allowed to be kept.`, }, "on_source_disk_delete": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"KEEP_AUTO_SNAPSHOTS", "APPLY_RETENTION_POLICY", ""}, false), - Default: "KEEP_AUTO_SNAPSHOTS", + Description: `Specifies the behavior to apply to scheduled snapshots when +the source disk is deleted. +Valid options are KEEP_AUTO_SNAPSHOTS and APPLY_RETENTION_POLICY`, + Default: "KEEP_AUTO_SNAPSHOTS", }, }, }, }, "snapshot_properties": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Properties with which the snapshots are created, such as labels.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "guest_flush": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Description: `Whether to perform a 'guest aware' snapshot.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Description: `A set of key-value pairs.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "storage_locations": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Description: `GCS bucket location in which to store the snapshot (regional or multi-regional).`, + MaxItems: 1, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -208,11 +239,14 @@ func computeResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeeks Required: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"}, false), + Description: `The day of the week to create the snapshot. e.g. MONDAY`, }, "start_time": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Time within the window to start the operations. +It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.`, }, }, } diff --git a/google/resource_compute_route.go b/google/resource_compute_route.go index 068ebcda3a2..11eedf4db9f 100644 --- a/google/resource_compute_route.go +++ b/google/resource_compute_route.go @@ -45,66 +45,102 @@ func resourceComputeRoute() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The destination range of outgoing packets that this route applies to. +Only IPv4 is supported.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^[a-z]([-a-z0-9]*[a-z0-9])?$`), + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the +last character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The network that this route applies to.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property +when you create the resource.`, }, "next_hop_gateway": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL to a gateway that should handle matching packets. +Currently, you can only specify the internet gateway, using a full or +partial valid URL: +* 'https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway' +* 'projects/project/global/gateways/default-internet-gateway' +* 'global/gateways/default-internet-gateway' +* The string 'default-internet-gateway'.`, }, "next_hop_instance": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL to an instance that should handle matching packets. +You can specify this as a full or partial URL. For example: +* 'https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance' +* 'projects/project/zones/zone/instances/instance' +* 'zones/zone/instances/instance' +* Just the instance name, with the zone in 'next_hop_instance_zone'.`, }, "next_hop_ip": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: `Network IP address of an instance that should handle matching packets.`, }, "next_hop_vpn_tunnel": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL to a VpnTunnel that should handle matching packets.`, }, "priority": { Type: schema.TypeInt, Optional: true, ForceNew: true, - Default: 1000, + Description: `The priority of this route. Priority is used to break ties in cases +where there is more than one matching route of equal prefix length. + +In the case of two routes with equal prefix length, the one with the +lowest-numbered priority value wins. + +Default value is 1000. Valid range is 0 through 65535.`, + Default: 1000, }, "tags": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Description: `A list of instance tags to which this route applies.`, Elem: &schema.Schema{ Type: schema.TypeString, }, Set: schema.HashString, }, "next_hop_network": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `URL to a Network that should handle matching packets.`, }, "next_hop_instance_zone": { Type: schema.TypeString, diff --git a/google/resource_compute_router.go b/google/resource_compute_router.go index b92765b3b51..bd21cbcf2d7 100644 --- a/google/resource_compute_router.go +++ b/google/resource_compute_router.go @@ -49,32 +49,54 @@ func resourceComputeRouter() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource. The name must be 1-63 characters long, and +comply with RFC1035. Specifically, the name must be 1-63 characters +long and match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' +which means the first character must be a lowercase letter, and all +following characters must be a dash, lowercase letter, or digit, +except the last character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the network to which this router belongs.`, }, "bgp": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `BGP information specific to this router.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "asn": { Type: schema.TypeInt, Required: true, + Description: `Local BGP Autonomous System Number (ASN). Must be an RFC6996 +private ASN, either 16-bit or 32-bit. The value will be fixed for +this router resource. All VPN tunnels that link to this router +will have the same local ASN.`, }, "advertise_mode": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"DEFAULT", "CUSTOM", ""}, false), - Default: "DEFAULT", + Description: `User-specified flag to indicate which mode to use for advertisement. + +Valid values of this enum field are: DEFAULT, CUSTOM`, + Default: "DEFAULT", }, "advertised_groups": { Type: schema.TypeList, Optional: true, + Description: `User-specified list of prefix groups to advertise in custom mode. +This field can only be populated if advertiseMode is CUSTOM and +is advertised to all peers of the router. These groups will be +advertised in addition to any specified prefixes. Leave this field +blank to advertise no custom groups. + +This enum field has the one valid value: ALL_SUBNETS`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -82,15 +104,23 @@ func resourceComputeRouter() *schema.Resource { "advertised_ip_ranges": { Type: schema.TypeList, Optional: true, + Description: `User-specified list of individual IP ranges to advertise in +custom mode. This field can only be populated if advertiseMode +is CUSTOM and is advertised to all peers of the router. These IP +ranges will be advertised in addition to any specified groups. +Leave this field blank to advertise no custom IP ranges.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `User-specified description for the IP range.`, }, "range": { Type: schema.TypeString, Optional: true, + Description: `The IP range to advertise. The value must be a +CIDR-formatted string.`, }, }, }, @@ -99,8 +129,9 @@ func resourceComputeRouter() *schema.Resource { }, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "region": { Type: schema.TypeString, @@ -108,10 +139,12 @@ func resourceComputeRouter() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Region where the router resides.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_router_nat.go b/google/resource_compute_router_nat.go index 9f623648f10..ed700b5039b 100644 --- a/google/resource_compute_router_nat.go +++ b/google/resource_compute_router_nat.go @@ -129,53 +129,77 @@ func resourceComputeRouterNat() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validateRFC1035Name(2, 63), + Description: `Name of the NAT service. The name must be 1-63 characters long and +comply with RFC1035.`, }, "nat_ip_allocate_option": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"MANUAL_ONLY", "AUTO_ONLY"}, false), + Description: `How external IPs should be allocated for this NAT. Valid values are +'AUTO_ONLY' for only allowing NAT IPs allocated by Google Cloud +Platform, or 'MANUAL_ONLY' for only user-allocated NAT IP addresses.`, }, "router": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the Cloud Router in which this NAT will be configured.`, }, "source_subnetwork_ip_ranges_to_nat": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", "LIST_OF_SUBNETWORKS"}, false), + Description: `How NAT should be configured per Subnetwork. +If 'ALL_SUBNETWORKS_ALL_IP_RANGES', all of the +IP ranges in every Subnetwork are allowed to Nat. +If 'ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES', all of the primary IP +ranges in every Subnetwork are allowed to Nat. +'LIST_OF_SUBNETWORKS': A list of Subnetworks are allowed to Nat +(specified in the field subnetwork below). Note that if this field +contains ALL_SUBNETWORKS_ALL_IP_RANGES or +ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any +other RouterNat section in any Router for this network in this region.`, }, "icmp_idle_timeout_sec": { - Type: schema.TypeInt, - Optional: true, - Default: 30, + Type: schema.TypeInt, + Optional: true, + Description: `Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.`, + Default: 30, }, "log_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Configuration for logging on NAT`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enable": { - Type: schema.TypeBool, - Required: true, + Type: schema.TypeBool, + Required: true, + Description: `Indicates whether or not to export logs.`, }, "filter": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"ERRORS_ONLY", "TRANSLATIONS_ONLY", "ALL"}, false), + Description: `Specifies the desired filtering of logs on this NAT. Valid +values are: '"ERRORS_ONLY"', '"TRANSLATIONS_ONLY"', '"ALL"'`, }, }, }, }, "min_ports_per_vm": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `Minimum number of ports allocated to a VM from this NAT.`, }, "nat_ips": { Type: schema.TypeSet, Optional: true, + Description: `Self-links of NAT IPs. Only valid if natIpAllocateOption +is set to MANUAL_ONLY.`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, @@ -188,27 +212,35 @@ func resourceComputeRouterNat() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Region where the router and NAT reside.`, }, "subnetwork": { Type: schema.TypeSet, Optional: true, - Elem: computeRouterNatSubnetworkSchema(), - Set: computeRouterNatSubnetworkHash, + Description: `One or more subnetwork NAT configurations. Only used if +'source_subnetwork_ip_ranges_to_nat' is set to 'LIST_OF_SUBNETWORKS'`, + Elem: computeRouterNatSubnetworkSchema(), + Set: computeRouterNatSubnetworkHash, }, "tcp_established_idle_timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 1200, + Description: `Timeout (in seconds) for TCP established connections. +Defaults to 1200s if not set.`, + Default: 1200, }, "tcp_transitory_idle_timeout_sec": { Type: schema.TypeInt, Optional: true, - Default: 30, + Description: `Timeout (in seconds) for TCP transitory connections. +Defaults to 30s if not set.`, + Default: 30, }, "udp_idle_timeout_sec": { - Type: schema.TypeInt, - Optional: true, - Default: 30, + Type: schema.TypeInt, + Optional: true, + Description: `Timeout (in seconds) for UDP connections. Defaults to 30s if not set.`, + Default: 30, }, "project": { Type: schema.TypeString, @@ -227,10 +259,15 @@ func computeRouterNatSubnetworkSchema() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Self-link of subnetwork to NAT`, }, "source_ip_ranges_to_nat": { Type: schema.TypeSet, Required: true, + Description: `List of options for which source IPs in the subnetwork +should have NAT enabled. Supported values include: +'ALL_IP_RANGES', 'LIST_OF_SECONDARY_IP_RANGES', +'PRIMARY_IP_RANGE'.`, MinItems: 1, Elem: &schema.Schema{ Type: schema.TypeString, @@ -240,6 +277,10 @@ func computeRouterNatSubnetworkSchema() *schema.Resource { "secondary_ip_range_names": { Type: schema.TypeSet, Optional: true, + Description: `List of the secondary ranges of the subnetwork that are allowed +to use NAT. This can be populated only if +'LIST_OF_SECONDARY_IP_RANGES' is one of the values in +sourceIpRangesToNat`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google/resource_compute_snapshot.go b/google/resource_compute_snapshot.go index db38522f831..eea0538102d 100644 --- a/google/resource_compute_snapshot.go +++ b/google/resource_compute_snapshot.go @@ -47,39 +47,55 @@ func resourceComputeSnapshot() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource; provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "source_disk": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the disk used to create this snapshot.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Labels to apply to this Snapshot.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "snapshot_encryption_key": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The customer-supplied encryption key of the snapshot. Required if the +source snapshot is protected by a customer-supplied encryption key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "raw_key": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, Sensitive: true, }, "sha256": { Type: schema.TypeString, Computed: true, + Description: `The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied +encryption key that protects this resource.`, }, }, }, @@ -88,13 +104,18 @@ func resourceComputeSnapshot() *schema.Resource { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The customer-supplied encryption key of the source snapshot. Required +if the source snapshot is protected by a customer-supplied encryption +key.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "raw_key": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Specifies a 256-bit customer-supplied encryption key, encoded in +RFC 4648 base64 to either encrypt or decrypt this resource.`, Sensitive: true, }, }, @@ -106,34 +127,47 @@ func resourceComputeSnapshot() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the zone where the disk is hosted.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "disk_size_gb": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `Size of the snapshot, specified in GB.`, }, "label_fingerprint": { Type: schema.TypeString, Computed: true, + Description: `The fingerprint used for optimistic locking of this resource. Used +internally during updates.`, }, "licenses": { Type: schema.TypeList, Computed: true, + Description: `A list of public visible licenses that apply to this snapshot. This +can be because the original image had licenses attached (such as a +Windows image). snapshotEncryptionKey nested object Encrypts the +snapshot using a customer-supplied encryption key.`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, }, }, "snapshot_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "storage_bytes": { Type: schema.TypeInt, Computed: true, + Description: `A size of the the storage used by the snapshot. As snapshots share +storage, this number is expected to change with snapshot +creation/deletion.`, }, "source_disk_link": { Type: schema.TypeString, diff --git a/google/resource_compute_ssl_certificate.go b/google/resource_compute_ssl_certificate.go index 34377ecee80..8761e663ca4 100644 --- a/google/resource_compute_ssl_certificate.go +++ b/google/resource_compute_ssl_certificate.go @@ -43,9 +43,12 @@ func resourceComputeSslCertificate() *schema.Resource { Schema: map[string]*schema.Schema{ "certificate": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The certificate in PEM format. +The certificate chain must be no greater than 5 certs long. +The chain must include at least one intermediate cert.`, Sensitive: true, }, "private_key": { @@ -53,12 +56,14 @@ func resourceComputeSslCertificate() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: sha256DiffSuppress, + Description: `The write-only private key in PEM format.`, Sensitive: true, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "name": { Type: schema.TypeString, @@ -66,14 +71,26 @@ func resourceComputeSslCertificate() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash. + + +These are in the same namespace as the managed SSL certificates.`, }, "certificate_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "name_prefix": { Type: schema.TypeString, diff --git a/google/resource_compute_ssl_policy.go b/google/resource_compute_ssl_policy.go index 7ce20f8e665..9b161a14eee 100644 --- a/google/resource_compute_ssl_policy.go +++ b/google/resource_compute_ssl_policy.go @@ -70,39 +70,73 @@ func resourceComputeSslPolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "custom_features": { Type: schema.TypeSet, Optional: true, + Description: `Profile specifies the set of SSL features that can be used by the +load balancer when negotiating SSL with clients. This can be one of +'COMPATIBLE', 'MODERN', 'RESTRICTED', or 'CUSTOM'. If using 'CUSTOM', +the set of SSL features to enable must be specified in the +'customFeatures' field. + +See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) +for which ciphers are available to use. **Note**: this argument +*must* be present when using the 'CUSTOM' profile. This argument +*must not* be present when using any other profile.`, Elem: &schema.Schema{ Type: schema.TypeString, }, Set: schema.HashString, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "min_tls_version": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"TLS_1_0", "TLS_1_1", "TLS_1_2", ""}, false), - Default: "TLS_1_0", + Description: `The minimum version of SSL protocol that can be used by the clients +to establish a connection with the load balancer. This can be one of +'TLS_1_0', 'TLS_1_1', 'TLS_1_2'. + Default is 'TLS_1_0'.`, + Default: "TLS_1_0", }, "profile": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"COMPATIBLE", "MODERN", "RESTRICTED", "CUSTOM", ""}, false), - Default: "COMPATIBLE", + Description: `Profile specifies the set of SSL features that can be used by the +load balancer when negotiating SSL with clients. This can be one of +'COMPATIBLE', 'MODERN', 'RESTRICTED', or 'CUSTOM'. If using 'CUSTOM', +the set of SSL features to enable must be specified in the +'customFeatures' field. + +See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport) +for information on what cipher suites each profile provides. If +'CUSTOM' is used, the 'custom_features' attribute **must be set**. +Default is 'COMPATIBLE'.`, + Default: "COMPATIBLE", }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "enabled_features": { - Type: schema.TypeSet, - Computed: true, + Type: schema.TypeSet, + Computed: true, + Description: `The list of features enabled in the SSL policy.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -111,6 +145,8 @@ func resourceComputeSslPolicy() *schema.Resource { "fingerprint": { Type: schema.TypeString, Computed: true, + Description: `Fingerprint of this resource. A hash of the contents stored in this +object. This field is used in optimistic locking.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_subnetwork.go b/google/resource_compute_subnetwork.go index 2d8e155139b..fbc95876daf 100644 --- a/google/resource_compute_subnetwork.go +++ b/google/resource_compute_subnetwork.go @@ -83,34 +83,53 @@ func resourceComputeSubnetwork() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validateIpCidrRange, + Description: `The range of internal addresses that are owned by this subnetwork. +Provide this property when you create the subnetwork. For example, +10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and +non-overlapping within a network. Only IPv4 is supported.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateGCPName, + Description: `The name of the resource, provided by the client when initially +creating the resource. The name must be 1-63 characters long, and +comply with RFC1035. Specifically, the name must be 1-63 characters +long and match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which +means the first character must be a lowercase letter, and all +following characters must be a dash, lowercase letter, or digit, +except the last character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The network this subnet belongs to. +Only networks that are in the distributed mode can have subnetworks.`, }, "description": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `An optional description of this resource. Provide this property when +you create the resource. This field can be set only at resource +creation time.`, }, "enable_flow_logs": { - Type: schema.TypeBool, - Computed: true, - Optional: true, - Deprecated: "This field is being removed in favor of log_config. If log_config is present, flow logs are enabled.", + Type: schema.TypeBool, + Computed: true, + Optional: true, + Deprecated: "This field is being removed in favor of log_config. If log_config is present, flow logs are enabled.", + Description: `Whether to enable flow logging for this subnetwork.`, }, "log_config": { Type: schema.TypeList, Computed: true, Optional: true, + Description: `Denotes the logging options for the subnetwork flow logs. If logging is enabled +logs will be exported to Stackdriver.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -118,18 +137,32 @@ func resourceComputeSubnetwork() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"INTERVAL_5_SEC", "INTERVAL_30_SEC", "INTERVAL_1_MIN", "INTERVAL_5_MIN", "INTERVAL_10_MIN", "INTERVAL_15_MIN", ""}, false), - Default: "INTERVAL_5_SEC", + Description: `Can only be specified if VPC flow logging for this subnetwork is enabled. +Toggles the aggregation interval for collecting flow logs. Increasing the +interval time will reduce the amount of generated flow logs for long +lasting connections. Default is an interval of 5 seconds per connection. +Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, +INTERVAL_5_MIN, INTERVAL_10_MIN, INTERVAL_15_MIN`, + Default: "INTERVAL_5_SEC", }, "flow_sampling": { Type: schema.TypeFloat, Optional: true, - Default: 0.5, + Description: `Can only be specified if VPC flow logging for this subnetwork is enabled. +The value of the field must be in [0, 1]. Set the sampling rate of VPC +flow logs within the subnetwork where 1.0 means all collected logs are +reported and 0.0 means no logs are reported. Default is 0.5 which means +half of all collected logs are reported.`, + Default: 0.5, }, "metadata": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA", ""}, false), - Default: "INCLUDE_ALL_METADATA", + Description: `Can only be specified if VPC flow logging for this subnetwork is enabled. +Configures whether metadata fields should be added to the reported VPC +flow logs. Default is 'INCLUDE_ALL_METADATA'.`, + Default: "INCLUDE_ALL_METADATA", }, }, }, @@ -137,6 +170,8 @@ func resourceComputeSubnetwork() *schema.Resource { "private_ip_google_access": { Type: schema.TypeBool, Optional: true, + Description: `When enabled, VMs in this subnetwork without external IP addresses can +access Google APIs and services by using Private Google Access.`, }, "region": { Type: schema.TypeString, @@ -144,38 +179,59 @@ func resourceComputeSubnetwork() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the GCP region for this subnetwork.`, }, "secondary_ip_range": { Type: schema.TypeList, Computed: true, Optional: true, ConfigMode: schema.SchemaConfigModeAttr, + Description: `An array of configurations for secondary IP ranges for VM instances +contained in this subnetwork. The primary IP of such VM must belong +to the primary ipCidrRange of the subnetwork. The alias IPs may belong +to either primary or secondary ranges. +This field uses attr-as-block mode to avoid breaking +users during the 0.12 upgrade. See [the Attr-as-Block page](https://www.terraform.io/docs/configuration/attr-as-blocks.html) +for more details.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ip_cidr_range": { Type: schema.TypeString, Required: true, ValidateFunc: validateIpCidrRange, + Description: `The range of IP addresses belonging to this subnetwork secondary +range. Provide this property when you create the subnetwork. +Ranges must be unique and non-overlapping with all primary and +secondary IP ranges within a network. Only IPv4 is supported.`, }, "range_name": { Type: schema.TypeString, Required: true, ValidateFunc: validateGCPName, + Description: `The name associated with this subnetwork secondary range, used +when adding an alias IP range to a VM instance. The name must +be 1-63 characters long, and comply with RFC1035. The name +must be unique within the subnetwork.`, }, }, }, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "fingerprint": { Type: schema.TypeString, Computed: true, + Description: `Fingerprint of this resource. This field is used internally during +updates of this resource.`, }, "gateway_address": { Type: schema.TypeString, Computed: true, + Description: `The gateway address for default routes to reach destination addresses +outside this subnetwork.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_target_http_proxy.go b/google/resource_compute_target_http_proxy.go index 5087ae7687d..f8f6dedf974 100644 --- a/google/resource_compute_target_http_proxy.go +++ b/google/resource_compute_target_http_proxy.go @@ -47,24 +47,36 @@ func resourceComputeTargetHttpProxy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "url_map": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the UrlMap resource that defines the mapping from URL +to the BackendService.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "proxy_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_target_https_proxy.go b/google/resource_compute_target_https_proxy.go index 9dd9c7596a3..f535993d0e2 100644 --- a/google/resource_compute_target_https_proxy.go +++ b/google/resource_compute_target_https_proxy.go @@ -48,10 +48,20 @@ func resourceComputeTargetHttpsProxy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "ssl_certificates": { Type: schema.TypeList, Required: true, + Description: `A list of SslCertificate resources that are used to authenticate +connections between users and the load balancer. Currently, exactly +one SSL certificate must be specified.`, Elem: &schema.Schema{ Type: schema.TypeString, DiffSuppressFunc: compareSelfLinkOrResourceName, @@ -61,30 +71,44 @@ func resourceComputeTargetHttpsProxy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the UrlMap resource that defines the mapping from URL +to the BackendService.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "quic_override": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "ENABLE", "DISABLE", ""}, false), - Default: "NONE", + Description: `Specifies the QUIC override policy for this resource. This determines +whether the load balancer will attempt to negotiate QUIC with clients +or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is +specified, uses the QUIC policy with no user overrides, which is +equivalent to DISABLE. Not specifying this field is equivalent to +specifying NONE.`, + Default: "NONE", }, "ssl_policy": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the SslPolicy resource that will be associated with +the TargetHttpsProxy resource. If not set, the TargetHttpsProxy +resource will not have any SSL policy configured.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "proxy_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_target_instance.go b/google/resource_compute_target_instance.go index dc441ad2c2d..57af1dea2e9 100644 --- a/google/resource_compute_target_instance.go +++ b/google/resource_compute_target_instance.go @@ -47,23 +47,39 @@ func resourceComputeTargetInstance() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The Compute instance VM handling traffic for this target instance. +Accepts the instance self-link, relative path +(e.g. 'projects/project/zones/zone/instances/instance') or name. If +name is given, the zone will default to the given zone or +the provider-default zone and the project will default to the +provider-level project.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "nat_policy": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"NO_NAT", ""}, false), - Default: "NO_NAT", + Description: `NAT option controlling how IPs are NAT'ed to the instance. +Currently only NO_NAT (default value) is supported.`, + Default: "NO_NAT", }, "zone": { Type: schema.TypeString, @@ -71,10 +87,12 @@ func resourceComputeTargetInstance() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the zone where the target instance resides.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_target_ssl_proxy.go b/google/resource_compute_target_ssl_proxy.go index 63b263998b7..2959d68da2a 100644 --- a/google/resource_compute_target_ssl_proxy.go +++ b/google/resource_compute_target_ssl_proxy.go @@ -48,15 +48,26 @@ func resourceComputeTargetSslProxy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the BackendService resource.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "ssl_certificates": { Type: schema.TypeList, Required: true, + Description: `A list of SslCertificate resources that are used to authenticate +connections between users and the load balancer. Currently, exactly +one SSL certificate must be specified.`, MaxItems: 1, Elem: &schema.Schema{ Type: schema.TypeString, @@ -64,28 +75,36 @@ func resourceComputeTargetSslProxy() *schema.Resource { }, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to +the backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "ssl_policy": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the SslPolicy resource that will be associated with +the TargetSslProxy resource. If not set, the TargetSslProxy +resource will not have any SSL policy configured.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "proxy_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_target_tcp_proxy.go b/google/resource_compute_target_tcp_proxy.go index 532d2d07b25..c8235c5b2dc 100644 --- a/google/resource_compute_target_tcp_proxy.go +++ b/google/resource_compute_target_tcp_proxy.go @@ -48,30 +48,43 @@ func resourceComputeTargetTcpProxy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to the BackendService resource.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "proxy_header": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"NONE", "PROXY_V1", ""}, false), - Default: "NONE", + Description: `Specifies the type of proxy header to append before sending data to +the backend, either NONE or PROXY_V1. The default is NONE.`, + Default: "NONE", }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "proxy_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_url_map.go b/google/resource_compute_url_map.go index a621ab319c0..a46e856fd35 100644 --- a/google/resource_compute_url_map.go +++ b/google/resource_compute_url_map.go @@ -47,48 +47,69 @@ func resourceComputeUrlMap() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend service or backend bucket to use when none of the given rules match.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and match +the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the +first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this resource. Provide this property when +you create the resource.`, }, "host_rule": { - Type: schema.TypeSet, - Optional: true, - Elem: computeUrlMapHostRuleSchema(), + Type: schema.TypeSet, + Optional: true, + Description: `The list of HostRules to use against the URL.`, + Elem: computeUrlMapHostRuleSchema(), // Default schema.HashSchema is used. }, "path_matcher": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The list of named PathMatchers to use against the URL.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "default_service": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend service or backend bucket to use when none of the given paths match.`, }, "name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The name to which this PathMatcher is referred by the HostRule.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, }, "path_rule": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The list of path rules.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "paths": { Type: schema.TypeSet, Required: true, + Description: `The list of path patterns to match. Each must start with / +and the only place a * is allowed is at the end following +a /. The string fed to the path matcher does not include +any text after the first ? or #, and those chars are not +allowed here.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -98,6 +119,7 @@ func resourceComputeUrlMap() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend service or backend bucket to use if any of the given paths match.`, }, }, }, @@ -108,39 +130,49 @@ func resourceComputeUrlMap() *schema.Resource { "test": { Type: schema.TypeList, Optional: true, + Description: `The list of expected URL mappings. Requests to update this UrlMap will +succeed only if all of the test cases pass.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "host": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Host portion of the URL.`, }, "path": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `Path portion of the URL.`, }, "service": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The backend service or backend bucket link that should be matched by this test.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `Description of this test case.`, }, }, }, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "fingerprint": { Type: schema.TypeString, Computed: true, + Description: `Fingerprint of this resource. This field is used internally during +updates of this resource.`, }, "map_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, @@ -162,6 +194,10 @@ func computeUrlMapHostRuleSchema() *schema.Resource { "hosts": { Type: schema.TypeSet, Required: true, + Description: `The list of host patterns to match. They must be valid +hostnames, except * will match any string of ([a-z0-9-.]*). In +that case, * must be the first character and must be followed in +the pattern by either - or ..`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -170,10 +206,14 @@ func computeUrlMapHostRuleSchema() *schema.Resource { "path_matcher": { Type: schema.TypeString, Required: true, + Description: `The name of the PathMatcher to use to match the path portion of +the URL if the hostRule matches the URL's host portion.`, }, "description": { Type: schema.TypeString, Optional: true, + Description: `An optional description of this HostRule. Provide this property +when you create the resource.`, }, }, } diff --git a/google/resource_compute_vpn_gateway.go b/google/resource_compute_vpn_gateway.go index e4be832bcce..e52e342ebfe 100644 --- a/google/resource_compute_vpn_gateway.go +++ b/google/resource_compute_vpn_gateway.go @@ -45,17 +45,26 @@ func resourceComputeVpnGateway() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. Provided by the client when the resource is +created. The name must be 1-63 characters long, and comply with +RFC1035. Specifically, the name must be 1-63 characters long and +match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means +the first character must be a lowercase letter, and all following +characters must be a dash, lowercase letter, or digit, except the last +character, which cannot be a dash.`, }, "network": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The network this VPN gateway is accepting traffic for.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "region": { Type: schema.TypeString, @@ -63,14 +72,17 @@ func resourceComputeVpnGateway() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The region this gateway should sit in.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "gateway_id": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The unique identifier for the resource.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_vpn_tunnel.go b/google/resource_compute_vpn_tunnel.go index 6dd38d470ea..f8082e9f7d0 100644 --- a/google/resource_compute_vpn_tunnel.go +++ b/google/resource_compute_vpn_tunnel.go @@ -149,29 +149,46 @@ func resourceComputeVpnTunnel() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Name of the resource. The name must be 1-63 characters long, and +comply with RFC1035. Specifically, the name must be 1-63 +characters long and match the regular expression +'[a-z]([-a-z0-9]*[a-z0-9])?' which means the first character +must be a lowercase letter, and all following characters must +be a dash, lowercase letter, or digit, +except the last character, which cannot be a dash.`, }, "shared_secret": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Shared secret used to set the secure session between the Cloud VPN +gateway and the peer VPN gateway.`, Sensitive: true, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `An optional description of this resource.`, }, "ike_version": { Type: schema.TypeInt, Optional: true, ForceNew: true, - Default: 2, + Description: `IKE protocol version to use when establishing the VPN tunnel with +peer VPN gateway. +Acceptable IKE versions are 1 or 2. Default version is 2.`, + Default: 2, }, "local_traffic_selector": { Type: schema.TypeSet, Computed: true, Optional: true, ForceNew: true, + Description: `Local traffic selector to use when establishing the VPN tunnel with +peer VPN gateway. The value should be a CIDR formatted string, +for example '192.168.0.0/16'. The ranges should be disjoint. +Only IPv4 is supported.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -183,6 +200,7 @@ func resourceComputeVpnTunnel() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validatePeerAddr, + Description: `IP address of the peer VPN gateway. Only IPv4 is supported.`, }, "region": { Type: schema.TypeString, @@ -190,12 +208,17 @@ func resourceComputeVpnTunnel() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The region where the tunnel is located. If unset, is set to the region of 'target_vpn_gateway'.`, }, "remote_traffic_selector": { Type: schema.TypeSet, Computed: true, Optional: true, ForceNew: true, + Description: `Remote traffic selector to use when establishing the VPN tunnel with +peer VPN gateway. The value should be a CIDR formatted string, +for example '192.168.0.0/16'. The ranges should be disjoint. +Only IPv4 is supported.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -206,28 +229,35 @@ func resourceComputeVpnTunnel() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of router resource to be used for dynamic routing.`, }, "target_vpn_gateway": { Type: schema.TypeString, Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `URL of the Target VPN gateway with which this VPN tunnel is +associated.`, }, "creation_timestamp": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "detailed_status": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Detailed status message for the VPN tunnel.`, }, "shared_secret_hash": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Hash of the shared secret.`, }, "tunnel_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The unique identifier for the resource. This identifier is defined by the server.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_container_analysis_note.go b/google/resource_container_analysis_note.go index f3349e1566e..c1ca33a9cdc 100644 --- a/google/resource_container_analysis_note.go +++ b/google/resource_container_analysis_note.go @@ -45,18 +45,37 @@ func resourceContainerAnalysisNote() *schema.Resource { "attestation_authority": { Type: schema.TypeList, Required: true, + Description: `Note kind that represents a logical attestation "role" or "authority". +For example, an organization might have one AttestationAuthority for +"QA" and one for "build". This Note is intended to act strictly as a +grouping mechanism for the attached Occurrences (Attestations). This +grouping mechanism also provides a security boundary, since IAM ACLs +gate the ability for a principle to attach an Occurrence to a given +Note. It also provides a single point of lookup to find all attached +Attestation Occurrences, even if they don't all live in the same +project.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "hint": { Type: schema.TypeList, Required: true, + Description: `This submessage provides human-readable hints about the purpose of +the AttestationAuthority. Because the name of a Note acts as its +resource reference, it is important to disambiguate the canonical +name of the Note (which might be a UUID for security purposes) +from "readable" names more suitable for debug output. Note that +these hints should NOT be used to look up AttestationAuthorities +in security sensitive contexts, such as when looking up +Attestations to verify.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "human_readable_name": { Type: schema.TypeString, Required: true, + Description: `The human readable name of this Attestation Authority, for +example "qa".`, }, }, }, @@ -65,9 +84,10 @@ func resourceContainerAnalysisNote() *schema.Resource { }, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the note.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_dns_managed_zone.go b/google/resource_dns_managed_zone.go index ece2b66add8..3b7740392dc 100644 --- a/google/resource_dns_managed_zone.go +++ b/google/resource_dns_managed_zone.go @@ -46,25 +46,30 @@ func resourceDNSManagedZone() *schema.Resource { Schema: map[string]*schema.Schema{ "dns_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The DNS name of this managed zone, for instance "example.com.".`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `User assigned name for this resource. +Must be unique within the project.`, }, "description": { - Type: schema.TypeString, - Optional: true, - Default: "Managed by Terraform", + Type: schema.TypeString, + Optional: true, + Description: `A textual description field. Defaults to 'Managed by Terraform'.`, + Default: "Managed by Terraform", }, "dnssec_config": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `DNSSEC configuration`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "default_key_specs": { @@ -72,6 +77,9 @@ func resourceDNSManagedZone() *schema.Resource { Computed: true, Optional: true, ForceNew: true, + Description: `Specifies parameters that will be used for generating initial DnsKeys +for this ManagedZone. If you provide a spec for keySigning or zoneSigning, +you must also provide one for the other.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "algorithm": { @@ -79,32 +87,42 @@ func resourceDNSManagedZone() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"ecdsap256sha256", "ecdsap384sha384", "rsasha1", "rsasha256", "rsasha512", ""}, false), + Description: `String mnemonic specifying the DNSSEC algorithm of this key`, }, "key_length": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + Description: `Length of the keys in bits`, }, "key_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"keySigning", "zoneSigning", ""}, false), + Description: `Specifies whether this is a key signing key (KSK) or a zone +signing key (ZSK). Key signing keys have the Secure Entry +Point flag set and, when active, will only be used to sign +resource record sets of type DNSKEY. Zone signing keys do +not have the Secure Entry Point flag set and will be used +to sign all other types of resource record sets.`, }, "kind": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "dns#dnsKeySpec", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Identifies what kind of resource this is`, + Default: "dns#dnsKeySpec", }, }, }, }, "kind": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "dns#managedZoneDnsSecConfig", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Identifies what kind of resource this is`, + Default: "dns#managedZoneDnsSecConfig", }, "non_existence": { Type: schema.TypeString, @@ -112,31 +130,41 @@ func resourceDNSManagedZone() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"nsec", "nsec3", ""}, false), + Description: `Specifies the mechanism used to provide authenticated denial-of-existence responses.`, }, "state": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"off", "on", "transfer", ""}, false), + Description: `Specifies whether DNSSEC is enabled, and what mode it is in`, }, }, }, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `A set of key/value label pairs to assign to this ManagedZone.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "private_visibility_config": { Type: schema.TypeList, Optional: true, + Description: `For privately visible zones, the set of Virtual Private Cloud +resources that the zone is visible from.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "networks": { Type: schema.TypeSet, Optional: true, - Elem: dnsManagedZonePrivateVisibilityConfigNetworksSchema(), + Description: `The list of VPC networks that can see this zone. Until the provider updates to use the Terraform 0.12 SDK in a future release, you +may experience issues with this resource while updating. If you've defined a 'networks' block and +add another 'networks' block while keeping the old block, Terraform will see an incorrect diff +and apply an incorrect update to the resource. If you encounter this issue, remove all 'networks' +blocks in an update and then apply another update adding all of them back simultaneously.`, + Elem: dnsManagedZonePrivateVisibilityConfigNetworksSchema(), Set: func(v interface{}) int { if v == nil { return 0 @@ -159,11 +187,16 @@ func resourceDNSManagedZone() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"private", "public", ""}, false), DiffSuppressFunc: caseDiffSuppress, - Default: "public", + Description: `The zone's visibility: public zones are exposed to the Internet, +while private zones are visible only to Virtual Private Cloud resources. +Must be one of: 'public', 'private'.`, + Default: "public", }, "name_servers": { Type: schema.TypeList, Computed: true, + Description: `Delegate your managed_zone to these virtual name servers; +defined by the server`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -185,6 +218,9 @@ func dnsManagedZonePrivateVisibilityConfigNetworksSchema() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The fully qualified URL of the VPC network to bind to. +This should be formatted like +'https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}'`, }, }, } diff --git a/google/resource_filestore_instance.go b/google/resource_filestore_instance.go index f9cc333bea0..2ee792a7ba3 100644 --- a/google/resource_filestore_instance.go +++ b/google/resource_filestore_instance.go @@ -47,29 +47,37 @@ func resourceFilestoreInstance() *schema.Resource { "file_shares": { Type: schema.TypeList, Required: true, + Description: `File system shares on the instance. For this version, only a +single file share is supported.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "capacity_gb": { Type: schema.TypeInt, Required: true, + Description: `File share capacity in GiB. This must be at least 1024 GiB +for the standard tier, or 2560 GiB for the premium tier.`, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the fileshare (16 characters or less)`, }, }, }, }, "name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The resource name of the instance.`, }, "networks": { Type: schema.TypeList, Required: true, ForceNew: true, + Description: `VPC networks to which the instance is connected. For this version, +only a single network is supported.`, MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -77,6 +85,8 @@ func resourceFilestoreInstance() *schema.Resource { Type: schema.TypeList, Required: true, ForceNew: true, + Description: `IP versions for which the instance has +IP addresses assigned.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -85,15 +95,20 @@ func resourceFilestoreInstance() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The name of the GCE VPC network to which the +instance is connected.`, }, "reserved_ip_range": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `A /29 CIDR block that identifies the range of IP +addresses reserved for this instance.`, }, "ip_addresses": { - Type: schema.TypeList, - Computed: true, + Type: schema.TypeList, + Computed: true, + Description: `A list of IPv4 or IPv6 addresses.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -106,28 +121,35 @@ func resourceFilestoreInstance() *schema.Resource { Required: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"TIER_UNSPECIFIED", "STANDARD", "PREMIUM"}, false), + Description: `The service tier of the instance.`, }, "zone": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the Filestore zone of the instance.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A description of the instance.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Resource labels to represent user-provided metadata.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "create_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, }, "etag": { Type: schema.TypeString, Computed: true, + Description: `Server-specified ETag for the instance resource to prevent +simultaneous updates from overwriting each other.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_firestore_index.go b/google/resource_firestore_index.go index 416455c460b..f651ba70d40 100644 --- a/google/resource_firestore_index.go +++ b/google/resource_firestore_index.go @@ -42,14 +42,21 @@ func resourceFirestoreIndex() *schema.Resource { Schema: map[string]*schema.Schema{ "collection": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The collection being indexed.`, }, "fields": { Type: schema.TypeList, Required: true, ForceNew: true, + Description: `The fields supported by this index. The last field entry is always for +the field path '__name__'. If, on creation, '__name__' was not +specified as the last field, it will be added automatically with the +same direction as that of the last field defined. If the final field +in a composite index is not directional, the '__name__' will be +ordered '"ASCENDING"' (unless explicitly specified otherwise).`, MinItems: 2, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -58,37 +65,47 @@ func resourceFirestoreIndex() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"CONTAINS", ""}, false), + Description: `Indicates that this field supports operations on arrayValues. Only one of 'order' and 'arrayConfig' can +be specified.`, }, "field_path": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Name of the field.`, }, "order": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"ASCENDING", "DESCENDING", ""}, false), + Description: `Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=. +Only one of 'order' and 'arrayConfig' can be specified.`, }, }, }, }, "database": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "(default)", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The Firestore database id. Defaults to '"(default)"'.`, + Default: "(default)", }, "query_scope": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"COLLECTION", "COLLECTION_GROUP", ""}, false), - Default: "COLLECTION", + Description: `The scope at which a query is run. One of '"COLLECTION"' or +'"COLLECTION_GROUP"'. Defaults to '"COLLECTION"'.`, + Default: "COLLECTION", }, "name": { Type: schema.TypeString, Computed: true, + Description: `A server defined name for this index. Format: +'projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/indexes/{{server_generated_id}}'`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_kms_crypto_key.go b/google/resource_kms_crypto_key.go index 36d7dfa4877..e9b2c82b443 100644 --- a/google/resource_kms_crypto_key.go +++ b/google/resource_kms_crypto_key.go @@ -57,45 +57,60 @@ func resourceKMSCryptoKey() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: kmsCryptoKeyRingsEquivalent, + Description: `The KeyRing that this key belongs to. +Format: ''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''.`, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name for the CryptoKey.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Labels with user-defined metadata to apply to this resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "purpose": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"ENCRYPT_DECRYPT", "ASYMMETRIC_SIGN", "ASYMMETRIC_DECRYPT", ""}, false), - Default: "ENCRYPT_DECRYPT", + Description: `The immutable purpose of this CryptoKey. See the +[purpose reference](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose) +for possible inputs.`, + Default: "ENCRYPT_DECRYPT", }, "rotation_period": { Type: schema.TypeString, Optional: true, ValidateFunc: orEmpty(validateKmsCryptoKeyRotationPeriod), + Description: `Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. +The first rotation will take place after the specified period. The rotation period has +the format of a decimal number with up to 9 fractional digits, followed by the +letter 's' (seconds). It must be greater than a day (ie, 86400).`, }, "version_template": { - Type: schema.TypeList, - Computed: true, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Optional: true, + Description: `A template describing settings for new crypto key versions.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "algorithm": { Type: schema.TypeString, Required: true, + Description: `The algorithm to use when creating a version based on this template. +See the [algorithm reference](https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm) for possible inputs.`, }, "protection_level": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"SOFTWARE", "HSM", ""}, false), + Description: `The protection level to use when creating a version based on this template.`, Default: "SOFTWARE", }, }, diff --git a/google/resource_kms_key_ring.go b/google/resource_kms_key_ring.go index 1517452aaaa..843491a545f 100644 --- a/google/resource_kms_key_ring.go +++ b/google/resource_kms_key_ring.go @@ -43,11 +43,14 @@ func resourceKMSKeyRing() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The location for the KeyRing. +A full list of valid locations can be found by running 'gcloud kms locations list'.`, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name for the KeyRing.`, }, "self_link": { Type: schema.TypeString, diff --git a/google/resource_logging_metric.go b/google/resource_logging_metric.go index 9ba1d2e8e75..51d67d7e90d 100644 --- a/google/resource_logging_metric.go +++ b/google/resource_logging_metric.go @@ -46,44 +46,63 @@ func resourceLoggingMetric() *schema.Resource { "filter": { Type: schema.TypeString, Required: true, + Description: `An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which +is used to match log entries.`, }, "metric_descriptor": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, + Type: schema.TypeList, + Required: true, + Description: `The metric descriptor associated with the logs-based metric.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "metric_kind": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"DELTA", "GAUGE", "CUMULATIVE"}, false), + Description: `Whether the metric records instantaneous values, changes to a value, etc. +Some combinations of metricKind and valueType might not be supported. +For counter metrics, set this to DELTA.`, }, "value_type": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"BOOL", "INT64", "DOUBLE", "STRING", "DISTRIBUTION", "MONEY"}, false), + Description: `Whether the measurement is an integer, a floating-point number, etc. +Some combinations of metricKind and valueType might not be supported. +For counter metrics, set this to INT64.`, }, "display_name": { Type: schema.TypeString, Optional: true, + Description: `A concise name for the metric, which can be displayed in user interfaces. Use sentence case +without an ending period, for example "Request count". This field is optional but it is +recommended to be set for any metrics associated with user-visible concepts, such as Quota.`, }, "labels": { Type: schema.TypeList, Optional: true, + Description: `The set of labels that can be used to describe a specific instance of this metric type. For +example, the appengine.googleapis.com/http/server/response_latencies metric type has a label +for the HTTP response code, response_code, so you can look at latencies for successful responses +or just for responses that failed.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "key": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The label key.`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `A human-readable description for the label.`, }, "value_type": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"BOOL", "INT64", "STRING", ""}, false), + Description: `The type of data that can be assigned to the label.`, Default: "STRING", }, }, @@ -92,7 +111,10 @@ func resourceLoggingMetric() *schema.Resource { "unit": { Type: schema.TypeString, Optional: true, - Default: "1", + Description: `The unit in which the metric value is reported. It is only applicable if the valueType is +'INT64', 'DOUBLE', or 'DISTRIBUTION'. The supported units are a subset of +[The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard`, + Default: "1", }, }, }, @@ -100,22 +122,31 @@ func resourceLoggingMetric() *schema.Resource { "name": { Type: schema.TypeString, Required: true, + Description: `The client-assigned metric identifier. Examples - "error_count", "nginx/requests". +Metric identifiers are limited to 100 characters and can include only the following +characters A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash +character (/) denotes a hierarchy of name pieces, and it cannot be the first character +of the name.`, }, "bucket_options": { Type: schema.TypeList, Optional: true, + Description: `The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it +describes the bucket boundaries used to create a histogram of the extracted values.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "explicit_buckets": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Specifies a set of buckets with arbitrary widths.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bounds": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The values must be monotonically increasing.`, Elem: &schema.Schema{ Type: schema.TypeFloat, }, @@ -126,20 +157,25 @@ func resourceLoggingMetric() *schema.Resource { "exponential_buckets": { Type: schema.TypeList, Optional: true, + Description: `Specifies an exponential sequence of buckets that have a width that is proportional to the value of +the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "growth_factor": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `Must be greater than 1.`, }, "num_finite_buckets": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `Must be greater than 0.`, }, "scale": { - Type: schema.TypeFloat, - Optional: true, + Type: schema.TypeFloat, + Optional: true, + Description: `Must be greater than 0.`, }, }, }, @@ -147,20 +183,25 @@ func resourceLoggingMetric() *schema.Resource { "linear_buckets": { Type: schema.TypeList, Optional: true, + Description: `Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). +Each bucket represents a constant absolute uncertainty on the specific value in the bucket.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "num_finite_buckets": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `Must be greater than 0.`, }, "offset": { - Type: schema.TypeFloat, - Optional: true, + Type: schema.TypeFloat, + Optional: true, + Description: `Lower bound of the first bucket.`, }, "width": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Description: `Must be greater than 0.`, }, }, }, @@ -171,15 +212,28 @@ func resourceLoggingMetric() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, + Description: `A description of this metric, which is used in documentation. The maximum length of the +description is 8000 characters.`, }, "label_extractors": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `A map from a label key string to an extractor expression which is used to extract data from a log +entry field and assign as the label value. Each label key specified in the LabelDescriptor must +have an associated extractor expression in this map. The syntax of the extractor expression is +the same as for the valueExtractor field.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "value_extractor": { Type: schema.TypeString, Optional: true, + Description: `A valueExtractor is required when using a distribution logs-based metric to extract the values to +record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or +REGEXP_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which +the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax +(https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified +log entry field. The value of the field is converted to a string before applying the regex. It is an +error to specify a regex that does not include exactly one capture group.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_ml_engine_model.go b/google/resource_ml_engine_model.go index 2f2f2c9d2e7..1d0ee0dcda8 100644 --- a/google/resource_ml_engine_model.go +++ b/google/resource_ml_engine_model.go @@ -40,50 +40,60 @@ func resourceMLEngineModel() *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 specified for the model.`, }, "default_version": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The default version of the model. This version will be used to handle +prediction requests that do not specify a version.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The name specified for the version when it was created.`, }, }, }, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The description specified for the model when it was created.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Description: `One or more labels that you can add, to organize your models.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "online_prediction_console_logging": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Description: `If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging`, }, "online_prediction_logging": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Description: `If true, online prediction access logs are sent to StackDriver Logging.`, }, "regions": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `The list of regions where the model is going to be deployed. +Currently only one region per model is supported`, MaxItems: 1, Elem: &schema.Schema{ Type: schema.TypeString, diff --git a/google/resource_monitoring_alert_policy.go b/google/resource_monitoring_alert_policy.go index 62cd2d3d6af..bbd9656348a 100644 --- a/google/resource_monitoring_alert_policy.go +++ b/google/resource_monitoring_alert_policy.go @@ -48,43 +48,126 @@ func resourceMonitoringAlertPolicy() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"AND", "OR", "AND_WITH_MATCHING_RESOURCE"}, false), + Description: `How to combine the results of multiple conditions to +determine if an incident should be opened.`, }, "conditions": { Type: schema.TypeList, Required: true, + Description: `A list of conditions for the policy. The conditions are combined by +AND or OR according to the combiner field. If the combined conditions +evaluate to true, then an incident is created. A policy can have from +one to six conditions.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "display_name": { Type: schema.TypeString, Required: true, + Description: `A short name or phrase used to identify the +condition in dashboards, notifications, and +incidents. To avoid confusion, don't use the same +display name for multiple conditions in the same +policy.`, }, "condition_absent": { Type: schema.TypeList, Optional: true, + Description: `A condition that checks that a time series +continues to receive new data points.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "duration": { Type: schema.TypeString, Required: true, + Description: `The amount of time that a time series must +fail to report new data to be considered +failing. Currently, only values that are a +multiple of a minute--e.g. 60s, 120s, or 300s +--are supported.`, }, "aggregations": { Type: schema.TypeList, Optional: true, + Description: `Specifies the alignment of data points in +individual time series as well as how to +combine the retrieved time series together +(such as when aggregating multiple streams +on each resource to a single stream for each +resource or when aggregating streams across +all members of a group of resources). +Multiple aggregations are applied in the +order specified.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "alignment_period": { Type: schema.TypeString, Optional: true, + Description: `The alignment period for per-time +series alignment. If present, +alignmentPeriod must be at least +60 seconds. After per-time series +alignment, each time series will +contain data points only on the +period boundaries. If +perSeriesAligner is not specified +or equals ALIGN_NONE, then this +field is ignored. If +perSeriesAligner is specified and +does not equal ALIGN_NONE, then +this field must be defined; +otherwise an error is returned.`, }, "cross_series_reducer": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"REDUCE_NONE", "REDUCE_MEAN", "REDUCE_MIN", "REDUCE_MAX", "REDUCE_SUM", "REDUCE_STDDEV", "REDUCE_COUNT", "REDUCE_COUNT_TRUE", "REDUCE_COUNT_FALSE", "REDUCE_FRACTION_TRUE", "REDUCE_PERCENTILE_99", "REDUCE_PERCENTILE_95", "REDUCE_PERCENTILE_50", "REDUCE_PERCENTILE_05", ""}, false), + Description: `The approach to be used to combine +time series. Not all reducer +functions may be applied to all +time series, depending on the +metric type and the value type of +the original time series. +Reduction may change the metric +type of value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, "group_by_fields": { Type: schema.TypeList, Optional: true, + Description: `The set of fields to preserve when +crossSeriesReducer is specified. +The groupByFields determine how +the time series are partitioned +into subsets prior to applying the +aggregation function. Each subset +contains time series that have the +same value for each of the +grouping fields. Each individual +time series is a member of exactly +one subset. The crossSeriesReducer +is applied to each subset of time +series. It is not possible to +reduce across different resource +types, so this field implicitly +contains resource.type. Fields not +specified in groupByFields are +aggregated away. If groupByFields +is not specified and all the time +series have the same resource +type, then the time series are +aggregated into a single output +time series. If crossSeriesReducer +is not defined, this field is +ignored.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -93,6 +176,23 @@ func resourceMonitoringAlertPolicy() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ALIGN_NONE", "ALIGN_DELTA", "ALIGN_RATE", "ALIGN_INTERPOLATE", "ALIGN_NEXT_OLDER", "ALIGN_MIN", "ALIGN_MAX", "ALIGN_MEAN", "ALIGN_COUNT", "ALIGN_SUM", "ALIGN_STDDEV", "ALIGN_COUNT_TRUE", "ALIGN_COUNT_FALSE", "ALIGN_FRACTION_TRUE", "ALIGN_PERCENTILE_99", "ALIGN_PERCENTILE_95", "ALIGN_PERCENTILE_50", "ALIGN_PERCENTILE_05", "ALIGN_PERCENT_CHANGE", ""}, false), + Description: `The approach to be used to align +individual time series. Not all +alignment functions may be applied +to all time series, depending on +the metric type and value type of +the original time series. +Alignment may change the metric +type or the value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, }, }, @@ -100,20 +200,44 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "filter": { Type: schema.TypeString, Optional: true, + Description: `A filter that identifies which time series +should be compared with the threshold.The +filter is similar to the one that is +specified in the +MetricService.ListTimeSeries request (that +call is useful to verify the time series +that will be retrieved / processed) and must +specify the metric type and optionally may +contain restrictions on resource type, +resource labels, and metric labels. This +field may not exceed 2048 Unicode characters +in length.`, }, "trigger": { Type: schema.TypeList, Optional: true, + Description: `The number/percent of time series for which +the comparison must hold in order for the +condition to trigger. If unspecified, then +the condition will trigger if the comparison +is true for any of the time series that have +been identified by filter and aggregations.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "count": { Type: schema.TypeInt, Optional: true, + Description: `The absolute number of time series +that must fail the predicate for the +condition to be triggered.`, }, "percent": { Type: schema.TypeFloat, Optional: true, + Description: `The percentage of time series that +must fail the predicate for the +condition to be triggered.`, }, }, }, @@ -124,6 +248,8 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "condition_threshold": { Type: schema.TypeList, Optional: true, + Description: `A condition that compares a time series against a +threshold.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -131,28 +257,120 @@ func resourceMonitoringAlertPolicy() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"COMPARISON_GT", "COMPARISON_GE", "COMPARISON_LT", "COMPARISON_LE", "COMPARISON_EQ", "COMPARISON_NE"}, false), + Description: `The comparison to apply between the time +series (indicated by filter and aggregation) +and the threshold (indicated by +threshold_value). The comparison is applied +on each time series, with the time series on +the left-hand side and the threshold on the +right-hand side. Only COMPARISON_LT and +COMPARISON_GT are supported currently.`, }, "duration": { Type: schema.TypeString, Required: true, + Description: `The amount of time that a time series must +violate the threshold to be considered +failing. Currently, only values that are a +multiple of a minute--e.g., 0, 60, 120, or +300 seconds--are supported. If an invalid +value is given, an error will be returned. +When choosing a duration, it is useful to +keep in mind the frequency of the underlying +time series data (which may also be affected +by any alignments specified in the +aggregations field); a good duration is long +enough so that a single outlier does not +generate spurious alerts, but short enough +that unhealthy states are detected and +alerted on quickly.`, }, "aggregations": { Type: schema.TypeList, Optional: true, + Description: `Specifies the alignment of data points in +individual time series as well as how to +combine the retrieved time series together +(such as when aggregating multiple streams +on each resource to a single stream for each +resource or when aggregating streams across +all members of a group of resources). +Multiple aggregations are applied in the +order specified.This field is similar to the +one in the MetricService.ListTimeSeries +request. It is advisable to use the +ListTimeSeries method when debugging this +field.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "alignment_period": { Type: schema.TypeString, Optional: true, + Description: `The alignment period for per-time +series alignment. If present, +alignmentPeriod must be at least +60 seconds. After per-time series +alignment, each time series will +contain data points only on the +period boundaries. If +perSeriesAligner is not specified +or equals ALIGN_NONE, then this +field is ignored. If +perSeriesAligner is specified and +does not equal ALIGN_NONE, then +this field must be defined; +otherwise an error is returned.`, }, "cross_series_reducer": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"REDUCE_NONE", "REDUCE_MEAN", "REDUCE_MIN", "REDUCE_MAX", "REDUCE_SUM", "REDUCE_STDDEV", "REDUCE_COUNT", "REDUCE_COUNT_TRUE", "REDUCE_COUNT_FALSE", "REDUCE_FRACTION_TRUE", "REDUCE_PERCENTILE_99", "REDUCE_PERCENTILE_95", "REDUCE_PERCENTILE_50", "REDUCE_PERCENTILE_05", ""}, false), + Description: `The approach to be used to combine +time series. Not all reducer +functions may be applied to all +time series, depending on the +metric type and the value type of +the original time series. +Reduction may change the metric +type of value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, "group_by_fields": { Type: schema.TypeList, Optional: true, + Description: `The set of fields to preserve when +crossSeriesReducer is specified. +The groupByFields determine how +the time series are partitioned +into subsets prior to applying the +aggregation function. Each subset +contains time series that have the +same value for each of the +grouping fields. Each individual +time series is a member of exactly +one subset. The crossSeriesReducer +is applied to each subset of time +series. It is not possible to +reduce across different resource +types, so this field implicitly +contains resource.type. Fields not +specified in groupByFields are +aggregated away. If groupByFields +is not specified and all the time +series have the same resource +type, then the time series are +aggregated into a single output +time series. If crossSeriesReducer +is not defined, this field is +ignored.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -161,6 +379,23 @@ func resourceMonitoringAlertPolicy() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ALIGN_NONE", "ALIGN_DELTA", "ALIGN_RATE", "ALIGN_INTERPOLATE", "ALIGN_NEXT_OLDER", "ALIGN_MIN", "ALIGN_MAX", "ALIGN_MEAN", "ALIGN_COUNT", "ALIGN_SUM", "ALIGN_STDDEV", "ALIGN_COUNT_TRUE", "ALIGN_COUNT_FALSE", "ALIGN_FRACTION_TRUE", "ALIGN_PERCENTILE_99", "ALIGN_PERCENTILE_95", "ALIGN_PERCENTILE_50", "ALIGN_PERCENTILE_05", "ALIGN_PERCENT_CHANGE", ""}, false), + Description: `The approach to be used to align +individual time series. Not all +alignment functions may be applied +to all time series, depending on +the metric type and value type of +the original time series. +Alignment may change the metric +type or the value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, }, }, @@ -168,20 +403,92 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "denominator_aggregations": { Type: schema.TypeList, Optional: true, + Description: `Specifies the alignment of data points in +individual time series selected by +denominatorFilter as well as how to combine +the retrieved time series together (such as +when aggregating multiple streams on each +resource to a single stream for each +resource or when aggregating streams across +all members of a group of resources).When +computing ratios, the aggregations and +denominator_aggregations fields must use the +same alignment period and produce time +series that have the same periodicity and +labels.This field is similar to the one in +the MetricService.ListTimeSeries request. It +is advisable to use the ListTimeSeries +method when debugging this field.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "alignment_period": { Type: schema.TypeString, Optional: true, + Description: `The alignment period for per-time +series alignment. If present, +alignmentPeriod must be at least +60 seconds. After per-time series +alignment, each time series will +contain data points only on the +period boundaries. If +perSeriesAligner is not specified +or equals ALIGN_NONE, then this +field is ignored. If +perSeriesAligner is specified and +does not equal ALIGN_NONE, then +this field must be defined; +otherwise an error is returned.`, }, "cross_series_reducer": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"REDUCE_NONE", "REDUCE_MEAN", "REDUCE_MIN", "REDUCE_MAX", "REDUCE_SUM", "REDUCE_STDDEV", "REDUCE_COUNT", "REDUCE_COUNT_TRUE", "REDUCE_COUNT_FALSE", "REDUCE_FRACTION_TRUE", "REDUCE_PERCENTILE_99", "REDUCE_PERCENTILE_95", "REDUCE_PERCENTILE_50", "REDUCE_PERCENTILE_05", ""}, false), + Description: `The approach to be used to combine +time series. Not all reducer +functions may be applied to all +time series, depending on the +metric type and the value type of +the original time series. +Reduction may change the metric +type of value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, "group_by_fields": { Type: schema.TypeList, Optional: true, + Description: `The set of fields to preserve when +crossSeriesReducer is specified. +The groupByFields determine how +the time series are partitioned +into subsets prior to applying the +aggregation function. Each subset +contains time series that have the +same value for each of the +grouping fields. Each individual +time series is a member of exactly +one subset. The crossSeriesReducer +is applied to each subset of time +series. It is not possible to +reduce across different resource +types, so this field implicitly +contains resource.type. Fields not +specified in groupByFields are +aggregated away. If groupByFields +is not specified and all the time +series have the same resource +type, then the time series are +aggregated into a single output +time series. If crossSeriesReducer +is not defined, this field is +ignored.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -190,6 +497,23 @@ func resourceMonitoringAlertPolicy() *schema.Resource { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"ALIGN_NONE", "ALIGN_DELTA", "ALIGN_RATE", "ALIGN_INTERPOLATE", "ALIGN_NEXT_OLDER", "ALIGN_MIN", "ALIGN_MAX", "ALIGN_MEAN", "ALIGN_COUNT", "ALIGN_SUM", "ALIGN_STDDEV", "ALIGN_COUNT_TRUE", "ALIGN_COUNT_FALSE", "ALIGN_FRACTION_TRUE", "ALIGN_PERCENTILE_99", "ALIGN_PERCENTILE_95", "ALIGN_PERCENTILE_50", "ALIGN_PERCENTILE_05", "ALIGN_PERCENT_CHANGE", ""}, false), + Description: `The approach to be used to align +individual time series. Not all +alignment functions may be applied +to all time series, depending on +the metric type and value type of +the original time series. +Alignment may change the metric +type or the value type of the time +series.Time series data must be +aligned in order to perform cross- +time series reduction. If +crossSeriesReducer is specified, +then perSeriesAligner must be +specified and not equal ALIGN_NONE +and alignmentPeriod must be +specified; otherwise, an error is +returned.`, }, }, }, @@ -197,28 +521,71 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "denominator_filter": { Type: schema.TypeString, Optional: true, + Description: `A filter that identifies a time series that +should be used as the denominator of a ratio +that will be compared with the threshold. If +a denominator_filter is specified, the time +series specified by the filter field will be +used as the numerator.The filter is similar +to the one that is specified in the +MetricService.ListTimeSeries request (that +call is useful to verify the time series +that will be retrieved / processed) and must +specify the metric type and optionally may +contain restrictions on resource type, +resource labels, and metric labels. This +field may not exceed 2048 Unicode characters +in length.`, }, "filter": { Type: schema.TypeString, Optional: true, + Description: `A filter that identifies which time series +should be compared with the threshold.The +filter is similar to the one that is +specified in the +MetricService.ListTimeSeries request (that +call is useful to verify the time series +that will be retrieved / processed) and must +specify the metric type and optionally may +contain restrictions on resource type, +resource labels, and metric labels. This +field may not exceed 2048 Unicode characters +in length.`, }, "threshold_value": { Type: schema.TypeFloat, Optional: true, + Description: `A value against which to compare the time +series.`, }, "trigger": { Type: schema.TypeList, Optional: true, + Description: `The number/percent of time series for which +the comparison must hold in order for the +condition to trigger. If unspecified, then +the condition will trigger if the comparison +is true for any of the time series that have +been identified by filter and aggregations, +or by the ratio, if denominator_filter and +denominator_aggregations are specified.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "count": { Type: schema.TypeInt, Optional: true, + Description: `The absolute number of time series +that must fail the predicate for the +condition to be triggered.`, }, "percent": { Type: schema.TypeFloat, Optional: true, + Description: `The percentage of time series that +must fail the predicate for the +condition to be triggered.`, }, }, }, @@ -229,6 +596,12 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "name": { Type: schema.TypeString, Computed: true, + Description: `The unique resource name for this condition. +Its syntax is: +projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] +[CONDITION_ID] is assigned by Stackdriver Monitoring when +the condition is created as part of a new or updated alerting +policy.`, }, }, }, @@ -236,33 +609,55 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "display_name": { Type: schema.TypeString, Required: true, + Description: `A short name or phrase used to identify the policy in +dashboards, notifications, and incidents. To avoid confusion, don't use +the same display name for multiple policies in the same project. The +name is limited to 512 Unicode characters.`, }, "documentation": { Type: schema.TypeList, Optional: true, + Description: `A short name or phrase used to identify the policy in dashboards, +notifications, and incidents. To avoid confusion, don't use the same +display name for multiple policies in the same project. The name is +limited to 512 Unicode characters.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "content": { Type: schema.TypeString, Optional: true, + Description: `The text of the documentation, interpreted according to mimeType. +The content may not exceed 8,192 Unicode characters and may not +exceed more than 10,240 bytes when encoded in UTF-8 format, +whichever is smaller.`, }, "mime_type": { Type: schema.TypeString, Optional: true, - Default: "text/markdown", + Description: `The format of the content field. Presently, only the value +"text/markdown" is supported.`, + Default: "text/markdown", }, }, }, }, "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether or not the policy is enabled. The default is true.`, + Default: true, }, "notification_channels": { Type: schema.TypeList, Optional: true, + Description: `Identifies the notification channels to which notifications should be +sent when incidents are opened or closed or when new violations occur +on an already opened incident. Each element of this array corresponds +to the name field in each of the NotificationChannel objects that are +returned from the notificationChannels.list method. The syntax of the +entries in this field is +'projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]'`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -270,21 +665,31 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "user_labels": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `This field is intended to be used for organizing and identifying the AlertPolicy +objects.The field can contain up to 64 entries. Each key and value is limited +to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values +can contain only lowercase letters, numerals, underscores, and dashes. Keys +must begin with a letter.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "creation_record": { Type: schema.TypeList, Computed: true, + Description: `A read-only record of the creation of the alerting policy. +If provided in a call to create or update, this field will +be ignored.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "mutate_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `When the change occurred.`, }, "mutated_by": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The email address of the user making the change.`, }, }, }, @@ -292,6 +697,8 @@ func resourceMonitoringAlertPolicy() *schema.Resource { "name": { Type: schema.TypeString, Computed: true, + Description: `The unique resource name for this policy. +Its syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]`, }, "labels": { Type: schema.TypeList, diff --git a/google/resource_monitoring_group.go b/google/resource_monitoring_group.go index bc923299996..bca801697ae 100644 --- a/google/resource_monitoring_group.go +++ b/google/resource_monitoring_group.go @@ -44,23 +44,35 @@ func resourceMonitoringGroup() *schema.Resource { "display_name": { Type: schema.TypeString, Required: true, + Description: `A user-assigned name for this group, used only for display +purposes.`, }, "filter": { Type: schema.TypeString, Required: true, + Description: `The filter used to determine which monitored resources +belong to this group.`, }, "is_cluster": { Type: schema.TypeBool, Optional: true, + Description: `If true, the members of this group are considered to be a +cluster. The system can perform additional analysis on +groups that are clusters.`, }, "parent_name": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: compareSelfLinkRelativePaths, + Description: `The name of the group's parent, if it has one. The format is +"projects/{project_id_or_number}/groups/{group_id}". For +groups with no parent, parentName is the empty string, "".`, }, "name": { Type: schema.TypeString, Computed: true, + Description: `A unique identifier for this group. The format is +"projects/{project_id_or_number}/groups/{group_id}".`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_monitoring_notification_channel.go b/google/resource_monitoring_notification_channel.go index 5cae5b5499b..8f3286ab5eb 100644 --- a/google/resource_monitoring_notification_channel.go +++ b/google/resource_monitoring_notification_channel.go @@ -42,39 +42,61 @@ func resourceMonitoringNotificationChannel() *schema.Resource { Schema: map[string]*schema.Schema{ "display_name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.`, }, "type": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...`, }, "description": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.`, }, "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, + Type: schema.TypeBool, + Optional: true, + Description: `Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.`, + Default: true, }, "labels": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `Configuration fields that define the channel and its behavior. The +permissible and required labels are specified in the +NotificationChannelDescriptor corresponding to the type field. + +**Note**: Some NotificationChannelDescriptor labels are +sensitive and the API will return an partially-obfuscated value. +For example, for '"type": "slack"' channels, an 'auth_token' +label with value "SECRET" will be obfuscated as "**CRET". In order +to avoid a diff, Terraform will use the state value if it appears +that the obfuscated value matches the state value in +length/unobfuscated characters. However, Terraform will not detect a +a diff if the obfuscated portion of the value was changed outside of +Terraform.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "user_labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "name": { Type: schema.TypeString, Computed: true, + Description: `The full REST resource name for this channel. The syntax is: +projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] +The [CHANNEL_ID] is automatically assigned by the server on creation.`, }, "verification_status": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_monitoring_uptime_check_config.go b/google/resource_monitoring_uptime_check_config.go index 84a1f24131d..c3110b9f176 100644 --- a/google/resource_monitoring_uptime_check_config.go +++ b/google/resource_monitoring_uptime_check_config.go @@ -45,109 +45,127 @@ func resourceMonitoringUptimeCheckConfig() *schema.Resource { Schema: map[string]*schema.Schema{ "display_name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `A human-friendly name for the uptime check configuration. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced.`, }, "timeout": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Accepted formats https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration`, }, "content_matchers": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "content": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `String or regex content to match (max 1024 bytes)`, }, }, }, }, "http_check": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Contains information needed to make an HTTP or HTTPS check.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auth_info": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `The authentication information. Optional when creating an HTTP check; defaults to empty.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, + Type: schema.TypeString, + Optional: true, + Description: `The password to authenticate.`, + Sensitive: true, }, "username": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The username to authenticate.`, }, }, }, }, "headers": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `The list of headers to send as part of the uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "mask_headers": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `Boolean specifying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if mask_headers is set to True then the headers will be obscured with ******.`, }, "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", + Type: schema.TypeString, + Optional: true, + Description: `The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to "/").`, + Default: "/", }, "port": { - Type: schema.TypeInt, - Computed: true, - Optional: true, + Type: schema.TypeInt, + Computed: true, + Optional: true, + Description: `The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) and path to construct the full URL. Optional (defaults to 80 without SSL, or 443 with SSL).`, }, "use_ssl": { - Type: schema.TypeBool, - Optional: true, + Type: schema.TypeBool, + Optional: true, + Description: `If true, use HTTPS instead of HTTP to run the check.`, }, }, }, ConflictsWith: []string{"tcp_check"}, }, "monitored_resource": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "labels": { - Type: schema.TypeMap, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Required: true, + ForceNew: true, + Description: `Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone".`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.monitoredResourceDescriptors#MonitoredResourceDescriptor) object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).`, }, }, }, ConflictsWith: []string{"resource_group"}, }, "period": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Default: "300s", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.`, + Default: "300s", }, "resource_group": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The group resource associated with the configuration.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "group_id": { @@ -155,45 +173,52 @@ func resourceMonitoringUptimeCheckConfig() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The group of resources being monitored. Should be the 'name' of a group`, }, "resource_type": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"RESOURCE_TYPE_UNSPECIFIED", "INSTANCE", "AWS_ELB_LOAD_BALANCER", ""}, false), + Description: `The resource type of the group members.`, }, }, }, ConflictsWith: []string{"monitored_resource"}, }, "selected_regions": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Description: `The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions.`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "tcp_check": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `Contains information needed to make a TCP check.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "port": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + Description: `The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) to construct the full URL.`, }, }, }, ConflictsWith: []string{"http_check"}, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `A unique resource name for this UptimeCheckConfig. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].`, }, "uptime_check_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The id of the uptime check`, }, "is_internal": { Type: schema.TypeBool, diff --git a/google/resource_pubsub_subscription.go b/google/resource_pubsub_subscription.go index 21b05ddf812..4cb06dd4a28 100644 --- a/google/resource_pubsub_subscription.go +++ b/google/resource_pubsub_subscription.go @@ -61,22 +61,49 @@ func resourcePubsubSubscription() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: comparePubsubSubscriptionBasename, + Description: `Name of the subscription.`, }, "topic": { Type: schema.TypeString, Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `A reference to a Topic resource.`, }, "ack_deadline_seconds": { Type: schema.TypeInt, Computed: true, Optional: true, + Description: `This value is the maximum time after a subscriber receives a message +before the subscriber should acknowledge the message. After message +delivery but before the ack deadline expires and before the message is +acknowledged, it is an outstanding message and will not be delivered +again during that time (on a best-effort basis). + +For pull subscriptions, this value is used as the initial value for +the ack deadline. To override this value for a given message, call +subscriptions.modifyAckDeadline with the corresponding ackId if using +pull. The minimum custom deadline you can specify is 10 seconds. The +maximum custom deadline you can specify is 600 seconds (10 minutes). +If this parameter is 0, a default value of 10 seconds is used. + +For push delivery, this value is also used to set the request timeout +for the call to the push endpoint. + +If the subscriber never acknowledges the message, the Pub/Sub system +will eventually redeliver the message.`, }, "expiration_policy": { Type: schema.TypeList, Computed: true, Optional: true, + Description: `A policy that specifies the conditions for this subscription's expiration. +A subscription is considered active as long as any connected subscriber +is successfully consuming messages from the subscription or is issuing +operations on the subscription. If expirationPolicy is not set, a default +policy with ttl of 31 days will be used. If it is set but left empty, the +resource never expires. The minimum allowed value for expirationPolicy.ttl +is 1 day.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -84,48 +111,104 @@ func resourcePubsubSubscription() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: comparePubsubSubscriptionExpirationPolicy, + Description: `Specifies the "time-to-live" duration for an associated resource. The +resource expires if it is not active for a period of ttl. +If ttl is not set, the associated resource never expires. +A duration in seconds with up to nine fractional digits, terminated by 's'. +Example - "3.5s".`, }, }, }, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `A set of key/value label pairs to assign to this Subscription.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "message_retention_duration": { Type: schema.TypeString, Optional: true, - Default: "604800s", + Description: `How long to retain unacknowledged messages in the subscription's +backlog, from the moment a message is published. If +retainAckedMessages is true, then this also configures the retention +of acknowledged messages, and thus configures how far back in time a +subscriptions.seek can be done. Defaults to 7 days. Cannot be more +than 7 days ('"604800s"') or less than 10 minutes ('"600s"'). + +A duration in seconds with up to nine fractional digits, terminated +by 's'. Example: '"600.5s"'.`, + Default: "604800s", }, "push_config": { Type: schema.TypeList, Optional: true, + Description: `If push delivery is used with this subscription, this field is used to +configure it. An empty pushConfig signifies that the subscriber will +pull and ack messages using API methods.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "push_endpoint": { Type: schema.TypeString, Required: true, + Description: `A URL locating the endpoint to which messages should be pushed. +For example, a Webhook endpoint might use +"https://example.com/push".`, }, "attributes": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `Endpoint configuration attributes. + +Every endpoint has a set of API supported attributes that can +be used to control different aspects of the message delivery. + +The currently supported attribute is x-goog-version, which you +can use to change the format of the pushed message. This +attribute indicates the version of the data expected by +the endpoint. This controls the shape of the pushed message +(i.e., its fields and metadata). The endpoint version is +based on the version of the Pub/Sub API. + +If not present during the subscriptions.create call, +it will default to the version of the API used to make +such call. If not present during a subscriptions.modifyPushConfig +call, its value will not be changed. subscriptions.get +calls will always return a valid version, even if the +subscription was created without this attribute. + +The possible values for this attribute are: + +- v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. +- v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "oidc_token": { Type: schema.TypeList, Optional: true, + Description: `If specified, Pub/Sub will generate and attach an OIDC JWT token as +an Authorization header in the HTTP request for every pushed message.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "service_account_email": { Type: schema.TypeString, Required: true, + Description: `Service account email to be used for generating the OIDC token. +The caller (for subscriptions.create, subscriptions.patch, and +subscriptions.modifyPushConfig RPCs) must have the +iam.serviceAccounts.actAs permission for the service account.`, }, "audience": { Type: schema.TypeString, Optional: true, + Description: `Audience to be used when generating OIDC token. The audience claim +identifies the recipients that the JWT is intended for. The audience +value is a single case-sensitive string. Having multiple values (array) +for the audience field is not supported. More info about the OIDC JWT +token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 +Note: if not specified, the Push endpoint URL will be used.`, }, }, }, @@ -136,6 +219,10 @@ func resourcePubsubSubscription() *schema.Resource { "retain_acked_messages": { Type: schema.TypeBool, Optional: true, + Description: `Indicates whether to retain acknowledged messages. If 'true', then +messages are not expunged from the subscription's backlog, even if +they are acknowledged, until they fall out of the +messageRetentionDuration window.`, }, "path": { Type: schema.TypeString, diff --git a/google/resource_pubsub_topic.go b/google/resource_pubsub_topic.go index 84204bbfca5..613b115c489 100644 --- a/google/resource_pubsub_topic.go +++ b/google/resource_pubsub_topic.go @@ -47,27 +47,44 @@ func resourcePubsubTopic() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `Name of the topic.`, }, "kms_key_name": { Type: schema.TypeString, Optional: true, ForceNew: true, + Description: `The resource name of the Cloud KMS CryptoKey to be used to protect access +to messages published on this topic. Your project's PubSub service account +('service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com') must have +'roles/cloudkms.cryptoKeyEncrypterDecrypter' to use this feature. + +The expected format is 'projects/*/locations/*/keyRings/*/cryptoKeys/*'`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `A set of key/value label pairs to assign to this Topic.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "message_storage_policy": { Type: schema.TypeList, Computed: true, Optional: true, + Description: `Policy constraining the set of Google Cloud Platform regions where +messages published to the topic may be stored. If not present, then no +constraints are in effect.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "allowed_persistence_regions": { Type: schema.TypeList, Required: true, + Description: `A list of IDs of GCP regions where messages that are published to +the topic may be persisted in storage. Messages published by +publishers running in non-allowed GCP regions (or running outside +of GCP altogether) will be routed for storage in one of the +allowed regions. An empty list means that no regions are allowed, +and is not a valid configuration.`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google/resource_redis_instance.go b/google/resource_redis_instance.go index c10d2e2173a..803a5e6bbe9 100644 --- a/google/resource_redis_instance.go +++ b/google/resource_redis_instance.go @@ -45,19 +45,25 @@ func resourceRedisInstance() *schema.Resource { Schema: map[string]*schema.Schema{ "memory_size_gb": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + Description: `Redis memory size in GiB.`, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The ID of the instance or a fully qualified identifier for the instance.`, }, "alternative_location_id": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `Only applicable to STANDARD_HA tier which protects the instance +against zonal failures by provisioning it across two zones. +If provided, it must be a different zone from the one provided in +[locationId].`, }, "authorized_network": { Type: schema.TypeString, @@ -65,67 +71,105 @@ func resourceRedisInstance() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The full name of the Google Compute Engine network to which the +instance is connected. If left unspecified, the default network +will be used.`, }, "display_name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `An arbitrary and optional user-provided name for the instance.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Resource labels to represent user provided metadata.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "location_id": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The zone where the instance will be provisioned. If not provided, +the service will choose a zone for the instance. For STANDARD_HA tier, +instances will be created across two zones for protection against +zonal failures. If [alternativeLocationId] is also provided, it must +be different from [locationId].`, }, "redis_configs": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `Redis configuration parameters, according to http://redis.io/topics/config. +Please check Memorystore documentation for the list of supported parameters: +https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "redis_version": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The version of Redis software. If not provided, latest supported +version will be used. Currently, the supported values are: + +- REDIS_4_0 for Redis 4.0 compatibility +- REDIS_3_2 for Redis 3.2 compatibility`, }, "region": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: `The name of the Redis region of the instance.`, }, "reserved_ip_range": { Type: schema.TypeString, Computed: true, Optional: true, ForceNew: true, + Description: `The CIDR range of internal addresses that are reserved for this +instance. If not provided, the service will choose an unused /29 +block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +unique and non-overlapping with existing subnets in an authorized +network.`, }, "tier": { Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"BASIC", "STANDARD_HA", ""}, false), - Default: "BASIC", + Description: `The service tier of the instance. Must be one of these values: + +- BASIC: standalone instance +- STANDARD_HA: highly available primary/replica instances`, + Default: "BASIC", }, "create_time": { Type: schema.TypeString, Computed: true, + Description: `The time the instance was created in RFC3339 UTC "Zulu" format, +accurate to nanoseconds.`, }, "current_location_id": { Type: schema.TypeString, Computed: true, + Description: `The current zone where the Redis endpoint is placed. +For Basic Tier instances, this will always be the same as the +[locationId] provided by the user at creation time. For Standard Tier +instances, this can be either [locationId] or [alternativeLocationId] +and can change after a failover event.`, }, "host": { Type: schema.TypeString, Computed: true, + Description: `Hostname or IP address of the exposed Redis endpoint used by clients +to connect to the service.`, }, "port": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The port number of the exposed Redis endpoint.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_resource_manager_lien.go b/google/resource_resource_manager_lien.go index feb5a456513..c5707440706 100644 --- a/google/resource_resource_manager_lien.go +++ b/google/resource_resource_manager_lien.go @@ -45,32 +45,48 @@ func resourceResourceManagerLien() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `A stable, user-visible/meaningful string identifying the origin +of the Lien, intended to be inspected programmatically. Maximum length of +200 characters.`, }, "parent": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `A reference to the resource this Lien is attached to. +The server will validate the parent against those for which Liens are supported. +Since a variety of objects can have Liens against them, you must provide the type +prefix (e.g. "projects/my-project-name").`, }, "reason": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Concise user-visible strings indicating why an action cannot be performed +on a resource. Maximum length of 200 characters.`, }, "restrictions": { Type: schema.TypeList, Required: true, ForceNew: true, + Description: `The types of operations which should be blocked as a result of this Lien. +Each value should correspond to an IAM permission. The server will validate +the permissions against those for which Liens are supported. An empty +list is meaningless and will be rejected. +e.g. ['resourcemanager.projects.delete']`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "create_time": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Time of creation`, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `A system-generated unique identifier for this Lien.`, }, }, } diff --git a/google/resource_security_center_source.go b/google/resource_security_center_source.go index f3a86257e61..d3aab82e9c1 100644 --- a/google/resource_security_center_source.go +++ b/google/resource_security_center_source.go @@ -47,20 +47,30 @@ func resourceSecurityCenterSource() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validateRegexp(`[\p{L}\p{N}]({\p{L}\p{N}_- ]{0,30}[\p{L}\p{N}])?`), + Description: `The source’s display name. A source’s display name must be unique +amongst its siblings, for example, two sources with the same parent +can't share the same display name. The display name must start and end +with a letter or digit, may contain letters, digits, spaces, hyphens, +and underscores, and can be no longer than 32 characters.`, }, "organization": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The organization whose Cloud Security Command Center the Source +lives in.`, }, "description": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringLenBetween(0, 1024), + Description: `The description of the source (max of 1024 characters).`, }, "name": { Type: schema.TypeString, Computed: true, + Description: `The resource name of this source, in the format +'organizations/{{organization}}/sources/{{source}}'.`, }, }, } diff --git a/google/resource_source_repo_repository.go b/google/resource_source_repo_repository.go index 519ed78c020..b5dad850b98 100644 --- a/google/resource_source_repo_repository.go +++ b/google/resource_source_repo_repository.go @@ -45,14 +45,18 @@ func resourceSourceRepoRepository() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `Resource name of the repository, of the form '{{repo}}'. +The repo name may contain slashes. eg, 'name/with/slash'`, }, "size": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The disk usage of the repo, in bytes.`, }, "url": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `URL to clone the repository from Google Cloud Source Repositories.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_spanner_database.go b/google/resource_spanner_database.go index fdc49990918..d13a2a73d37 100644 --- a/google/resource_spanner_database.go +++ b/google/resource_spanner_database.go @@ -44,24 +44,32 @@ func resourceSpannerDatabase() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The instance to create the database on.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateRegexp(`^[a-z][a-z0-9_\-]*[a-z0-9]$`), + Description: `A unique identifier for the database, which cannot be changed after +the instance is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].`, }, "ddl": { Type: schema.TypeList, Optional: true, ForceNew: true, + Description: `An optional list of DDL statements to run inside the newly created +database. Statements can create tables, indexes, etc. These statements +execute atomically with the creation of the database: if there is an +error in any statement, the database is not created.`, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "state": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `An explanation of the status of the database.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_spanner_instance.go b/google/resource_spanner_instance.go index 20d58b8c561..361a0e7abb4 100644 --- a/google/resource_spanner_instance.go +++ b/google/resource_spanner_instance.go @@ -49,10 +49,18 @@ func resourceSpannerInstance() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the instance's configuration (similar but not +quite the same as a region) which defines defines the geographic placement and +replication of your databases in this instance. It determines where your data +is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. +In order to obtain a valid list please consult the +[Configuration section of the docs](https://cloud.google.com/spanner/docs/instances).`, }, "display_name": { Type: schema.TypeString, Required: true, + Description: `The descriptive name for this instance as it appears in UIs. Must be +unique per project and between 4 and 30 characters in length.`, }, "name": { Type: schema.TypeString, @@ -60,20 +68,30 @@ func resourceSpannerInstance() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validateRegexp(`^[a-z][-a-z0-9]*[a-z0-9]$`), + Description: `A unique identifier for the instance, which cannot be changed after +the instance is created. The name must be between 6 and 30 characters +in length. + + +If not provided, a random string starting with 'tf-' will be selected.`, }, "labels": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Description: `An object containing a list of "key": value pairs. +Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "num_nodes": { - Type: schema.TypeInt, - Optional: true, - Default: 1, + Type: schema.TypeInt, + Optional: true, + Description: `The number of nodes allocated to this instance.`, + Default: 1, }, "state": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `Instance status: 'CREATING' or 'READY'.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_sql_database.go b/google/resource_sql_database.go index 53fadb27600..bf30bd827cc 100644 --- a/google/resource_sql_database.go +++ b/google/resource_sql_database.go @@ -46,21 +46,35 @@ func resourceSQLDatabase() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The name of the Cloud SQL instance. This does not include the project +ID.`, }, "name": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The name of the database in the Cloud SQL instance. +This does not include the project ID or instance name.`, }, "charset": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `The charset value. See MySQL's +[Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) +for more details and supported values. Postgres databases only support +a value of 'UTF8' at creation time.`, }, "collation": { Type: schema.TypeString, Computed: true, Optional: true, + Description: `The collation value. See MySQL's +[Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) +for more details and supported values. Postgres databases only support +a value of 'en_US.UTF8' at creation time.`, }, "project": { Type: schema.TypeString, diff --git a/google/resource_storage_bucket_access_control.go b/google/resource_storage_bucket_access_control.go index bade608c4ce..55d2c59ac0f 100644 --- a/google/resource_storage_bucket_access_control.go +++ b/google/resource_storage_bucket_access_control.go @@ -47,24 +47,43 @@ func resourceStorageBucketAccessControl() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the bucket.`, }, "entity": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The entity holding the permission, in one of the following forms: + user-userId + user-email + group-groupId + group-email + domain-domain + project-team-projectId + allUsers + allAuthenticatedUsers +Examples: + The user liz@example.com would be user-liz@example.com. + The group example@googlegroups.com would be + group-example@googlegroups.com. + To refer to all members of the Google Apps for Business domain + example.com, the entity would be domain-example.com.`, }, "role": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"OWNER", "READER", "WRITER", ""}, false), + Description: `The access permission for the entity.`, }, "domain": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The domain associated with the entity.`, }, "email": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The email address associated with the entity.`, }, }, } diff --git a/google/resource_storage_default_object_access_control.go b/google/resource_storage_default_object_access_control.go index fb7820a2612..75812b24411 100644 --- a/google/resource_storage_default_object_access_control.go +++ b/google/resource_storage_default_object_access_control.go @@ -47,50 +47,69 @@ func resourceStorageDefaultObjectAccessControl() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the bucket.`, }, "entity": { Type: schema.TypeString, Required: true, + Description: `The entity holding the permission, in one of the following forms: + * user-{{userId}} + * user-{{email}} (such as "user-liz@example.com") + * group-{{groupId}} + * group-{{email}} (such as "group-example@googlegroups.com") + * domain-{{domain}} (such as "domain-example.com") + * project-team-{{projectId}} + * allUsers + * allAuthenticatedUsers`, }, "role": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"OWNER", "READER"}, false), + Description: `The access permission for the entity.`, }, "object": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The name of the object, if applied to an object.`, }, "domain": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The domain associated with the entity.`, }, "email": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The email address associated with the entity.`, }, "entity_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The ID for the entity`, }, "generation": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The content generation of the object, if applied to an object.`, }, "project_team": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Description: `The project team associated with the entity`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "project_number": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The project team associated with the entity`, }, "team": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"editors", "owners", "viewers", ""}, false), + Description: `The team.`, }, }, }, diff --git a/google/resource_storage_object_access_control.go b/google/resource_storage_object_access_control.go index 44384555255..5045ffae97a 100644 --- a/google/resource_storage_object_access_control.go +++ b/google/resource_storage_object_access_control.go @@ -47,50 +47,69 @@ func resourceStorageObjectAccessControl() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of the bucket.`, }, "entity": { Type: schema.TypeString, Required: true, + Description: `The entity holding the permission, in one of the following forms: + * user-{{userId}} + * user-{{email}} (such as "user-liz@example.com") + * group-{{groupId}} + * group-{{email}} (such as "group-example@googlegroups.com") + * domain-{{domain}} (such as "domain-example.com") + * project-team-{{projectId}} + * allUsers + * allAuthenticatedUsers`, }, "object": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The name of the object to apply the access control to.`, }, "role": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"OWNER", "READER"}, false), + Description: `The access permission for the entity.`, }, "domain": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The domain associated with the entity.`, }, "email": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The email address associated with the entity.`, }, "entity_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The ID for the entity`, }, "generation": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The content generation of the object, if applied to an object.`, }, "project_team": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Description: `The project team associated with the entity`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "project_number": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Description: `The project team associated with the entity`, }, "team": { Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{"editors", "owners", "viewers", ""}, false), + Description: `The team.`, }, }, }, diff --git a/google/resource_tpu_node.go b/google/resource_tpu_node.go index 0181bf5052b..ee7795c6f95 100644 --- a/google/resource_tpu_node.go +++ b/google/resource_tpu_node.go @@ -77,39 +77,54 @@ func resourceTPUNode() *schema.Resource { Schema: map[string]*schema.Schema{ "accelerator_type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The type of hardware accelerators associated with this node.`, }, "cidr_block": { Type: schema.TypeString, Required: true, ForceNew: true, + Description: `The CIDR block that the TPU node will use when selecting an IP +address. This CIDR block must be a /29 block; the Compute Engine +networks API forbids a smaller block, and using a larger block would +be wasteful (a node can only consume one IP address). + +Errors will occur if the CIDR block has already been used for a +currently existing TPU node, the CIDR block conflicts with any +subnetworks in the user's provided network, or the provided network +is peered with another network that is using that CIDR block.`, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The immutable name of the TPU.`, }, "tensorflow_version": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: `The version of Tensorflow running in the Node.`, }, "zone": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The GCP location for the TPU.`, }, "description": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The user-supplied description of the TPU. Maximum of 512 characters.`, }, "labels": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Description: `Resource labels to represent user provided metadata.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "network": { Type: schema.TypeString, @@ -117,12 +132,17 @@ func resourceTPUNode() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareSelfLinkOrResourceName, + Description: `The name of a network to peer the TPU node to. It must be a +preexisting Compute Engine network inside of the project on which +this API has been activated. If none is provided, "default" will be +used.`, }, "scheduling_config": { Type: schema.TypeList, Optional: true, ForceNew: true, DiffSuppressFunc: compareTpuNodeSchedulingConfig, + Description: `Sets the scheduling options for this TPU instance.`, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -131,6 +151,7 @@ func resourceTPUNode() *schema.Resource { Optional: true, ForceNew: true, DiffSuppressFunc: compareTpuNodeSchedulingConfig, + Description: `Defines whether the TPU instance is preemptible.`, Default: false, }, }, @@ -139,15 +160,20 @@ func resourceTPUNode() *schema.Resource { "network_endpoints": { Type: schema.TypeList, Computed: true, + Description: `The network endpoints where TPU workers can be accessed and sent work. +It is recommended that Tensorflow clients of the node first reach out +to the first (index 0) entry.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ip_address": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: `The IP address of this network endpoint.`, }, "port": { - Type: schema.TypeInt, - Computed: true, + Type: schema.TypeInt, + Computed: true, + Description: `The port of this network endpoint.`, }, }, }, @@ -155,6 +181,10 @@ func resourceTPUNode() *schema.Resource { "service_account": { Type: schema.TypeString, Computed: true, + Description: `The service account used to run the tensor flow services within the +node. To share resources, including Google Cloud Storage data, with +the Tensorflow job running in the Node, this account must have +permissions to that data.`, }, "project": { Type: schema.TypeString,