Radeonx
Radeonx

Reputation: 191

Azure Key Vault get Secret from VMSS Instances

Does someone have a solution to get a Azure Key Vault Secret from a VMSS Instance? For a single VM I found this article: https://learn.microsoft.com/en-us/azure/key-vault/tutorial-python-linux-virtual-machine#create-edit-and-run-the-sample-python-app

Can I do something similar like that for a VMSS Instance? With the Python Script from the Microsoft Documentation I have the following issue. I can't reach the Key Vault URL from the Instance with this Request. (Request Timeout.)

requests.get(url = KeyVaultURL, headers = {"Authorization": "Bearer " + data["access_token"]})

The VMSS has a LoadBalancer with a Public IP Address. And the Instances in the Backendpool have only one NIC (Private IP). The Vault and the VMSS are in different Resource Groups.

Do you have any idea why i cant reach the Key Vault from my Instances? Because if the Identity (Access Policy) would be the problem, i should get a 4xx and not a timeout.

Thanks KR

Upvotes: 1

Views: 787

Answers (1)

Thiago Custodio
Thiago Custodio

Reputation: 18387

I think if you assign a managed identity to vmss through portal and test it again it should work.

https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vmss

Upvotes: 2

Related Questions