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

azure_rm_privateendpoint missing parameter #973

Closed
polocato opened this issue Sep 13, 2022 · 5 comments · Fixed by #1745
Closed

azure_rm_privateendpoint missing parameter #973

polocato opened this issue Sep 13, 2022 · 5 comments · Fixed by #1745
Labels
has_pr PR fixes have been made medium_priority Medium priority

Comments

@polocato
Copy link

SUMMARY

Private endpoint creation is failing when tenant is not authorized to access linked subscription
az cli has an option: --manual-request true

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure_rm_privateendpoin

ANSIBLE VERSION
ansible 2.10.17
  config file = None
  configured module search path =  ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/xxx/.local/lib/python3.7/site-packages/ansible
  executable location = /home/xxxx/.local/bin/ansible
  python version = 3.7.5 (default, Dec  9 2021, 17:04:37) [GCC 8.4.0]
COLLECTION VERSION
# /home/xxx/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 1.13.0

# /home/xxx/.local/lib/python3.7/site-packages/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 1.4.0
CONFIGURATION

OS / ENVIRONMENT

WSL1 with ubuntu18.04

STEPS TO REPRODUCE

Setup prive endpoint when tenant is not authorized to access linked subscription ( e.g. different company)

- name: Azure
  hosts: localhost
  gather_facts: no
  collections:
    - azure.azcollection
  vars:
    az_rg: "xxxx-a.rg"
  tasks:
    - name: add endpoint
      azure_rm_privateendpoint:
        name: "private_endpoint_xxxx"
        tenant: "xxxxxxxx"
        auth_source: env
        resource_group: "xxxxx"
        private_link_service_connections:
          - name: "xxxxx"
            private_link_service_id: "xxxxx
        subnet:
          id:  "xxxxxx"   
EXPECTED RESULTS

Private endpoint gets created

ACTUAL RESULTS

Playbook fails because it cant modify resources in the subscription

"changed": false, "msg": "Error creating or updating private endpoint XXXX  (LinkedAuthorizationFailed) The client has permission to perform a
ction 'Microsoft.Network/privateLinkServices/PrivateEndpointConnectionsApproval/action' on scope XXXXXX  however the current tenant '********' is not authorized to access linked subscription 
@Fred-sun
Copy link
Collaborator

@polocato Thank you for your attention. I'm sorry that I don't quite understand what you mean. Do you mean to add parameter ’manual-request' or do you want to specify different tenants ? Thank you very much!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Sep 20, 2022
@polocato
Copy link
Author

Hello, thank you for looking into my request.
I'd like to ask for manual-request parameter, from my perspective this is not a missing feature but a some kind of bug/missing core functionality. Without that parameter you can't create a private link between two unrelated companies.
Best Regards

@Fred-sun
Copy link
Collaborator

@polocato Thank you for your reply, but I have checked the latest API and found that 'manual-request' is not supported and cannot be added for the time being. Once it is supported, we will add it as soon as possible. Thank you very much!

@Fred-sun Fred-sun added the hold The problem holds for a particular reason label Feb 22, 2023
@howardjones
Copy link
Contributor

howardjones commented Sep 17, 2024

I believe this is covered by the manual_private_link_service_connections field in the PrivateEndpoint object here:
https://learn.microsoft.com/en-us/python/api/azure-mgmt-network/azure.mgmt.network.models.privateendpoint?view=azure-python

(Just ran into the same requirement)

@Fred-sun Fred-sun added has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors hold The problem holds for a particular reason labels Oct 22, 2024
@Fred-sun
Copy link
Collaborator

Added in #1745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
3 participants