diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py index f9626288c68..6c012c5c3ed 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -617,7 +617,7 @@ def response_to_hash(module, response): def license_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1//projects/.*/global/licenses/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1//projects/.*/global/licenses/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py index fdf5d1abd5a..c8b4f611cc2 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -1109,7 +1109,7 @@ def response_to_hash(module, response): def disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/[a-z1-9\-]*/diskTypes/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name return name @@ -1118,7 +1118,7 @@ def disk_type_selflink(name, params): def machine_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/[a-z1-9\-]*/machineTypes/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/machineTypes/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py index 228cd8de38a..aa482abcd3c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -386,7 +386,7 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py index cca5ee042e2..e5c1cafe34d 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py @@ -487,7 +487,7 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py index 7923125a104..24fb4b1d8d3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -1037,7 +1037,7 @@ def response_to_hash(module, response): def disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/[a-z1-9\-]*/diskTypes/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py index 9af64b4611f..d917d70d13d 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -435,7 +435,7 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py index 12beabc7503..43a804eb446 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -527,7 +527,7 @@ def response_to_hash(module, response): def zone_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/%s".format(**params) % name return name @@ -536,7 +536,7 @@ def zone_selflink(name, params): def region_disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/{region}/diskTypes/[a-z1-9\-]*" + url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*/diskTypes/.*" if not re.match(url, name): name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/diskTypes/%s".format(**params) % name return name