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

Commit

Permalink
Use Redis URL fields for their intended purposes (#248)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and rambleraptor committed May 20, 2019
1 parent d5d3667 commit 9fb67a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ansible/modules/cloud/google/gcp_redis_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def main():
changed = True
else:
if state == 'present':
fetch = create(module, collection(module))
fetch = create(module, create_link(module))
changed = True
else:
fetch = {}
Expand Down Expand Up @@ -378,6 +378,10 @@ def self_link(module):


def collection(module):
return "https://redis.googleapis.com/v1/projects/{project}/locations/{region}/instances".format(**module.params)


def create_link(module):
return "https://redis.googleapis.com/v1/projects/{project}/locations/{region}/instances?instanceId={name}".format(**module.params)


Expand Down

0 comments on commit 9fb67a6

Please sign in to comment.