Skip to content

Commit

Permalink
fix the mock msi object id export
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeepc2792 committed Oct 8, 2024
1 parent 177aa40 commit dd0f6fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/devtools/local_dev_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ get_mock_msi_tenantID() {
echo "$1" | jq -r .tenant
}

get_mock_msi_clientID() {
get_mock_msi_objectID() {
az ad sp list --all --filter "appId eq '$1'" | jq -r ".[] | .id"
}

Expand Down Expand Up @@ -238,7 +238,7 @@ create_miwi_env_file() {
mockClientID=$(get_mock_msi_clientID "$mockMSI")
mockTenantID=$(get_mock_msi_tenantID "$mockMSI")
mockCert=$(get_mock_msi_cert "$mockMSI")
mockObjectID=$(get_mock_msi_objectID "$mockMSI")
mockObjectID=$(get_mock_msi_objectID "$mockClientID")

setup_platform_identity
cluster_msi_role_assignment "${mockClientID}"
Expand Down
2 changes: 2 additions & 0 deletions hack/devtools/msi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ fi
mockClientID=$(get_mock_msi_clientID "$sp")
mockTenantID=$(get_mock_msi_tenantID "$sp")
base64EncodedCert=$(get_mock_msi_cert "$sp")
mockObjectID=$(get_mock_msi_objectID "$mockClientID")

setup_platform_identity
cluster_msi_role_assignment "${mockClientID}"

# Print the extracted values
echo "Cluster MSI Client ID: $mockClientID"
echo "Cluster MSI Object ID: $mockObjectID"
echo "Cluster MSI Tenant ID: $mockTenantID"
echo "Cluster MSI Base64 Encoded Certificate: $base64EncodedCert"
echo "Platform workload identity role sets: $PLATFORM_WORKLOAD_IDENTITY_ROLE_SETS"

0 comments on commit dd0f6fc

Please sign in to comment.