Closed gshaw-pivotal closed 7 months ago
@gshaw-pivotal, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org>
to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.
Attention: 12 lines
in your changes are missing coverage. Please review.
Comparison is base (
8c08715
) 25.09% compared to head (92c4692
) 25.24%.
Files | Patch % | Lines |
---|---|---|
internal/resources/akscluster/akscluster_mapper.go | 75.51% | 8 Missing and 4 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@gshaw-pivotal, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org>
to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.
Support managed identities specification when creating and updating AKS clusters
N/A
When using
terraform apply
a user can provide aidentity_config
section within the cluster config section of the terraform plan file. Here they can specify whether a system or user assigned managed identity is to be used for the cluster.The default if an
identity_config
is not provide will be use a system assigned managed identity.Changes were tested by creating and modifying clusters on Olympus dev stack. Scenarios tested are summarized below:
identity_config struct with type
IDENTITY_TYPE_SYSTEM_ASSIGNED
: SUCCESS -> Cluster with system assigned MIIDENTITY_TYPE_USER_ASSIGNED
and no userAssigned struct: ERROR -> No cluster -> Expected behavior, see Terraform test - User assigned identity with no userAssigned struct attachmentIDENTITY_TYPE_USER_ASSIGNED
and empty userAssigned struct: ERROR -> No cluster -> Expected behavior, see Terraform test - User assigned identity with empty struct attachmentIDENTITY_TYPE_USER_ASSIGNED
and populated userAssigned struct, invalid identity: ERROR -> No cluster -> Expected behavior, see Terraform test - User assigned identity with invalid identity attachmentidentity_config struct with type
IDENTITY_TYPE_USER_ASSIGNED
and populated userAssigned struct, valid identity: SUCCESS -> Cluster with user assigned MICreate cluster with user assigned MI, then change to a system assigned MI, then change back to user assigned MI: SUCCESS -> List aks cluster shows user assigned identity again for cluster; USER -> SYSTEM -> USER
Terraform test - User assigned identity with no userAssigned struct:![Terraform test - User assigned identity with no userAssigned struct](https://github.com/vmware/terraform-provider-tanzu-mission-control/assets/16089977/3a885ea5-eb95-45f9-bcb9-3d869179682f)
Terraform test - User assigned identity with empty struct![Terraform test - User assigned identity with empty struct](https://github.com/vmware/terraform-provider-tanzu-mission-control/assets/16089977/7c789e67-a5ed-43f6-a616-f2d42b057bde)
Terraform test - User assigned identity with invalid identity![Terraform test - User assigned identity with invalid identity](https://github.com/vmware/terraform-provider-tanzu-mission-control/assets/16089977/e6b4870a-c77a-4376-9861-21faa18d21be)