Use Redis URL fields for their intended purposes (#248)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-05-20 16:05:45 -07:00 committed by Alex Stephen
parent a075750f3b
commit d9ee4beac6

View file

@ -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 = {}
@ -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)