Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add connection details to azure_rm_privateendpoint_info #965

Merged
merged 11 commits into from
Sep 9, 2022
59 changes: 57 additions & 2 deletions plugins/modules/azure_rm_privateendpoint_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,54 @@
description:
- The resource id of the private endpoint to connect.
returned: always
returned: always
dhageman marked this conversation as resolved.
Show resolved Hide resolved
contains:
id:
description:
- The resource id of the private endpoint to connect.
returned: always
type: str
name:
description:
- The name of the private endpoint connection.
returned: always
type: str
connection_state:
description:
- State details of endpoint connection
type: complex
returned: always
contains:
description:
description:
- The reason for approval/rejection of the connection.
returned: always
type: str
sample: "Auto Approved"
status:
description:
- Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
returned: always
type: str
sample: Approved
actions_required:
description:
- A message indicating if changes on the service provider require any updates on the consumer.
type: str
returned: always
sample: "This is action_required string"
group_ids:
description:
- List of group_ids associated with private endpoint
returned: always
type: list
sample: [""postgresqlServer"]
dhageman marked this conversation as resolved.
Show resolved Hide resolved
``
description:
dhageman marked this conversation as resolved.
Show resolved Hide resolved
- List of group_ids associated with private endpoint
dhageman marked this conversation as resolved.
Show resolved Hide resolved
returned: always
dhageman marked this conversation as resolved.
Show resolved Hide resolved
type: list
dhageman marked this conversation as resolved.
Show resolved Hide resolved
sample: ["/subscriptions/xxx/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/point/privateLinkServiceConnections/point",]
sample: "management"
dhageman marked this conversation as resolved.
Show resolved Hide resolved
type:
description:
- Resource type.
Expand Down Expand Up @@ -238,7 +284,16 @@ def privateendpoints_to_dict(self, privateendpoint):
if privateendpoint.private_link_service_connections and len(privateendpoint.private_link_service_connections) > 0:
results['private_link_service_connections'] = []
for connections in privateendpoint.private_link_service_connections:
results['private_link_service_connections'].append(connections.id)
connection = {}
connection['connection_state'] = {}
connection['id'] = connections.id
connection['name'] = connections.name
connection['type'] = connections.type
connection['group_ids'] = connections.group_ids
connection['connection_state']['status'] = connections.private_link_service_connection_state.status
connection['connection_state']['description'] = connections.private_link_service_connection_state.description
connection['connection_state']['actions_required'] = connections.private_link_service_connection_state.actions_required
results['private_link_service_connections'].append(connection)
if privateendpoint.manual_private_link_service_connections and len(privateendpoint.manual_private_link_service_connections) > 0:
results['manual_private_link_service_connections'] = []
for connections in privateendpoint.manual_private_link_service_connections:
Expand Down