From 23a0101067b9f9e1563d368733a10eeaf3fa9e12 Mon Sep 17 00:00:00 2001 From: lolorol Date: Mon, 30 May 2022 07:45:10 +0000 Subject: [PATCH] Replace objectId with id --- .devcontainer/docker-compose.yml | 2 +- .github/workflows/standalone-regressor-tf100.yaml | 6 +++--- .github/workflows/standalone-regressor-tf15.yaml | 6 +++--- .github/workflows/standalone-tf100.yaml | 6 +++--- .github/workflows/standalone-tf15.yaml | 6 +++--- modules/azuread/applications/scripts/grant_consent.sh | 2 +- modules/azuread/service_principal/scripts/grant_consent.sh | 2 +- modules/compute/aks/scripts/grant_consent.sh | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index d3f4ae4ea0..9677cb33a2 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,7 @@ version: '3.7' services: rover: - image: aztfmod/rover-preview:1.2.1-2205.251610 + image: aztfmod/rover-preview:1.2.1-2205.300342 user: vscode labels: diff --git a/.github/workflows/standalone-regressor-tf100.yaml b/.github/workflows/standalone-regressor-tf100.yaml index e09805172a..410a4bf6b4 100644 --- a/.github/workflows/standalone-regressor-tf100.yaml +++ b/.github/workflows/standalone-regressor-tf100.yaml @@ -55,7 +55,7 @@ jobs: matrix: ${{fromJSON(needs.load_scenarios.outputs.matrix)}} container: - image: aztfmod/rover-preview:1.2.1-2205.251610 + image: aztfmod/rover-preview:1.2.1-2205.300342 options: --user 0 steps: @@ -165,7 +165,7 @@ jobs: needs: [testcases] container: - image: aztfmod/rover-preview:1.2.1-2205.251610 + image: aztfmod/rover-preview:1.2.1-2205.300342 options: --user 0 steps: @@ -178,7 +178,7 @@ jobs: run: | for i in `az monitor diagnostic-settings subscription list -o tsv --query "value[?contains(name, '${{ github.run_id }}' )].name"`; do echo "purging subscription diagnostic-settings: $i" && $(az monitor diagnostic-settings subscription delete --name $i --yes); done for i in `az monitor log-profiles list -o tsv --query '[].name'`; do az monitor log-profiles delete --name $i; done - for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].objectId" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done + for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].id" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done for i in `az ad app list --query "[?contains(displayName, '${{ github.run_id }}')].appId" -o tsv`; do echo "purging Azure AD app: $i" && $(az ad app delete --verbose --id $i || true); done for i in `az keyvault list-deleted --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do az keyvault purge --name $i; done for i in `az group list --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do echo "purging resource group: $i" && $(az group delete -n $i -y --no-wait || true); done diff --git a/.github/workflows/standalone-regressor-tf15.yaml b/.github/workflows/standalone-regressor-tf15.yaml index 6e293b6a9b..791e231119 100644 --- a/.github/workflows/standalone-regressor-tf15.yaml +++ b/.github/workflows/standalone-regressor-tf15.yaml @@ -55,7 +55,7 @@ jobs: matrix: ${{fromJSON(needs.load_scenarios.outputs.matrix)}} container: - image: aztfmod/rover-preview:0.15.5-2205.251610 + image: aztfmod/rover-preview:0.15.5-2205.300342 options: --user 0 steps: @@ -165,7 +165,7 @@ jobs: needs: [testcases] container: - image: aztfmod/rover-preview:0.15.5-2205.251610 + image: aztfmod/rover-preview:0.15.5-2205.300342 options: --user 0 steps: @@ -178,7 +178,7 @@ jobs: run: | for i in `az monitor diagnostic-settings subscription list -o tsv --query "value[?contains(name, '${{ github.run_id }}' )].name"`; do echo "purging subscription diagnostic-settings: $i" && $(az monitor diagnostic-settings subscription delete --name $i --yes); done for i in `az monitor log-profiles list -o tsv --query '[].name'`; do az monitor log-profiles delete --name $i; done - for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].objectId" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done + for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].id" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done for i in `az ad app list --query "[?contains(displayName, '${{ github.run_id }}')].appId" -o tsv`; do echo "purging Azure AD app: $i" && $(az ad app delete --verbose --id $i || true); done for i in `az keyvault list-deleted --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do az keyvault purge --name $i; done for i in `az group list --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do echo "purging resource group: $i" && $(az group delete -n $i -y --no-wait || true); done diff --git a/.github/workflows/standalone-tf100.yaml b/.github/workflows/standalone-tf100.yaml index 46cf1fc38d..14cae05759 100644 --- a/.github/workflows/standalone-tf100.yaml +++ b/.github/workflows/standalone-tf100.yaml @@ -51,7 +51,7 @@ jobs: matrix: ${{fromJSON(needs.load_scenarios.outputs.matrix)}} container: - image: aztfmod/rover-preview:1.2.1-2205.251610 + image: aztfmod/rover-preview:1.2.1-2205.300342 options: --user 0 steps: @@ -136,7 +136,7 @@ jobs: needs: [testcases] container: - image: aztfmod/rover-preview:1.2.1-2205.251610 + image: aztfmod/rover-preview:1.2.1-2205.300342 options: --user 0 steps: @@ -149,7 +149,7 @@ jobs: run: | for i in `az monitor diagnostic-settings subscription list -o tsv --query "value[?contains(name, '${{ github.run_id }}' )].name"`; do echo "purging subscription diagnostic-settings: $i" && $(az monitor diagnostic-settings subscription delete --name $i --yes); done for i in `az monitor log-profiles list -o tsv --query '[].name'`; do az monitor log-profiles delete --name $i; done - for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].objectId" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done + for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].id" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done for i in `az ad app list --query "[?contains(displayName, '${{ github.run_id }}')].appId" -o tsv`; do echo "purging Azure AD app: $i" && $(az ad app delete --verbose --id $i || true); done for i in `az keyvault list-deleted --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do az keyvault purge --name $i; done for i in `az group list --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do echo "purging resource group: $i" && $(az group delete -n $i -y --no-wait || true); done diff --git a/.github/workflows/standalone-tf15.yaml b/.github/workflows/standalone-tf15.yaml index aa2443919d..d2a92d217f 100644 --- a/.github/workflows/standalone-tf15.yaml +++ b/.github/workflows/standalone-tf15.yaml @@ -51,7 +51,7 @@ jobs: matrix: ${{fromJSON(needs.load_scenarios.outputs.matrix)}} container: - image: aztfmod/rover-preview:0.15.5-2205.251610 + image: aztfmod/rover-preview:0.15.5-2205.300342 options: --user 0 steps: @@ -130,7 +130,7 @@ jobs: needs: [testcases] container: - image: aztfmod/rover-preview:0.15.5-2205.251610 + image: aztfmod/rover-preview:0.15.5-2205.300342 options: --user 0 steps: @@ -143,7 +143,7 @@ jobs: run: | for i in `az monitor diagnostic-settings subscription list -o tsv --query "value[?contains(name, '${{ github.run_id }}' )].name"`; do echo "purging subscription diagnostic-settings: $i" && $(az monitor diagnostic-settings subscription delete --name $i --yes); done for i in `az monitor log-profiles list -o tsv --query '[].name'`; do az monitor log-profiles delete --name $i; done - for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].objectId" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done + for i in `az ad group list --query "[?contains(displayName, '${{ github.run_id }}')].id" -o tsv`; do echo "purging Azure AD group: $i" && $(az ad group delete --verbose --group $i || true); done for i in `az ad app list --query "[?contains(displayName, '${{ github.run_id }}')].appId" -o tsv`; do echo "purging Azure AD app: $i" && $(az ad app delete --verbose --id $i || true); done for i in `az keyvault list-deleted --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do az keyvault purge --name $i; done for i in `az group list --query "[?tags.testing_job_id=='${{ github.run_id }}'].name" -o tsv`; do echo "purging resource group: $i" && $(az group delete -n $i -y --no-wait || true); done diff --git a/modules/azuread/applications/scripts/grant_consent.sh b/modules/azuread/applications/scripts/grant_consent.sh index e62c0e47d9..885cf2f364 100755 --- a/modules/azuread/applications/scripts/grant_consent.sh +++ b/modules/azuread/applications/scripts/grant_consent.sh @@ -8,7 +8,7 @@ if [ "${user_type}" = "user" ]; then az ad app permission admin-consent --id ${applicationId} else - resourceId=$(az ad sp show --id "${resourceAppId}" --query "objectId" -o tsv) + resourceId=$(az ad sp show --id "${resourceAppId}" --query "id" -o tsv) echo " -resourceId: ${resourceId}" microsoft_graph_endpoint=$(az cloud show | jq -r ".endpoints.microsoftGraphResourceId") diff --git a/modules/azuread/service_principal/scripts/grant_consent.sh b/modules/azuread/service_principal/scripts/grant_consent.sh index 057c0cae56..ac0e785265 100755 --- a/modules/azuread/service_principal/scripts/grant_consent.sh +++ b/modules/azuread/service_principal/scripts/grant_consent.sh @@ -9,7 +9,7 @@ if [ "${user_type}" = "user" ]; then az ad app permission admin-consent --id ${application_id} else - resourceId=$(az ad sp show --id "${resourceAppId}" --query "objectId" -o tsv) + resourceId=$(az ad sp show --id "${resourceAppId}" --query "id" -o tsv) echo " -resourceId: ${resourceId}" microsoft_graph_endpoint=$(az cloud show | jq -r ".endpoints.microsoftGraphResourceId") diff --git a/modules/compute/aks/scripts/grant_consent.sh b/modules/compute/aks/scripts/grant_consent.sh index 383eb1ee41..a0ebe045c3 100755 --- a/modules/compute/aks/scripts/grant_consent.sh +++ b/modules/compute/aks/scripts/grant_consent.sh @@ -11,7 +11,7 @@ if [ ${user_type} == "user" ]; then else - resourceId=$(az ad sp show --id "${graphId}" --query "objectId" -o tsv) + resourceId=$(az ad sp show --id "${graphId}" --query "id" -o tsv) echo " -resourceId: ${resourceId}" URI=$(echo "https://graph.microsoft.com/beta/servicePrincipals/${resourceId}/appRoleAssignments") && echo " - uri: $URI"