From f0b41b7daa73aae9d7a854dd8e467b618a3bb5a7 Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 23 May 2019 11:27:59 -0700 Subject: [PATCH] client side validation can't have docs with explicit choices (#258) Signed-off-by: Modular Magician --- plugins/modules/gcp_bigquery_dataset.py | 5 +- plugins/modules/gcp_bigquery_table.py | 78 ++++--------------- plugins/modules/gcp_compute_address.py | 8 +- .../modules/gcp_compute_backend_service.py | 20 +---- plugins/modules/gcp_compute_firewall.py | 4 +- .../modules/gcp_compute_forwarding_rule.py | 20 +---- plugins/modules/gcp_compute_global_address.py | 8 +- .../gcp_compute_global_forwarding_rule.py | 16 +--- plugins/modules/gcp_compute_health_check.py | 22 ++---- plugins/modules/gcp_compute_image.py | 9 +-- plugins/modules/gcp_compute_instance.py | 25 ++---- .../modules/gcp_compute_instance_template.py | 15 +--- .../gcp_compute_interconnect_attachment.py | 5 +- plugins/modules/gcp_compute_network.py | 4 +- plugins/modules/gcp_compute_router.py | 4 +- plugins/modules/gcp_compute_ssl_policy.py | 11 +-- .../modules/gcp_compute_target_https_proxy.py | 5 +- plugins/modules/gcp_compute_target_pool.py | 5 +- .../modules/gcp_compute_target_ssl_proxy.py | 4 +- .../modules/gcp_compute_target_tcp_proxy.py | 4 +- plugins/modules/gcp_container_cluster.py | 8 +- plugins/modules/gcp_dns_managed_zone.py | 4 +- .../modules/gcp_dns_resource_record_set.py | 16 +--- plugins/modules/gcp_iam_role.py | 9 +-- .../modules/gcp_iam_service_account_key.py | 10 +-- plugins/modules/gcp_redis_instance.py | 4 +- plugins/modules/gcp_sql_instance.py | 20 +---- plugins/modules/gcp_storage_bucket.py | 36 ++------- .../gcp_storage_bucket_access_control.py | 10 +-- plugins/modules/gcp_storage_object.py | 4 +- 30 files changed, 86 insertions(+), 307 deletions(-) diff --git a/plugins/modules/gcp_bigquery_dataset.py b/plugins/modules/gcp_bigquery_dataset.py index 40d1d11..82105bd 100644 --- a/plugins/modules/gcp_bigquery_dataset.py +++ b/plugins/modules/gcp_bigquery_dataset.py @@ -69,11 +69,8 @@ options: description: - Describes the rights granted to the user specified by the other member of the access object . + - 'Some valid choices include: "READER", "WRITER", "OWNER"' required: false - choices: - - READER - - WRITER - - OWNER special_group: description: - A special group to grant access to. diff --git a/plugins/modules/gcp_bigquery_table.py b/plugins/modules/gcp_bigquery_table.py index 6aaa07e..db46277 100644 --- a/plugins/modules/gcp_bigquery_table.py +++ b/plugins/modules/gcp_bigquery_table.py @@ -118,9 +118,8 @@ options: type: description: - The only type supported is DAY, which will generate one partition per day. + - 'Some valid choices include: "DAY"' required: false - choices: - - DAY schema: description: - Describes the schema of this table. @@ -142,11 +141,8 @@ options: mode: description: - The field mode. + - 'Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED"' required: false - choices: - - NULLABLE - - REQUIRED - - REPEATED name: description: - The field name. @@ -154,17 +150,9 @@ options: type: description: - The field data type. + - 'Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT", + "TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD"' required: false - choices: - - STRING - - BYTES - - INTEGER - - FLOAT - - TIMESTAMP - - DATE - - TIME - - DATETIME - - RECORD encryption_configuration: description: - Custom encryption configuration. @@ -197,10 +185,8 @@ options: compression: description: - The compression type of the data source. + - 'Some valid choices include: "GZIP", "NONE"' required: false - choices: - - GZIP - - NONE ignore_unknown_values: description: - Indicates if BigQuery should allow extra values that are not represented @@ -216,14 +202,9 @@ options: source_format: description: - The data format. + - 'Some valid choices include: "CSV", "GOOGLE_SHEETS", "NEWLINE_DELIMITED_JSON", + "AVRO", "DATASTORE_BACKUP", "BIGTABLE"' required: false - choices: - - CSV - - GOOGLE_SHEETS - - NEWLINE_DELIMITED_JSON - - AVRO - - DATASTORE_BACKUP - - BIGTABLE source_uris: description: - 'The fully-qualified URIs that point to your data in Google Cloud. For Google @@ -257,11 +238,8 @@ options: mode: description: - Field mode. + - 'Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED"' required: false - choices: - - NULLABLE - - REQUIRED - - REPEATED name: description: - Field name. @@ -269,17 +247,9 @@ options: type: description: - Field data type. + - 'Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT", + "TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD"' required: false - choices: - - STRING - - BYTES - - INTEGER - - FLOAT - - TIMESTAMP - - DATE - - TIME - - DATETIME - - RECORD google_sheets_options: description: - Additional options if sourceFormat is set to GOOGLE_SHEETS. @@ -311,10 +281,8 @@ options: encoding: description: - The character encoding of the data. + - 'Some valid choices include: "UTF-8", "ISO-8859-1"' required: false - choices: - - UTF-8 - - ISO-8859-1 field_delimiter: description: - The separator for fields in a CSV file. @@ -361,10 +329,8 @@ options: encoding: description: - The encoding of the values when the type is not STRING. + - 'Some valid choices include: "TEXT", "BINARY"' required: false - choices: - - TEXT - - BINARY field_name: description: - If the qualifier is not a valid BigQuery field identifier, a @@ -384,20 +350,14 @@ options: type: description: - The type to convert the value in cells of this column. + - 'Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT", + "BOOLEAN"' required: false - choices: - - BYTES - - STRING - - INTEGER - - FLOAT - - BOOLEAN encoding: description: - The encoding of the values when the type is not STRING. + - 'Some valid choices include: "TEXT", "BINARY"' required: false - choices: - - TEXT - - BINARY family_id: description: - Identifier of the column family. @@ -411,13 +371,9 @@ options: type: description: - The type to convert the value in cells of this column family. + - 'Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT", + "BOOLEAN"' required: false - choices: - - BYTES - - STRING - - INTEGER - - FLOAT - - BOOLEAN dataset: description: - Name of the dataset. diff --git a/plugins/modules/gcp_compute_address.py b/plugins/modules/gcp_compute_address.py index bf3a451..5c0af5e 100644 --- a/plugins/modules/gcp_compute_address.py +++ b/plugins/modules/gcp_compute_address.py @@ -66,12 +66,10 @@ options: description: - The type of address to reserve, either INTERNAL or EXTERNAL. - If unspecified, defaults to EXTERNAL. + - 'Some valid choices include: "INTERNAL", "EXTERNAL"' required: false default: EXTERNAL version_added: 2.7 - choices: - - INTERNAL - - EXTERNAL description: description: - An optional description of this resource. @@ -89,11 +87,9 @@ options: - '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.' + - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false version_added: 2.8 - choices: - - PREMIUM - - STANDARD subnetwork: description: - The URL of the subnetwork in which to reserve the address. If an IP address diff --git a/plugins/modules/gcp_compute_backend_service.py b/plugins/modules/gcp_compute_backend_service.py index ebc0c35..c9a636d 100644 --- a/plugins/modules/gcp_compute_backend_service.py +++ b/plugins/modules/gcp_compute_backend_service.py @@ -66,12 +66,9 @@ options: - 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). + - 'Some valid choices include: "UTILIZATION", "RATE", "CONNECTION"' required: false default: UTILIZATION - choices: - - UTILIZATION - - RATE - - CONNECTION capacity_scaler: description: - A multiplier applied to the group's maximum servicing capacity (based on @@ -242,11 +239,10 @@ options: load balancing. A backend service created for one type of load balancing cannot be used with the other. Must be `EXTERNAL` for a global backend service. Defaults to `EXTERNAL`. + - 'Some valid choices include: "EXTERNAL"' required: false default: EXTERNAL version_added: 2.7 - choices: - - EXTERNAL name: description: - Name of the resource. Provided by the client when the resource is created. The @@ -267,13 +263,8 @@ options: - '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.' + - 'Some valid choices include: "HTTP", "HTTPS", "HTTP2", "TCP", "SSL"' required: false - choices: - - HTTP - - HTTPS - - HTTP2 - - TCP - - SSL security_policy: description: - The security policy associated with this backend service. @@ -284,11 +275,8 @@ options: - Type of session affinity to use. The default is NONE. - When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE. - When the protocol is UDP, this field is not used. + - 'Some valid choices include: "NONE", "CLIENT_IP", "GENERATED_COOKIE"' required: false - choices: - - NONE - - CLIENT_IP - - GENERATED_COOKIE timeout_sec: description: - How many seconds to wait for the backend before considering it a failed request. diff --git a/plugins/modules/gcp_compute_firewall.py b/plugins/modules/gcp_compute_firewall.py index 1ebcc72..24317d0 100644 --- a/plugins/modules/gcp_compute_firewall.py +++ b/plugins/modules/gcp_compute_firewall.py @@ -114,11 +114,9 @@ options: - '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.' + - 'Some valid choices include: "INGRESS", "EGRESS"' required: false version_added: 2.8 - choices: - - INGRESS - - EGRESS disabled: description: - Denotes whether the firewall rule is disabled, i.e not applied to the network diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index 41a0259..d0eb51d 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -81,14 +81,8 @@ options: - 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. + - 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"' required: false - choices: - - TCP - - UDP - - ESP - - AH - - SCTP - - ICMP backend_service: description: - A BackendService to receive the matched traffic. This is used only for INTERNAL @@ -102,10 +96,8 @@ options: ip_version: description: - ipVersion is not a valid field for regional forwarding rules. + - 'Some valid choices include: "IPV4", "IPV6"' required: false - choices: - - IPV4 - - IPV6 load_balancing_scheme: description: - 'This signifies what the ForwardingRule will be used for and can only take the @@ -113,10 +105,8 @@ options: be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) .' + - 'Some valid choices include: "INTERNAL", "EXTERNAL"' required: false - choices: - - INTERNAL - - EXTERNAL name: description: - Name of the resource; provided by the client when the resource is created. The @@ -199,11 +189,9 @@ options: - '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.' + - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false version_added: 2.8 - choices: - - PREMIUM - - STANDARD service_label: description: - An optional prefix to the service name for this Forwarding Rule. diff --git a/plugins/modules/gcp_compute_global_address.py b/plugins/modules/gcp_compute_global_address.py index 7a19f6f..bff9806 100644 --- a/plugins/modules/gcp_compute_global_address.py +++ b/plugins/modules/gcp_compute_global_address.py @@ -70,21 +70,17 @@ options: description: - The IP Version that will be used by this address. Valid options are `IPV4` or `IPV6`. The default value is `IPV4`. + - 'Some valid choices include: "IPV4", "IPV6"' required: false - choices: - - IPV4 - - IPV6 address_type: 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." + - 'Some valid choices include: "EXTERNAL", "INTERNAL"' required: false default: EXTERNAL version_added: 2.8 - choices: - - EXTERNAL - - INTERNAL extends_documentation_fragment: gcp notes: - 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/globalAddresses)' diff --git a/plugins/modules/gcp_compute_global_forwarding_rule.py b/plugins/modules/gcp_compute_global_forwarding_rule.py index 1c09e65..6e139b5 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule.py @@ -83,22 +83,14 @@ options: - 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. + - 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"' required: false - choices: - - TCP - - UDP - - ESP - - AH - - SCTP - - ICMP ip_version: description: - The IP Version that will be used by this global forwarding rule. - Valid options are IPV4 or IPV6. + - 'Some valid choices include: "IPV4", "IPV6"' required: false - choices: - - IPV4 - - IPV6 load_balancing_scheme: description: - This signifies what the GlobalForwardingRule will be used for. @@ -106,10 +98,8 @@ options: 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.' + - 'Some valid choices include: "INTERNAL_SELF_MANAGED", "EXTERNAL"' required: false - choices: - - INTERNAL_SELF_MANAGED - - EXTERNAL name: description: - Name of the resource; provided by the client when the resource is created. The diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index e5dba3d..7c12986 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -100,12 +100,8 @@ options: - Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. + - 'Some valid choices include: "TCP", "SSL", "HTTP", "HTTPS"' required: false - choices: - - TCP - - SSL - - HTTP - - HTTPS http_health_check: description: - A nested object resource. @@ -143,11 +139,9 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false default: NONE - choices: - - NONE - - PROXY_V1 https_health_check: description: - A nested object resource. @@ -185,11 +179,9 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false default: NONE - choices: - - NONE - - PROXY_V1 tcp_health_check: description: - A nested object resource. @@ -221,11 +213,9 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false default: NONE - choices: - - NONE - - PROXY_V1 ssl_health_check: description: - A nested object resource. @@ -257,11 +247,9 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false default: NONE - choices: - - NONE - - PROXY_V1 extends_documentation_fragment: gcp notes: - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks)' diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index 7bf7402..f962628 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -91,9 +91,8 @@ options: For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features. + - 'Some valid choices include: "VIRTIO_SCSI_MULTIQUEUE"' required: false - choices: - - VIRTIO_SCSI_MULTIQUEUE image_encryption_key: description: - Encrypts the image using a customer-supplied encryption key. @@ -134,9 +133,8 @@ options: - 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. + - 'Some valid choices include: "TAR"' required: false - choices: - - TAR sha1_checksum: description: - An optional SHA1 checksum of the disk image before unpackaging. @@ -179,9 +177,8 @@ options: description: - The type of the image used to create this disk. The default and only value is RAW . + - 'Some valid choices include: "RAW"' required: false - choices: - - RAW extends_documentation_fragment: gcp notes: - 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/images)' diff --git a/plugins/modules/gcp_compute_instance.py b/plugins/modules/gcp_compute_instance.py index 918a12b..fdf5d1a 100644 --- a/plugins/modules/gcp_compute_instance.py +++ b/plugins/modules/gcp_compute_instance.py @@ -157,18 +157,14 @@ options: SCSI or NVME. The default is SCSI. - Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. + - 'Some valid choices include: "SCSI", "NVME"' required: false - choices: - - SCSI - - NVME mode: description: - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. + - 'Some valid choices include: "READ_WRITE", "READ_ONLY"' required: false - choices: - - READ_WRITE - - READ_ONLY source: description: - Reference to a disk. When creating a new instance, one of initializeParams.sourceImage @@ -185,10 +181,8 @@ options: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. + - 'Some valid choices include: "SCRATCH", "PERSISTENT"' required: false - choices: - - SCRATCH - - PERSISTENT guest_accelerators: description: - List of the type and count of accelerator cards attached to the instance . @@ -267,9 +261,8 @@ options: type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. + - 'Some valid choices include: "ONE_TO_ONE_NAT"' required: true - choices: - - ONE_TO_ONE_NAT alias_ip_ranges: description: - An array of alias IP ranges for this network interface. Can only be specified @@ -367,16 +360,10 @@ options: RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.' - As a user, use RUNNING to keep a machine "on" and TERMINATED to turn a machine off . + - 'Some valid choices include: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", + "SUSPENDING", "SUSPENDED", "TERMINATED"' required: false version_added: 2.8 - choices: - - PROVISIONING - - STAGING - - RUNNING - - STOPPING - - SUSPENDING - - SUSPENDED - - TERMINATED tags: description: - A list of tags to apply to this instance. Tags are used to identify valid sources diff --git a/plugins/modules/gcp_compute_instance_template.py b/plugins/modules/gcp_compute_instance_template.py index aa6b143..7923125 100644 --- a/plugins/modules/gcp_compute_instance_template.py +++ b/plugins/modules/gcp_compute_instance_template.py @@ -180,18 +180,14 @@ options: either SCSI or NVME. The default is SCSI. - Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. + - 'Some valid choices include: "SCSI", "NVME"' required: false - choices: - - SCSI - - NVME mode: description: - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. + - 'Some valid choices include: "READ_WRITE", "READ_ONLY"' required: false - choices: - - READ_WRITE - - READ_ONLY source: description: - Reference to a disk. When creating a new instance, one of initializeParams.sourceImage @@ -210,10 +206,8 @@ options: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. + - 'Some valid choices include: "SCRATCH", "PERSISTENT"' required: false - choices: - - SCRATCH - - PERSISTENT machine_type: description: - The machine type to use in the VM instance template. @@ -281,9 +275,8 @@ options: type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. + - 'Some valid choices include: "ONE_TO_ONE_NAT"' required: true - choices: - - ONE_TO_ONE_NAT alias_ip_ranges: description: - An array of alias IP ranges for this network interface. Can only be diff --git a/plugins/modules/gcp_compute_interconnect_attachment.py b/plugins/modules/gcp_compute_interconnect_attachment.py index 18deb73..9af64b4 100644 --- a/plugins/modules/gcp_compute_interconnect_attachment.py +++ b/plugins/modules/gcp_compute_interconnect_attachment.py @@ -70,11 +70,8 @@ options: type: description: - The type of InterconnectAttachment you wish to create. Defaults to DEDICATED. + - 'Some valid choices include: "DEDICATED", "PARTNER", "PARTNER_PROVIDER"' required: false - choices: - - DEDICATED - - PARTNER - - PARTNER_PROVIDER router: description: - URL of the cloud router to be used for dynamic routing. This router must be diff --git a/plugins/modules/gcp_compute_network.py b/plugins/modules/gcp_compute_network.py index fe89fec..3393f1d 100644 --- a/plugins/modules/gcp_compute_network.py +++ b/plugins/modules/gcp_compute_network.py @@ -94,10 +94,8 @@ options: 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. + - 'Some valid choices include: "REGIONAL", "GLOBAL"' required: true - choices: - - REGIONAL - - GLOBAL extends_documentation_fragment: gcp notes: - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/networks)' diff --git a/plugins/modules/gcp_compute_router.py b/plugins/modules/gcp_compute_router.py index b9c1573..2c5315f 100644 --- a/plugins/modules/gcp_compute_router.py +++ b/plugins/modules/gcp_compute_router.py @@ -83,11 +83,9 @@ options: description: - User-specified flag to indicate which mode to use for advertisement. - 'Valid values of this enum field are: DEFAULT, CUSTOM .' + - 'Some valid choices include: "DEFAULT", "CUSTOM"' required: false default: DEFAULT - choices: - - DEFAULT - - CUSTOM advertised_groups: description: - User-specified list of prefix groups to advertise in custom mode. diff --git a/plugins/modules/gcp_compute_ssl_policy.py b/plugins/modules/gcp_compute_ssl_policy.py index 4bab5d1..0a4573a 100644 --- a/plugins/modules/gcp_compute_ssl_policy.py +++ b/plugins/modules/gcp_compute_ssl_policy.py @@ -67,22 +67,15 @@ options: 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. + - 'Some valid choices include: "COMPATIBLE", "MODERN", "RESTRICTED", "CUSTOM"' required: false - choices: - - COMPATIBLE - - MODERN - - RESTRICTED - - CUSTOM min_tls_version: 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`. + - 'Some valid choices include: "TLS_1_0", "TLS_1_1", "TLS_1_2"' required: false - choices: - - TLS_1_0 - - TLS_1_1 - - TLS_1_2 custom_features: description: - A list of features enabled when the selected profile is CUSTOM. The method returns diff --git a/plugins/modules/gcp_compute_target_https_proxy.py b/plugins/modules/gcp_compute_target_https_proxy.py index 0bd0433..ea6088f 100644 --- a/plugins/modules/gcp_compute_target_https_proxy.py +++ b/plugins/modules/gcp_compute_target_https_proxy.py @@ -68,12 +68,9 @@ options: 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. + - 'Some valid choices include: "NONE", "ENABLE", "DISABLE"' required: false version_added: 2.7 - choices: - - NONE - - ENABLE - - DISABLE ssl_certificates: description: - A list of SslCertificate resources that are used to authenticate connections diff --git a/plugins/modules/gcp_compute_target_pool.py b/plugins/modules/gcp_compute_target_pool.py index e08683e..32a77c9 100644 --- a/plugins/modules/gcp_compute_target_pool.py +++ b/plugins/modules/gcp_compute_target_pool.py @@ -118,11 +118,8 @@ options: in the pool while that instance remains healthy." - "- CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy." + - 'Some valid choices include: "NONE", "CLIENT_IP", "CLIENT_IP_PROTO"' required: false - choices: - - NONE - - CLIENT_IP - - CLIENT_IP_PROTO region: description: - The region where the target pool resides. diff --git a/plugins/modules/gcp_compute_target_ssl_proxy.py b/plugins/modules/gcp_compute_target_ssl_proxy.py index 75aec6c..342caa8 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy.py @@ -65,10 +65,8 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false - choices: - - NONE - - PROXY_V1 service: description: - A reference to the BackendService resource. diff --git a/plugins/modules/gcp_compute_target_tcp_proxy.py b/plugins/modules/gcp_compute_target_tcp_proxy.py index 5b3d8d2..b6fbd4a 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy.py @@ -65,10 +65,8 @@ options: description: - Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. + - 'Some valid choices include: "NONE", "PROXY_V1"' required: false - choices: - - NONE - - PROXY_V1 service: description: - A reference to the BackendService resource. diff --git a/plugins/modules/gcp_container_cluster.py b/plugins/modules/gcp_container_cluster.py index feaabe9..b8110cb 100644 --- a/plugins/modules/gcp_container_cluster.py +++ b/plugins/modules/gcp_container_cluster.py @@ -176,10 +176,8 @@ options: options: logging.googleapis.com - the Google Cloud Logging service.' - none - no logs will be exported from the cluster. - if left as an empty string,logging.googleapis.com will be used. + - 'Some valid choices include: "logging.googleapis.com", "none"' required: false - choices: - - logging.googleapis.com - - none monitoring_service: description: - The monitoring service the cluster should use to write metrics. @@ -187,10 +185,8 @@ options: service.' - none - no metrics will be exported from the cluster. - if left as an empty string, monitoring.googleapis.com will be used. + - 'Some valid choices include: "monitoring.googleapis.com", "none"' required: false - choices: - - monitoring.googleapis.com - - none network: description: - The name of the Google Compute Engine network to which the cluster is connected. diff --git a/plugins/modules/gcp_dns_managed_zone.py b/plugins/modules/gcp_dns_managed_zone.py index 5c68f47..6026ad2 100644 --- a/plugins/modules/gcp_dns_managed_zone.py +++ b/plugins/modules/gcp_dns_managed_zone.py @@ -141,12 +141,10 @@ options: - '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`.' + - 'Some valid choices include: "private", "public"' required: false default: public version_added: 2.8 - choices: - - private - - public private_visibility_config: description: - For privately visible zones, the set of Virtual Private Cloud resources that diff --git a/plugins/modules/gcp_dns_resource_record_set.py b/plugins/modules/gcp_dns_resource_record_set.py index 82cab65..76667e5 100644 --- a/plugins/modules/gcp_dns_resource_record_set.py +++ b/plugins/modules/gcp_dns_resource_record_set.py @@ -58,21 +58,9 @@ options: type: description: - One of valid DNS resource types. + - 'Some valid choices include: "A", "AAAA", "CAA", "CNAME", "MX", "NAPTR", "NS", + "PTR", "SOA", "SPF", "SRV", "TLSA", "TXT"' required: true - choices: - - A - - AAAA - - CAA - - CNAME - - MX - - NAPTR - - NS - - PTR - - SOA - - SPF - - SRV - - TLSA - - TXT ttl: description: - Number of seconds that this ResourceRecordSet can be cached by resolvers. diff --git a/plugins/modules/gcp_iam_role.py b/plugins/modules/gcp_iam_role.py index e4f642b..6a03965 100644 --- a/plugins/modules/gcp_iam_role.py +++ b/plugins/modules/gcp_iam_role.py @@ -67,14 +67,9 @@ options: stage: description: - The current launch stage of the role. + - 'Some valid choices include: "ALPHA", "BETA", "GA", "DEPRECATED", "DISABLED", + "EAP"' required: false - choices: - - ALPHA - - BETA - - GA - - DEPRECATED - - DISABLED - - EAP extends_documentation_fragment: gcp ''' diff --git a/plugins/modules/gcp_iam_service_account_key.py b/plugins/modules/gcp_iam_service_account_key.py index fa51fd3..b923274 100644 --- a/plugins/modules/gcp_iam_service_account_key.py +++ b/plugins/modules/gcp_iam_service_account_key.py @@ -50,19 +50,13 @@ options: private_key_type: description: - Output format for the service account key. + - 'Some valid choices include: "TYPE_UNSPECIFIED", "TYPE_PKCS12_FILE", "TYPE_GOOGLE_CREDENTIALS_FILE"' required: false - choices: - - TYPE_UNSPECIFIED - - TYPE_PKCS12_FILE - - TYPE_GOOGLE_CREDENTIALS_FILE key_algorithm: description: - Specifies the algorithm for the key. + - 'Some valid choices include: "KEY_ALG_UNSPECIFIED", "KEY_ALG_RSA_1024", "KEY_ALG_RSA_2048"' required: false - choices: - - KEY_ALG_UNSPECIFIED - - KEY_ALG_RSA_1024 - - KEY_ALG_RSA_2048 service_account: description: - The name of the serviceAccount. diff --git a/plugins/modules/gcp_redis_instance.py b/plugins/modules/gcp_redis_instance.py index 16e2a7f..451f7ea 100644 --- a/plugins/modules/gcp_redis_instance.py +++ b/plugins/modules/gcp_redis_instance.py @@ -105,11 +105,9 @@ options: description: - 'The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD_HA: highly available primary/replica instances .' + - 'Some valid choices include: "BASIC", "STANDARD_HA"' required: false default: BASIC - choices: - - BASIC - - STANDARD_HA region: description: - The name of the Redis region of the instance. diff --git a/plugins/modules/gcp_sql_instance.py b/plugins/modules/gcp_sql_instance.py index 11e529e..8b8349c 100644 --- a/plugins/modules/gcp_sql_instance.py +++ b/plugins/modules/gcp_sql_instance.py @@ -54,11 +54,8 @@ options: - "* FIRST_GEN: First Generation instance. MySQL only." - "* SECOND_GEN: Second Generation instance or PostgreSQL instance." - "* EXTERNAL: A database server that is not managed by Google." + - 'Some valid choices include: "FIRST_GEN", "SECOND_GEN", "EXTERNAL"' required: false - choices: - - FIRST_GEN - - SECOND_GEN - - EXTERNAL connection_name: description: - Connection name of the Cloud SQL instance used in connection strings. @@ -70,12 +67,8 @@ options: MYSQL_5_7. Defaults to MYSQL_5_6. - 'PostgreSQL instances: POSTGRES_9_6 The databaseVersion property can not be changed after instance creation.' + - 'Some valid choices include: "MYSQL_5_5", "MYSQL_5_6", "MYSQL_5_7", "POSTGRES_9_6"' required: false - choices: - - MYSQL_5_5 - - MYSQL_5_6 - - MYSQL_5_7 - - POSTGRES_9_6 failover_replica: description: - The name and status of the failover replica. This property is applicable only @@ -94,11 +87,8 @@ options: - "* CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master." - "* ON_PREMISES_INSTANCE: An instance running on the customer's premises." - "* READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica." + - 'Some valid choices include: "CLOUD_SQL_INSTANCE", "ON_PREMISES_INSTANCE", "READ_REPLICA_INSTANCE"' required: false - choices: - - CLOUD_SQL_INSTANCE - - ON_PREMISES_INSTANCE - - READ_REPLICA_INSTANCE ipv6_address: description: - The IPv6 address assigned to the instance. This property is applicable only @@ -255,10 +245,8 @@ options: availability_type: description: - The availabilityType define if your postgres instance is run zonal or regional. + - 'Some valid choices include: "ZONAL", "REGIONAL"' required: false - choices: - - ZONAL - - REGIONAL backup_configuration: description: - The daily backup configuration for the instance. diff --git a/plugins/modules/gcp_storage_bucket.py b/plugins/modules/gcp_storage_bucket.py index 1d6d379..3c483ef 100644 --- a/plugins/modules/gcp_storage_bucket.py +++ b/plugins/modules/gcp_storage_bucket.py @@ -92,19 +92,13 @@ options: team: description: - The team. + - 'Some valid choices include: "editors", "owners", "viewers"' required: false - choices: - - editors - - owners - - viewers role: description: - The access permission for the entity. + - 'Some valid choices include: "OWNER", "READER", "WRITER"' required: false - choices: - - OWNER - - READER - - WRITER cors: description: - The bucket's Cross-Origin Resource Sharing (CORS) configuration. @@ -161,10 +155,8 @@ options: role: description: - The access permission for the entity. + - 'Some valid choices include: "OWNER", "READER"' required: true - choices: - - OWNER - - READER lifecycle: description: - The bucket's lifecycle configuration. @@ -190,10 +182,8 @@ options: description: - Type of the action. Currently, only Delete and SetStorageClass are supported. + - 'Some valid choices include: "Delete", "SetStorageClass"' required: false - choices: - - Delete - - SetStorageClass condition: description: - The condition(s) under which the action will be taken. @@ -274,14 +264,9 @@ options: - Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. + - 'Some valid choices include: "MULTI_REGIONAL", "REGIONAL", "STANDARD", "NEARLINE", + "COLDLINE", "DURABLE_REDUCED_AVAILABILITY"' required: false - choices: - - MULTI_REGIONAL - - REGIONAL - - STANDARD - - NEARLINE - - COLDLINE - - DURABLE_REDUCED_AVAILABILITY versioning: description: - The bucket's versioning configuration. @@ -329,14 +314,9 @@ options: - '- "projectPrivate": Object owner gets OWNER access, and project team members get access according to their roles.' - '- "publicRead": Object owner gets OWNER access, and allUsers get READER access.' + - 'Some valid choices include: "authenticatedRead", "bucketOwnerFullControl", + "bucketOwnerRead", "private", "projectPrivate", "publicRead"' required: false - choices: - - authenticatedRead - - bucketOwnerFullControl - - bucketOwnerRead - - private - - projectPrivate - - publicRead extends_documentation_fragment: gcp ''' diff --git a/plugins/modules/gcp_storage_bucket_access_control.py b/plugins/modules/gcp_storage_bucket_access_control.py index fe7e909..a91068c 100644 --- a/plugins/modules/gcp_storage_bucket_access_control.py +++ b/plugins/modules/gcp_storage_bucket_access_control.py @@ -90,19 +90,13 @@ options: team: description: - The team. + - 'Some valid choices include: "editors", "owners", "viewers"' required: false - choices: - - editors - - owners - - viewers role: description: - The access permission for the entity. + - 'Some valid choices include: "OWNER", "READER", "WRITER"' required: false - choices: - - OWNER - - READER - - WRITER extends_documentation_fragment: gcp ''' diff --git a/plugins/modules/gcp_storage_object.py b/plugins/modules/gcp_storage_object.py index cd5b918..3158e17 100644 --- a/plugins/modules/gcp_storage_object.py +++ b/plugins/modules/gcp_storage_object.py @@ -50,10 +50,8 @@ options: action: description: - Upload or download from the bucket. + - 'Some valid choices include: "download", "upload"' required: false - choices: - - download - - upload overwrite: description: - "'Overwrite the file on the bucket/local machine. If overwrite is false and