Skip to content

Commit

Permalink
updated api versions for sql,aks,storage accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen Angali authored and Naveen Angali committed Mar 29, 2024
1 parent 65a6baf commit 2587736
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions Azure-ARM/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
"name": "[tolower(parameters('SQLServerName'))]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"dependsOn": [],
"tags": {
"displayName": "SQLServer"
Expand All @@ -408,7 +408,7 @@
"name": "AllowAllWindowsAzureIps",
"type": "firewallrules",
"location": "[resourceGroup().location]",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', tolower(parameters('SQLServerName')))]"
],
Expand All @@ -420,7 +420,7 @@
{
"condition": "[equals(tolower(parameters('SQLServerCreateNew')),tolower('Yes'))]",
"type": "databases",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"name": "[parameters('SQLServerDatabaseName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
Expand Down Expand Up @@ -497,7 +497,7 @@
},
{
"type": "Microsoft.ContainerService/managedClusters",
"apiVersion": "2023-05-02-preview",
"apiVersion": "2024-01-01",
"name": "[variables('KubernetesClusterName')]",
"location": "[resourceGroup().location]",
"dependsOn": ["[resourceId('Microsoft.Resources/deploymentScripts', 'PreReqChecks')]"],
Expand Down Expand Up @@ -566,7 +566,7 @@
"name": "[tolower(parameters('SQLServerName'))]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"dependsOn": ["[resourceId('Microsoft.Resources/deploymentScripts', 'PreReqChecks')]"],
"tags": {
"displayName": "SQLServer"
Expand All @@ -581,7 +581,7 @@
"name": "AllowAllWindowsAzureIps",
"type": "firewallrules",
"location": "[resourceGroup().location]",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', tolower(parameters('SQLServerName')))]"
],
Expand All @@ -593,7 +593,7 @@
{
"condition": "[and(equals(tolower(parameters('SQLServerCreateNew')),tolower('Yes')),equals(tolower(parameters('UseKeyVault')),tolower('No')))]",
"type": "databases",
"apiVersion": "2022-05-01-preview",
"apiVersion": "2023-05-01-preview",
"name": "[parameters('SQLServerDatabaseName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
Expand All @@ -607,7 +607,7 @@
"name": "[tolower(variables('StorageAccountName'))]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"apiVersion": "2022-09-01",
"apiVersion": "2023-01-01",
"dependsOn": ["[resourceId('Microsoft.Resources/deploymentScripts', 'PreReqChecks')]"],
"tags": {
"displayName": "[variables('StorageAccountName')]"
Expand All @@ -620,7 +620,7 @@
{
"condition": "[equals(tolower(variables('StorageAccountCreateNew')),tolower('Yes'))]",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2022-09-01",
"apiVersion": "2023-01-01",
"name": "[concat(tolower(variables('StorageAccountName')), '/default/', tolower(variables('StorageAccountFileShareName')))]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deploymentScripts', 'PreReqChecks')]",
Expand Down
8 changes: 4 additions & 4 deletions Azure-ARM/createUIDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(subscription().id,'/resourceGroups/',last(take(split(steps('profisee').PurviewAccountName.id, '/'), 5)),'/providers/Microsoft.Purview/accounts/',steps('profisee').PurviewAccountName.name,'?api-version=2021-07-01')]",
"path": "[concat(subscription().id,'/resourceGroups/',last(take(split(steps('profisee').PurviewAccountName.id, '/'), 5)),'/providers/Microsoft.Purview/accounts/',steps('profisee').PurviewAccountName.name,'?api-version=2021-12-01')]",
"body": ""
}
},
Expand Down Expand Up @@ -644,7 +644,7 @@
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "POST",
"path": "[concat(subscription().id,'/providers/Microsoft.Sql/checkNameAvailability?api-version=2021-08-01-preview')]",
"path": "[concat(subscription().id,'/providers/Microsoft.Sql/checkNameAvailability?api-version=2023-05-01-preview')]",
"body": "[parse(concat('{\"name\":\"',steps('sql').SQLServerName,'\",\"type\":\"Microsoft.Sql/servers\"}'))]"
}
},
Expand Down Expand Up @@ -771,7 +771,7 @@
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "POST",
"path": "[concat(subscription().id,'/resourceGroups/',steps('storage').StorageAccountNameSection.StorageAccountName.resourceGroup,'/providers/Microsoft.Storage/storageAccounts/',steps('storage').StorageAccountNameSection.StorageAccountName.name,'/listKeys?api-version=2022-09-01')]",
"path": "[concat(subscription().id,'/resourceGroups/',steps('storage').StorageAccountNameSection.StorageAccountName.resourceGroup,'/providers/Microsoft.Storage/storageAccounts/',steps('storage').StorageAccountNameSection.StorageAccountName.name,'/listKeys?api-version=2023-01-01')]",
"body": ""
}
},
Expand All @@ -791,7 +791,7 @@
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(subscription().id,'/resourceGroups/',steps('storage').StorageAccountNameSection.StorageAccountName.resourceGroup,'/providers/Microsoft.Storage/storageAccounts/',steps('storage').StorageAccountNameSection.StorageAccountName.name,'/fileServices/default/shares?api-version=2022-09-01')]",
"path": "[concat(subscription().id,'/resourceGroups/',steps('storage').StorageAccountNameSection.StorageAccountName.resourceGroup,'/providers/Microsoft.Storage/storageAccounts/',steps('storage').StorageAccountNameSection.StorageAccountName.name,'/fileServices/default/shares?api-version=2023-01-01')]",
"body": ""
}
},
Expand Down
8 changes: 4 additions & 4 deletions Azure-ARM/prereqcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ fi
# echo "Role is assigned at Subsciption level. Continuing checks."
#fi

