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

Update aks-secure-baseline add-ons (V1 and V2) to support aks cluster with user assigned identity #238

Merged
merged 4 commits into from
Aug 12, 2021

Conversation

swetha-sundar
Copy link
Contributor

@swetha-sundar swetha-sundar commented Aug 11, 2021

Description

aks-secure-baseline add-on doesn't work when using an user-assigned identity (user-msi)

To Reproduce
Steps to reproduce the behavior:

  1. Create an AKS Cluster using UserAssigned identity
  2. Apply the aks-secure-baseline (v1 or v2) add-on on the configuration
  3. See error in the below screenshot

Expected behavior
The principal id value cannot be null when you do a role assignment. This value needs to be fetched from managed identity and used while doing the role assignment using the user msi.

Screenshots
Add-on_UserMSI-AKS

Does this introduce a breaking change

  • YES
  • NO

Testing

Testing done with an aks cluster created with user assigned identity. Sample tfvars snippet below:

aks_clusters = {
  cluster_dev_temp = {
      lz_key = "lz_key_for_aks"
      key = "cluster_key"
      identity = {
          type = "UserAssigned"
          managed_identity_key = "msi_key"
          lz_key = "lz_key_for_msi"
      }
   }
}

237

@arnaudlh arnaudlh requested review from hieumoscow and LaurentLesle and removed request for hieumoscow August 11, 2021 07:26
@LaurentLesle LaurentLesle changed the base branch from master to patch.5.4.2 August 11, 2021 11:15
@arnaudlh arnaudlh added the bug Something isn't working label Aug 12, 2021
@arnaudlh arnaudlh added this to the 2108 milestone Aug 12, 2021
Copy link
Contributor

@hieumoscow hieumoscow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Swetha

@hieumoscow hieumoscow merged commit 6d51896 into Azure:patch.5.4.2 Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] aks-secure-baseline add-on doesn't work when using an user-assigned identity (user-msi)
3 participants