Allow BackendService backends.group to ref multiple resource types (#232)

<!-- This change is generated by MagicModules. -->
/cc @rileykarson
This commit is contained in:
The Magician 2019-04-22 11:10:48 -07:00 committed by Alex Stephen
parent 8b2a915a09
commit 2eb8bf83f2
2 changed files with 46 additions and 27 deletions

View file

@ -90,18 +90,21 @@ options:
required: false required: false
group: group:
description: description:
- This instance group defines the list of instances that serve traffic. Member - The fully-qualified URL of an Instance Group or Network Endpoint Group resource.
virtual machine instances from each instance group must live in the same In case of instance group this defines the list of instances that serve
zone as the instance group itself. traffic. Member virtual machine instances from each instance group must
- No two backends in a backend service are allowed to use same Instance Group live in the same zone as the instance group itself. No two backends in a
resource. backend service are allowed to use same Instance Group resource.
- For Network Endpoint Groups this defines list of endpoints. All endpoints
of Network Endpoint Group must be hosted on instances located in the same
zone as the Network Endpoint Group.
- Backend service can not contain mix of Instance Group and Network Endpoint
Group backends.
- Note that you must specify an Instance Group or Network Endpoint Group resource
using the fully-qualified URL, rather than a partial URL.
- When the BackendService has load balancing scheme INTERNAL, the instance - When the BackendService has load balancing scheme INTERNAL, the instance
group must be in a zone within the same region as the BackendService. group must be within the same region as the BackendService. Network Endpoint
- 'This field represents a link to a InstanceGroup resource in GCP. It can Groups are not supported for INTERNAL load balancing scheme.
be specified in two ways. First, you can place a dictionary with key ''selfLink''
and value of your resource''s selfLink Alternatively, you can add `register:
name-of-resource` to a gcp_compute_instance_group task and then set this
group field to "{{ name-of-resource }}"'
required: false required: false
max_connections: max_connections:
description: description:
@ -394,15 +397,23 @@ backends:
type: str type: str
group: group:
description: description:
- This instance group defines the list of instances that serve traffic. Member - The fully-qualified URL of an Instance Group or Network Endpoint Group resource.
virtual machine instances from each instance group must live in the same zone In case of instance group this defines the list of instances that serve traffic.
as the instance group itself. Member virtual machine instances from each instance group must live in the
- No two backends in a backend service are allowed to use same Instance Group same zone as the instance group itself. No two backends in a backend service
resource. are allowed to use same Instance Group resource.
- For Network Endpoint Groups this defines list of endpoints. All endpoints
of Network Endpoint Group must be hosted on instances located in the same
zone as the Network Endpoint Group.
- Backend service can not contain mix of Instance Group and Network Endpoint
Group backends.
- Note that you must specify an Instance Group or Network Endpoint Group resource
using the fully-qualified URL, rather than a partial URL.
- When the BackendService has load balancing scheme INTERNAL, the instance group - When the BackendService has load balancing scheme INTERNAL, the instance group
must be in a zone within the same region as the BackendService. must be within the same region as the BackendService. Network Endpoint Groups
are not supported for INTERNAL load balancing scheme.
returned: success returned: success
type: dict type: str
maxConnections: maxConnections:
description: description:
- The max number of simultaneous connections for the group. Can be used with - The max number of simultaneous connections for the group. Can be used with
@ -659,7 +670,7 @@ def main():
balancing_mode=dict(default='UTILIZATION', type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']), balancing_mode=dict(default='UTILIZATION', type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']),
capacity_scaler=dict(default=1.0, type='str'), capacity_scaler=dict(default=1.0, type='str'),
description=dict(type='str'), description=dict(type='str'),
group=dict(type='dict'), group=dict(type='str'),
max_connections=dict(type='int'), max_connections=dict(type='int'),
max_connections_per_instance=dict(type='int'), max_connections_per_instance=dict(type='int'),
max_rate=dict(type='int'), max_rate=dict(type='int'),
@ -926,7 +937,7 @@ class BackendServiceBackendsArray(object):
u'balancingMode': item.get('balancing_mode'), u'balancingMode': item.get('balancing_mode'),
u'capacityScaler': item.get('capacity_scaler'), u'capacityScaler': item.get('capacity_scaler'),
u'description': item.get('description'), u'description': item.get('description'),
u'group': replace_resource_dict(item.get(u'group', {}), 'selfLink'), u'group': item.get('group'),
u'maxConnections': item.get('max_connections'), u'maxConnections': item.get('max_connections'),
u'maxConnectionsPerInstance': item.get('max_connections_per_instance'), u'maxConnectionsPerInstance': item.get('max_connections_per_instance'),
u'maxRate': item.get('max_rate'), u'maxRate': item.get('max_rate'),

View file

@ -107,15 +107,23 @@ items:
type: str type: str
group: group:
description: description:
- This instance group defines the list of instances that serve traffic. - The fully-qualified URL of an Instance Group or Network Endpoint Group
Member virtual machine instances from each instance group must live in resource. In case of instance group this defines the list of instances
the same zone as the instance group itself. that serve traffic. Member virtual machine instances from each instance
- No two backends in a backend service are allowed to use same Instance group must live in the same zone as the instance group itself. No two
Group resource. backends in a backend service are allowed to use same Instance Group resource.
- For Network Endpoint Groups this defines list of endpoints. All endpoints
of Network Endpoint Group must be hosted on instances located in the same
zone as the Network Endpoint Group.
- Backend service can not contain mix of Instance Group and Network Endpoint
Group backends.
- Note that you must specify an Instance Group or Network Endpoint Group
resource using the fully-qualified URL, rather than a partial URL.
- When the BackendService has load balancing scheme INTERNAL, the instance - When the BackendService has load balancing scheme INTERNAL, the instance
group must be in a zone within the same region as the BackendService. group must be within the same region as the BackendService. Network Endpoint
Groups are not supported for INTERNAL load balancing scheme.
returned: success returned: success
type: dict type: str
maxConnections: maxConnections:
description: description:
- The max number of simultaneous connections for the group. Can be used - The max number of simultaneous connections for the group. Can be used