# If using Purview, check for the following:
# If using Purview, check for the following:
# 1. Has the Purview Application Registration been added to the Data Curators role in the Purview account. If not, exit with error.
# 2. Does the Purview Application Registartion have the proper permissions. If not, output warnings and continue.
if [ "$USEPURVIEW" = "Yes" ]; then
purviewClientPermissions=$(az ad app permission list --id $PURVIEWCLIENTID --output tsv --query [].resourceAccess[].id)

#Check if User.Read permission has been granted to the Purview specific Azure Application Registration.
if [[ $purviewClientPermissions != *"e1fe6dd8-ba31-4d61-89e7-88639da4683d"* ]]; then
echo "The Purview Azure AD application registration is missing the Microsoft Graph API User.Read delegated permission. Some governance features may not function until this permission is granted. This permission might require an Azure AD Global Admin consent. Please visit https://support.profisee.com/wikis/profiseeplatform/prerequisites_for_integrating_with_purview for more information. "
Expand All @@ -139,15 +139,15 @@ if [ "$USEPURVIEW" = "Yes" ]; then
purviewtoken=$(curl --location --no-progress-meter --request GET "https://login.microsoftonline.com/$TENANTID/oauth2/token" --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "client_id=$PURVIEWCLIENTID" --data-urlencode "client_secret=$PURVIEWCLIENTSECRET" --data-urlencode 'grant_type=client_credentials' --data-urlencode 'resource=https://purview.azure.net' | jq --raw-output '.access_token');
#Strip /catalog from end of Purview URL
PURVIEWACCOUNTFQDN=${PURVIEWURL::-8}
collectionnamenotfound=$(curl --location --no-progress-meter --request GET "$PURVIEWACCOUNTFQDN/account/collections?api-version=2019-11-01-preview" --header "Authorization: Bearer $purviewtoken" | jq --raw-output '.value | .[] | select(.friendlyName=="'$PURVIEWCOLLECTIONID'") | .name');
collectionnamenotfound=$(curl --location --no-progress-meter --request GET "$PURVIEWACCOUNTFQDN/account/collections?api-version=2021-12-01" --header "Authorization: Bearer $purviewtoken" | jq --raw-output '.value | .[] | select(.friendlyName=="'$PURVIEWCOLLECTIONID'") | .name');
if [ -z "$collectionnamenotfound" ]; then
err=$"The "$PURVIEWCOLLECTIONID" collection name provided could NOT be found. Exiting with error."
echo $err
set_resultAndReturn;
else
echo $"The "$PURVIEWCOLLECTIONID" collection name provided was found. Continuing checks."
fi
fi
fi

#If using Key Vault, checks to make sure that the Deployment Managed Identity has been assigned the Managed Identity Contributor role AND User Access Administrator as Subscription level.
if [ "$USEKEYVAULT" = "Yes" ]; then
Expand Down

0 comments on commit 2587736

Please sign in to comment.