Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5245,15 +5245,15 @@ def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_g
create_cmd += f'--ampls-resource-id {ampls_resource_id} ' if use_ampls else ''
create_cmd += f'--enable-high-log-scale-mode ' if highlogscale_mode_enabled else ''

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

response = self.cmd(create_cmd, checks=[
self.check('addonProfiles.omsagent.enabled', True),
self.check('addonProfiles.omsagent.config.useAADAuth', 'true')
]).get_output_in_json()

if enableOtherAddon:
# enable other addon such azure-policy to verify the monitoring addon and DCRs etc.. remainins intact.
self.cmd(f'aks enable-addons -a azure-policy -g={resource_group} -n={aks_name}')

cluster_resource_id = response["id"]
subscription = cluster_resource_id.split("/")[2]
workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"]
Expand Down