Storing the user assigned managed identity in the scaleset table (#255)

This commit is contained in:
Cheick Keita
2020-11-05 15:36:59 -08:00
committed by GitHub
parent b5578381ce
commit bbee84ab1f
3 changed files with 41 additions and 11 deletions

View File

@ -151,7 +151,7 @@ def get_scaleset_identity_resource_path() -> str:
@cached
def get_scaleset_principal_id() -> UUID:
api_version = "2018-11-30" # matches the apiversion in the deplyoment template
api_version = "2018-11-30" # matches the apiversion in the deployment template
client = mgmt_client_factory(ResourceManagementClient)
uid = client.resources.get_by_id(get_scaleset_identity_resource_path(), api_version)
return UUID(uid.properties["principalId"])