mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-09 12:20:27 -07:00
Better Docs + runtime verification for Resource Record Set (#369)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
fa63f28139
commit
29203ad250
2 changed files with 16 additions and 15 deletions
|
@ -76,12 +76,9 @@ options:
|
||||||
type: list
|
type: list
|
||||||
managed_zone:
|
managed_zone:
|
||||||
description:
|
description:
|
||||||
- Identifies the managed zone addressed by this request.
|
- Identifies the managed zone addressed by this request. This must be a dictionary
|
||||||
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified
|
that contains both a 'name' key and a 'dnsName' key. You can pass in the results
|
||||||
in two ways. First, you can place a dictionary with key ''name'' and value of
|
of the gcp_dns_managed_zone module, which will contain both.
|
||||||
your resource''s name Alternatively, you can add `register: name-of-resource`
|
|
||||||
to a gcp_dns_managed_zone task and then set this managed_zone field to "{{ name-of-resource
|
|
||||||
}}"'
|
|
||||||
required: true
|
required: true
|
||||||
type: dict
|
type: dict
|
||||||
extends_documentation_fragment: gcp
|
extends_documentation_fragment: gcp
|
||||||
|
@ -137,7 +134,9 @@ target:
|
||||||
type: list
|
type: list
|
||||||
managed_zone:
|
managed_zone:
|
||||||
description:
|
description:
|
||||||
- Identifies the managed zone addressed by this request.
|
- Identifies the managed zone addressed by this request. This must be a dictionary
|
||||||
|
that contains both a 'name' key and a 'dnsName' key. You can pass in the results
|
||||||
|
of the gcp_dns_managed_zone module, which will contain both.
|
||||||
returned: success
|
returned: success
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
'''
|
||||||
|
@ -180,6 +179,9 @@ def main():
|
||||||
fetch = fetch_wrapped_resource(module, 'dns#resourceRecordSet', 'dns#resourceRecordSetsListResponse', 'rrsets')
|
fetch = fetch_wrapped_resource(module, 'dns#resourceRecordSet', 'dns#resourceRecordSetsListResponse', 'rrsets')
|
||||||
changed = False
|
changed = False
|
||||||
|
|
||||||
|
if 'dnsName' not in module.params.get('managed_zone') or 'name' not in module.params.get('managed_zone'):
|
||||||
|
module.fail_json(msg="managed_zone dictionary must contain both the name of the zone and the dns name of the zone")
|
||||||
|
|
||||||
if fetch:
|
if fetch:
|
||||||
if state == 'present':
|
if state == 'present':
|
||||||
if is_different(module, fetch):
|
if is_different(module, fetch):
|
||||||
|
@ -357,7 +359,7 @@ def prefetch_soa_resource(module):
|
||||||
{
|
{
|
||||||
'type': 'SOA',
|
'type': 'SOA',
|
||||||
'managed_zone': module.params['managed_zone'],
|
'managed_zone': module.params['managed_zone'],
|
||||||
'name': replace_resource_dict(module.params['managed_zone'], 'dnsName'),
|
'name': replace_resource_dict(module.params['managed_zone'], 'name'),
|
||||||
'project': module.params['project'],
|
'project': module.params['project'],
|
||||||
'scopes': module.params['scopes'],
|
'scopes': module.params['scopes'],
|
||||||
'service_account_file': module.params['service_account_file'],
|
'service_account_file': module.params['service_account_file'],
|
||||||
|
|
|
@ -44,12 +44,9 @@ requirements:
|
||||||
options:
|
options:
|
||||||
managed_zone:
|
managed_zone:
|
||||||
description:
|
description:
|
||||||
- Identifies the managed zone addressed by this request.
|
- Identifies the managed zone addressed by this request. This must be a dictionary
|
||||||
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified
|
that contains both a 'name' key and a 'dnsName' key. You can pass in the results
|
||||||
in two ways. First, you can place a dictionary with key ''name'' and value of
|
of the gcp_dns_managed_zone module, which will contain both.
|
||||||
your resource''s name Alternatively, you can add `register: name-of-resource`
|
|
||||||
to a gcp_dns_managed_zone task and then set this managed_zone field to "{{ name-of-resource
|
|
||||||
}}"'
|
|
||||||
required: true
|
required: true
|
||||||
type: dict
|
type: dict
|
||||||
extends_documentation_fragment: gcp
|
extends_documentation_fragment: gcp
|
||||||
|
@ -92,7 +89,9 @@ resources:
|
||||||
type: list
|
type: list
|
||||||
managed_zone:
|
managed_zone:
|
||||||
description:
|
description:
|
||||||
- Identifies the managed zone addressed by this request.
|
- Identifies the managed zone addressed by this request. This must be a dictionary
|
||||||
|
that contains both a 'name' key and a 'dnsName' key. You can pass in the results
|
||||||
|
of the gcp_dns_managed_zone module, which will contain both.
|
||||||
returned: success
|
returned: success
|
||||||
type: dict
|
type: dict
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue