diff --git a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py index 8a4e6ae79c..3bb5f0abeb 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py @@ -204,7 +204,8 @@ def create(module, link, kind): def update(module, link, kind): - module.fail_json(msg="SslCertificate cannot be edited") + delete(module, self_link(module), kind) + create(module, collection(module), kind) def delete(module, link, kind): diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py index 3e26ef4634..9b7a980544 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py @@ -222,7 +222,8 @@ def create(module, link, kind): def update(module, link, kind): - module.fail_json(msg="TargetVpnGateway cannot be edited") + delete(module, self_link(module), kind) + create(module, collection(module), kind) def delete(module, link, kind): diff --git a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py index ec7be3db05..1302affb83 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py @@ -314,7 +314,8 @@ def create(module, link, kind): def update(module, link, kind): - module.fail_json(msg="VpnTunnel cannot be edited") + delete(module, self_link(module), kind) + create(module, collection(module), kind) def delete(module, link, kind): diff --git a/test/integration/targets/gcp_compute_router/defaults/main.yml b/test/integration/targets/gcp_compute_router/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_router/defaults/main.yml +++ b/test/integration/targets/gcp_compute_router/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_ssl_certificate/defaults/main.yml b/test/integration/targets/gcp_compute_ssl_certificate/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_ssl_certificate/defaults/main.yml +++ b/test/integration/targets/gcp_compute_ssl_certificate/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_ssl_policy/defaults/main.yml b/test/integration/targets/gcp_compute_ssl_policy/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_ssl_policy/defaults/main.yml +++ b/test/integration/targets/gcp_compute_ssl_policy/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_subnetwork/defaults/main.yml b/test/integration/targets/gcp_compute_subnetwork/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_subnetwork/defaults/main.yml +++ b/test/integration/targets/gcp_compute_subnetwork/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_http_proxy/defaults/main.yml b/test/integration/targets/gcp_compute_target_http_proxy/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_http_proxy/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_http_proxy/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_https_proxy/defaults/main.yml b/test/integration/targets/gcp_compute_target_https_proxy/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_https_proxy/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_https_proxy/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_pool/defaults/main.yml b/test/integration/targets/gcp_compute_target_pool/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_pool/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_pool/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_ssl_proxy/defaults/main.yml b/test/integration/targets/gcp_compute_target_ssl_proxy/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_ssl_proxy/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_ssl_proxy/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_tcp_proxy/defaults/main.yml b/test/integration/targets/gcp_compute_target_tcp_proxy/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_tcp_proxy/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_tcp_proxy/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_target_vpn_gateway/defaults/main.yml b/test/integration/targets/gcp_compute_target_vpn_gateway/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_target_vpn_gateway/defaults/main.yml +++ b/test/integration/targets/gcp_compute_target_vpn_gateway/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_url_map/defaults/main.yml b/test/integration/targets/gcp_compute_url_map/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_url_map/defaults/main.yml +++ b/test/integration/targets/gcp_compute_url_map/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}" diff --git a/test/integration/targets/gcp_compute_vpn_tunnel/defaults/main.yml b/test/integration/targets/gcp_compute_vpn_tunnel/defaults/main.yml index aa87a2a8e0..ba66644fc1 100644 --- a/test/integration/targets/gcp_compute_vpn_tunnel/defaults/main.yml +++ b/test/integration/targets/gcp_compute_vpn_tunnel/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file -resource_name: '{{resource_prefix}}' +resource_name: "{{ resource_prefix }}"