From df8a9d7b87bf0713ca709c2311f8de1c9812cee8 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 12 Jan 2021 15:46:29 -0800 Subject: [PATCH] fix MM locations (#4394) (#363) Co-authored-by: upodroid Signed-off-by: Modular Magician Co-authored-by: upodroid --- plugins/modules/gcp_tpu_node.py | 8 ++++---- plugins/modules/gcp_tpu_node_info.py | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/modules/gcp_tpu_node.py b/plugins/modules/gcp_tpu_node.py index 95d2335..ed8636e 100644 --- a/plugins/modules/gcp_tpu_node.py +++ b/plugins/modules/gcp_tpu_node.py @@ -114,8 +114,8 @@ options: type: dict zone: description: - - The GCP location for the TPU. - required: true + - The GCP location for the TPU. If it is not provided, the provider zone is used. + required: false type: str project: description: @@ -275,7 +275,7 @@ labels: type: dict zone: description: - - The GCP location for the TPU. + - The GCP location for the TPU. If it is not provided, the provider zone is used. returned: success type: str ''' @@ -315,7 +315,7 @@ def main(): use_service_networking=dict(type='bool'), scheduling_config=dict(type='dict', options=dict(preemptible=dict(required=True, type='bool'))), labels=dict(type='dict'), - zone=dict(required=True, type='str'), + zone=dict(type='str'), ), mutually_exclusive=[['cidr_block', 'use_service_networking']], ) diff --git a/plugins/modules/gcp_tpu_node_info.py b/plugins/modules/gcp_tpu_node_info.py index 4112966..c35ae47 100644 --- a/plugins/modules/gcp_tpu_node_info.py +++ b/plugins/modules/gcp_tpu_node_info.py @@ -41,8 +41,8 @@ requirements: options: zone: description: - - The GCP location for the TPU. - required: true + - The GCP location for the TPU. If it is not provided, the provider zone is used. + required: false type: str project: description: @@ -202,7 +202,8 @@ resources: type: dict zone: description: - - The GCP location for the TPU. + - The GCP location for the TPU. If it is not provided, the provider zone is + used. returned: success type: str ''' @@ -219,7 +220,7 @@ import json def main(): - module = GcpModule(argument_spec=dict(zone=dict(required=True, type='str'))) + module = GcpModule(argument_spec=dict(zone=dict(type='str'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']