Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Ansible - non-updatable resources should be deleted/created (#231)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
  • Loading branch information
modular-magician authored and rambleraptor committed Sep 5, 2019
1 parent 66f43ea commit 8b2a915
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def create(module, link, kind):


def update(module, link, kind):
module.fail_json(msg="Address cannot be edited")
delete(module, self_link(module), kind)
create(module, collection(module), kind)


def delete(module, link, kind):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_global_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def create(module, link, kind):


def update(module, link, kind):
module.fail_json(msg="GlobalAddress cannot be edited")
delete(module, self_link(module), kind)
create(module, collection(module), kind)


def delete(module, link, kind):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_instance_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ def create(module, link, kind):


def update(module, link, kind):
module.fail_json(msg="InstanceTemplate cannot be edited")
delete(module, self_link(module), kind)
create(module, collection(module), kind)


def delete(module, link, kind):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_interconnect_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ def create(module, link, kind):


def update(module, link, kind):
module.fail_json(msg="InterconnectAttachment cannot be edited")
delete(module, self_link(module), kind)
create(module, collection(module), kind)


def delete(module, link, kind):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ def create(module, link, kind):


def update(module, link, kind):
module.fail_json(msg="Route cannot be edited")
delete(module, self_link(module), kind)
create(module, collection(module), kind)


def delete(module, link, kind):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_ssl_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_target_vpn_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_compute_vpn_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_pubsub_topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def create(module, link):


def update(module, link):
module.fail_json(msg="Topic cannot be edited")
delete(module, self_link(module))
create(module, self_link(module))


def delete(module, link):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_sourcerepo_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def create(module, link):


def update(module, link):
module.fail_json(msg="Repository cannot be edited")
delete(module, self_link(module))
create(module, collection(module))


def delete(module, link):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/gcp_spanner_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def create(module, link):


def update(module, link):
module.fail_json(msg="Database cannot be edited")
delete(module, self_link(module))
create(module, collection(module))


def delete(module, link):
Expand Down

0 comments on commit 8b2a915

Please sign in to comment.